GNU bug report logs -
#13862
24.3.50; File local-variables error: (error "Local variables entry is missing the prefix")
Previous Next
Reported by: Jambunathan K <kjambunathan <at> gmail.com>
Date: Sun, 3 Mar 2013 16:16:01 UTC
Severity: minor
Found in version 24.3.50
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13862 in the body.
You can then email your comments to 13862 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Sun, 03 Mar 2013 16:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 03 Mar 2013 16:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
1. emacs -Q
2. Visit the attached patch file. (I have removed some hunks)
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 <at> 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)
[0001-ox-html.el-org-html-code-org-html-verbatim-Transcode.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Sun, 03 Mar 2013 16:23:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Jambunathan K <kjambunathan <at> gmail.com> writes:
> 1. emacs -Q
> 2. Visit the attached patch file. (I have removed some hunks)
Sorry, wrong attachment. Use this one instead.
[0002-Always-use-utf-8-encoding-for-HTML-export.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
>
> 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 <at> 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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 00:18:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13862 <at> debbugs.gnu.org (full text, mbox):
Adding .diff and .patch to inhibit-local-variables-regexps would avoid this.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 03:40:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 13862 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Adding .diff and .patch to inhibit-local-variables-regexps would avoid
> this.
,----
| ;; Local variables:
| ;; generated-autoload-file: "org-loaddefs.el"
| +;; coding: utf-8
| ;; End:
`----
The question is:
Is there are any local variables in the patch? There isn't any. So why
should we inhibit something that is not there.
If `diff-mode' has no comment syntax defined, then by extension, it
cannot specify file local variables.
ps: I am not sure why *.patch files are visited in diff-mode?
Jambnathan K.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 04 Mar 2013 07:40:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 04 Mar 2013 07:40:06 GMT)
Full text and
rfc822 format available.
Message #19 received at 13862-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
Jambunathan K wrote:
> Is there are any local variables in the patch? There isn't any. So why
> should we inhibit something that is not there.
Inhibit to prevent a false detection, exactly as in this case.
> If `diff-mode' has no comment syntax defined, then by extension, it
> cannot specify file local variables.
Err, you can specify file local variables without a prefix. Eg etc/NEWS.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 08:00:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 13862 <at> debbugs.gnu.org (full text, mbox):
help-debbugs <at> gnu.org (GNU bug Tracking System) writes:
>> Is there are any local variables in the patch? There isn't any. So why
>> should we inhibit something that is not there.
>
> Inhibit to prevent a false detection, exactly as in this case.
>
>> If `diff-mode' has no comment syntax defined, then by extension, it
>> cannot specify file local variables.
>
> Err, you can specify file local variables without a prefix. Eg
> etc/NEWS.
Seems to me that it is worth re-visiting the above decision. Closing
the bug will only suppress further arguments surrounding this bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 14:39:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 13862 <at> debbugs.gnu.org (full text, mbox):
>>> Is there are any local variables in the patch? There isn't any. So why
>>> should we inhibit something that is not there.
>> Inhibit to prevent a false detection, exactly as in this case.
>>> If `diff-mode' has no comment syntax defined, then by extension, it
>>> cannot specify file local variables.
>> Err, you can specify file local variables without a prefix. Eg
>> etc/NEWS.
> Seems to me that it is worth re-visiting the above decision. Closing
> the bug will only suppress further arguments surrounding this bug.
I think we should start by turning the error into a warning.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 16:09:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 13862 <at> debbugs.gnu.org (full text, mbox):
> From: Jambunathan K <kjambunathan <at> gmail.com>
> Date: Mon, 04 Mar 2013 09:08:54 +0530
> Cc: 13862 <at> debbugs.gnu.org
>
> Glenn Morris <rgm <at> gnu.org> writes:
>
> > Adding .diff and .patch to inhibit-local-variables-regexps would avoid
> > this.
>
> ,----
> | ;; Local variables:
> | ;; generated-autoload-file: "org-loaddefs.el"
> | +;; coding: utf-8
> | ;; End:
> `----
>
> The question is:
>
> Is there are any local variables in the patch? There isn't any. So why
> should we inhibit something that is not there.
>
> If `diff-mode' has no comment syntax defined, then by extension, it
> cannot specify file local variables.
File local variables never had anything to do with comment syntax; you
won't find that neither in the code nor in the documentation. Which
is a Good Thing: if file local variables were supported only for modes
which have comment syntax defined, we couldn't have used them in all
the modes that don't. For example, Text mode, or the tutorials, or the
ChangeLog files. You name it.
In modes that do have comment syntax defined, it makes sense to put
these variables into comments, so as not to confuse the translator.
But that's about all these variables have in common with comments.
You will see in the code that Emacs deduces the prefix and suffix
heuristically, and that is how this is documented.
So I think Glenn is right about the solution. Diffs don't have
contents of their own (well, except for the hunk headers), so looking
up diffs for file-local variables doesn't make much sense.
> ps: I am not sure why *.patch files are visited in diff-mode?
What else?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13862
; Package
emacs
.
(Mon, 04 Mar 2013 16:48:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 13862 <at> debbugs.gnu.org (full text, mbox):
> So I think Glenn is right about the solution. Diffs don't have
> contents of their own (well, except for the hunk headers), so looking
> up diffs for file-local variables doesn't make much sense.
Actually, diff files can have any other text beside the diff itself, and
so you can very easily add file local variables in there.
But it's probably OK to inhibit them, because I don't think they're
often/ever used.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 02 Apr 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.