From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#13862: 24.3.50; File local-variables error: (error "Local variables entry is missing the prefix") Date: Sun, 03 Mar 2013 21:51:50 +0530 Message-ID: <871ubw78td.fsf@gmail.com> References: <87bob0794w.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1362327780 20506 80.91.229.3 (3 Mar 2013 16:23:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Mar 2013 16:23:00 +0000 (UTC) To: 13862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 03 17:23:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCBh2-0005dk-Mc for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Mar 2013 17:23:20 +0100 Original-Received: from localhost ([::1]:45707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCBgh-00007G-6b for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Mar 2013 11:22:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCBgc-000069-Lt for bug-gnu-emacs@gnu.org; Sun, 03 Mar 2013 11:22:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCBga-0004Gg-Rs for bug-gnu-emacs@gnu.org; Sun, 03 Mar 2013 11:22:54 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCBga-0004Gb-NX for bug-gnu-emacs@gnu.org; Sun, 03 Mar 2013 11:22:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UCBgk-0004ga-1j for bug-gnu-emacs@gnu.org; Sun, 03 Mar 2013 11:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Mar 2013 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13862 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13862-submit@debbugs.gnu.org id=B13862.136232774317966 (code B ref 13862); Sun, 03 Mar 2013 16:23:02 +0000 Original-Received: (at 13862) by debbugs.gnu.org; 3 Mar 2013 16:22:23 +0000 Original-Received: from localhost ([127.0.0.1]:57283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCBg5-0004fh-AF for submit@debbugs.gnu.org; Sun, 03 Mar 2013 11:22:23 -0500 Original-Received: from mail-pb0-f47.google.com ([209.85.160.47]:47115) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCBg0-0004eu-8i for 13862@debbugs.gnu.org; Sun, 03 Mar 2013 11:22:19 -0500 Original-Received: by mail-pb0-f47.google.com with SMTP id rp2so2612340pbb.34 for <13862@debbugs.gnu.org>; Sun, 03 Mar 2013 08:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:in-reply-to:references:user-agent :date:message-id:mime-version:content-type; bh=WeegPsn3YBBu8OENfM5vfcHo6HbGmEuVb/6xrwfCLZw=; b=fBofgCOITsveUmNryHCl3DZhHPscrD1M1xAyo8n6OPGg+C94MmkTLaz8fT6dDx8/WR vqxz+MXf7qE8kbbENErnQaFy05PD2QBTe7tV0Qh4y6/QSKMbn0D4qrpOPU+nzj6936Wv 4zin6FbNUHhqPPft/CHYMcDSzdP2JYeZ4kKX7ebVwG4PDCUZ0xjv3lOdDPM56+vjVksA BAQoa5DQFBF3N2OrCiSWDrp5Z/PsYqvZ7VueBxxut1rf7MxbsI3mPkXGpF5zhCeqL1j9 atD+NUv6crMJcCLx7lpuzSmM5eIQgHVKhBsQoZTOP57VAIF0hPoPXz8XWrGHE5Jnhzq/ suLA== X-Received: by 10.68.130.1 with SMTP id oa1mr24433933pbb.134.1362327720475; Sun, 03 Mar 2013 08:22:00 -0800 (PST) Original-Received: from debian-6.05 ([115.242.155.185]) by mx.google.com with ESMTPS id 1sm19164049pba.32.2013.03.03.08.21.57 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 03 Mar 2013 08:21:59 -0800 (PST) In-Reply-To: <87bob0794w.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 03 Mar 2013 21:44:55 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72047 Archived-At: --=-=-= Content-Type: text/plain Jambunathan K writes: > 1. emacs -Q > 2. Visit the attached patch file. (I have removed some hunks) Sorry, wrong attachment. Use this one instead. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0002-Always-use-utf-8-encoding-for-HTML-export.patch Content-Transfer-Encoding: quoted-printable >From c5d46d21b5a3f902cfd7b9d709660b493f67bd94 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sun, 3 Mar 2013 20:15:10 +0530 Subject: [PATCH 2/3] Always use utf-8 encoding for HTML export * ox-html.el (org-html-coding-system): Removed. Always use utf-8 for HTML export. (org-html--build-meta-info, org-html-template) (org-html-entity, org-html-export-to-html): Propagate above change. (org-html-table--table.el-table): Replace   with it's utf-8 equivalent. (org-html-special-string-regexps, org-html--tags) (org-html-format-headline, org-html--format-toc-headline) (org-html-checkbox, org-html-table-cell, org-html-timestamp) (org-html-verse-block): Replace numeric entities with their utf-8 equivalent. Mark ox-html.el as utf-8 encoded. --- lisp/ox-html.el | 55 +++++++++++++++++++++------------------------------= ---- 1 files changed, 21 insertions(+), 34 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 3a4c0e7..efd9b2f 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -136,10 +136,10 @@ (defvar htmlize-buffer-places) ; from htmlize.el =20 (defconst org-html-special-string-regexps - '(("\\\\-" . "­") ; shy - ("---\\([^-]\\)" . "—\\1") ; mdash - ("--\\([^-]\\)" . "–\\1") ; ndash - ("\\.\\.\\." . "…")) ; hellip + '(("\\\\-" . "=C2=AD") ; shy + ("---\\([^-]\\)" . "=E2=80=94\\1") ; mdash + ("--\\([^-]\\)" . "=E2=80=93\\1") ; ndash + ("\\.\\.\\." . "=E2=80=A6")) ; hellip "Regular expressions for special string conversion.") =20 (defconst org-html-scripts @@ -821,12 +821,6 @@ and corresponding declarations." (cons (string :tag "Extension") (string :tag "Declaration"))))) =20 -(defcustom org-html-coding-system 'utf-8 - "Coding system for HTML export. -Use utf-8 as the default value." - :group 'org-export-html - :type 'coding-system) - (defcustom org-html-divs '("preamble" "content" "postamble") "The name of the main divs for HTML export. This is a list of three strings, the first one for the preamble @@ -1337,12 +1331,7 @@ INFO is a plist used as a communication channel." (keywords (plist-get info :keywords))) (concat (format "%s\n" title) - (format - "\n" - (or (and org-html-coding-system - (fboundp 'coding-system-get) - (coding-system-get org-html-coding-system 'mime-charset)) - "iso-8859-1")) + "\n" (format "\n" title) (format "\n") (and date (format "\n" d= ate)) @@ -1515,10 +1504,7 @@ holding export options." (cdr (assoc "html" org-html-xml-declaration)) =20 "") - (or (and org-html-coding-system - (fboundp 'coding-system-get) - (coding-system-get org-html-coding-system 'mime-charset)) - "iso-8859-1")) + "utf-8") "\n" "\n" @@ -1579,7 +1565,7 @@ INFO is a plist used as a communication channel." (concat org-html-tag-class-prefix (org-html-fix-class-name tag)) tag)) - tags " ")))) + tags "=C2=A0")))) =20 ;;;; Headline =20 @@ -1593,7 +1579,7 @@ INFO is a plist used as a communication channel." (todo (org-html--todo todo)) (tags (org-html--tags tags))) (concat section-number todo (and todo " ") text - (and tags "   ") tags))) + (and tags "=C2=A0=C2=A0=C2=A0") tags))) =20 ;;;; Src Code =20 @@ -1780,7 +1766,7 @@ INFO is a plist used as a communication channel." (target . ignore)) (org-export-backend-translate-table 'html)) info) - (and tags "   ") (org-html--tags tags))))) + (and tags "=C2=A0=C2=A0=C2=A0") (org-html--tags tags))))) =20 (defun org-html-list-of-listings (info) "Build a list of listings. @@ -1932,7 +1918,7 @@ holding contextual information. See `org-export-data= '." "Transcode an ENTITY object from Org to HTML. CONTENTS are the definition itself. INFO is a plist holding contextual information." - (org-element-property :html entity)) + (org-element-property :utf-8 entity)) =20 =20 ;;;; Example Block @@ -2184,7 +2170,7 @@ contextual information." =20 (defun org-html-checkbox (checkbox) (case checkbox (on "[X]") - (off "[ ]") + (off "[=C2=A0]") (trans "[-]") (t ""))) =20 @@ -2856,7 +2842,7 @@ channel." " align=3D\"%s\"" " class=3D\"%s\"") (org-export-table-cell-alignment table-cell info))))) (when (or (not contents) (string=3D "" (org-trim contents))) - (setq contents " ")) + (setq contents "=C2=A0")) (cond ((and (org-export-table-has-header-p table info) (=3D 1 (org-export-table-row-group table-row info))) @@ -2929,8 +2915,9 @@ communication channel." (re-search-forward "^[ \t]*|[^|]" nil t) (table-generate-source 'html outbuf)) (with-current-buffer outbuf - (prog1 (org-trim (buffer-string)) - (kill-buffer) ))))) + (prog1 (org-trim (replace-regexp-in-string + " " "=C2=A0" (buffer-string) nil t)) + (kill-buffer)))))) =20 (defun org-html-table (table contents info) "Transcode a TABLE element from Org to HTML. @@ -3009,7 +2996,7 @@ information." (let ((value (org-html-plain-text (org-timestamp-translate timestamp) info))) (format "%s" - (replace-regexp-in-string "--" "–" value)))) + (replace-regexp-in-string "--" "=E2=80=93" value)))) =20 =20 ;;;; Underline @@ -3049,7 +3036,7 @@ contextual information." (while (string-match "^[ \t]+" contents) (let* ((num-ws (length (match-string 0 contents))) (ws (let (out) (dotimes (i num-ws out) - (setq out (concat out " ")))))) + (setq out (concat out "=C2=A0")))))) (setq contents (replace-match ws nil t contents)))) (format "

\n%s

" contents)) =20 @@ -3150,16 +3137,15 @@ file-local settings. Return output file's name." (interactive) (let* ((extension (concat "." org-html-extension)) - (file (org-export-output-file-name extension subtreep)) - (org-export-coding-system org-html-coding-system)) + (file (org-export-output-file-name extension subtreep))) (if async (org-export-async-start (lambda (f) (org-export-add-to-stack f 'html)) - (let ((org-export-coding-system org-html-coding-system)) + (let ((org-export-coding-system 'utf-8)) `(expand-file-name (org-export-to-file 'html ,file ,subtreep ,visible-only ,body-only ',ext-plist)))) - (let ((org-export-coding-system org-html-coding-system)) + (let ((org-export-coding-system 'utf-8)) (org-export-to-file 'html file subtreep visible-only body-only ext-plist))))) =20 @@ -3199,6 +3185,7 @@ Return output file name." =20 ;; Local variables: ;; generated-autoload-file: "org-loaddefs.el" +;; coding: utf-8 ;; End: =20 ;;; ox-html.el ends here --=20 1.7.2.5 --=-=-= Content-Type: text/plain > > Side Issue: shouldn't *.patch file open in diff mode. Currently it > opens in fundamental mode. > > See the following error reported > > ,---- > | File mode specification error: (error "Local variables entry is missing the > | prefix") > | File local-variables error: (error "Local variables entry is missing the > | prefix") > `---- > > In GNU Emacs 24.3.50.10 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) > of 2013-03-03 on debian-6.05 > Bzr revision: 111916 eggert@cs.ucla.edu-20130302183934-3d4pouz6i3qwkxs9 > Windowing system distributor `The X.Org Foundation', version 11.0.10707000 > System Description: Debian GNU/Linux 6.0.5 (squeeze) --=-=-=--