GNU bug report logs - #22166
24.5; Mixing up Local Variables declarations

Previous Next

Package: emacs;

Reported by: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>

Date: Mon, 14 Dec 2015 16:37:01 UTC

Severity: minor

Tags: notabug

Found in version 24.5

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 22166 in the body.
You can then email your comments to 22166 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Mon, 14 Dec 2015 16:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 14 Dec 2015 16:37:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 24.5; Mixing up Local Variables declarations
Date: Mon, 14 Dec 2015 12:30:04 +0000
[Message part 1 (text/plain, inline)]
Edit the following file as kk.c, exit Emacs.

<--- cut here
#include <stdio.h>

int main(int argc,char **argv)
{
printf("\
%%%% Local Variables:\n\
%%%% mode: LaTeX\n\
%%%% TeX-PDF-mode: t\n\
%%%% TeX-master: \"main\"\n\
%%%% End:\n\
")
}
<--- cut here

The mode is changed from C mode to LaTEX mode and that should not
happen. I can confirm the same behaviour with other programming
languages.




In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
of 2015-04-10 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1348
Configured using:
`configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp''

Important settings:
  value of $LC_ALL: C
  value of $LC_CTYPE: es_ES.UTF-8
  value of $LANG: es_ES.UTF-8
  locale-coding-system: utf-8

Major mode: LaTeX

Minor modes in effect:
  flyspell-mode: t
  shell-dirtrack-mode: t
  global-hl-line-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  show-paren-mode: t
  server-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
Starting new Ispell process /usr/local/bin/aspell with default dictionary...
Ispell process killed
Global Ispell dictionary set to british
Starting new Ispell process /usr/local/bin/aspell with british dictionary...
[yas] Loading for `latex-mode', just-in-time: (yas--load-directory-1 /Volumes/Macintosh-HD/Users/paag/.emacs.d/snippets/latex-mode (quote latex-mode) (quote (text-mode)))!
[yas] Loading compiled snippets from /Volumes/Macintosh-HD/Users/paag/.emacs.d/snippets/latex-mode
[yas] Loading for `latex-mode', just-in-time: (yas--load-directory-1 /Volumes/Macintosh-HD/Users/paag/.emacs.d/elpa/yasnippet-0.8.0/snippets/latex-mode (quote latex-mode) (quote (text-mode)))!
[yas] Loading compiled snippets from /Volumes/Macintosh-HD/Users/paag/.emacs.d/elpa/yasnippet-0.8.0/snippets/latex-mode
Please type y, n, or !: n
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mailabbrev
gmm-utils mailheader sendmail flyspell ispell tex-mode compile shell
pcomplete hl-line doxygen re-builder mediawiki derived url-cache mm-url
gnus gnus-ems nnheader mail-utils wid-edit mml mml-sec mm-decode
mm-bodies mm-encode url-http tls url url-proxy url-privacy url-expand
url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047
rfc2045 ietf-drums url-cookie url-domsuf url-util url-parse auth-source
eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util
mail-prsvr password-cache url-gw url-vars linum-ex cl-macs easy-mmode
lua-mode rx comint ansi-color ring cl-extra yasnippet advice help-fns
edmacro kmacro help-mode easymenu cl gv cl-loaddefs cl-lib paren server
linum cus-start cus-load package epg-config time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 200613 11811)
(symbols 48 28854 0)
(miscs 40 117 220)
(strings 32 46997 16088)
(string-bytes 1 1228919)
(vectors 16 20868)
(vector-slots 8 560451 5183)
(floats 8 456 280)
(intervals 56 277 29)
(buffers 960 14))

---
Dr. Pedro A. Aranda Gutiérrez

Technology Exploration -
Network Innovation & Virtualisation
email: pedroa d0t aranda At telefonica d0t com
Telefónica, Investigación y Desarrollo
C/ Zurbarán,12
28010 Madrid, Spain

Fragen sind nicht da, um beantwortet zu werden.
Fragen sind da, um gestellt zu werden.
Georg Kreisler


________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Mon, 14 Dec 2015 16:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 22166 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>
Cc: 22166 <at> debbugs.gnu.org
Subject: Re: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Mon, 14 Dec 2015 11:57:19 -0500
PEDRO ANDRES ARANDA GUTIERREZ wrote:

> <--- cut here
> #include <stdio.h>
>
> int main(int argc,char **argv)
> {
> printf("\
> %%%% Local Variables:\n\
> %%%% mode: LaTeX\n\
> %%%% TeX-PDF-mode: t\n\
> %%%% TeX-master: \"main\"\n\
> %%%% End:\n\
> ")
> }
> <--- cut here
>
> The mode is changed from C mode to LaTEX mode and that should not
> happen.

That's the correct, documented behavior (see "set-auto-mode" in the
Elisp manual). Local Variables lines may have prefixes and suffixes, and
"mode:" override auto-mode-alist. You'll have to disguise the Local
Variables section if you don't want Emacs to act on it in this case. Eg
you could write it out in two chunks, or simply add

/*
^L
/*

at the very end of the file, since Emacs only searches in the last
"page" for Local Variables.





Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 14 Dec 2015 16:58:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 14 Dec 2015 16:58:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 22166 <at> debbugs.gnu.org and PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 14 Dec 2015 16:58:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Tue, 15 Dec 2015 11:49:02 GMT) Full text and rfc822 format available.

Message #17 received at 22166 <at> debbugs.gnu.org (full text, mbox):

From: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
Subject: Re: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Tue, 15 Dec 2015 11:48:15 +0000
Hi,

Revisiting the documentation, I only read:

> on any ‘mode:’ local variable near the end of a file.

Maybe the ‘detail’ on the last page and the work-around should be included in the docs…


Best, /PA
---
Dr. Pedro A. Aranda Gutiérrez

Technology Exploration -
Network Innovation & Virtualisation
email: pedroa d0t aranda At telefonica d0t com
Telefónica, Investigación y Desarrollo
C/ Zurbarán,12
28010 Madrid, Spain

Fragen sind nicht da, um beantwortet zu werden.
Fragen sind da, um gestellt zu werden.
Georg Kreisler








-----Mensaje original-----
De: Glenn Morris <rgm <at> gnu.org>
Fecha: lunes, 14 de diciembre de 2015, 17:57
Para: paag <pedroa.aranda <at> telefonica.com>
CC: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
Asunto: Re: bug#22166: 24.5; Mixing up Local Variables declarations

>at the very end of the file, since Emacs only searches in the last
>"page" for Local Variables.
>

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Thu, 17 Dec 2015 02:03:01 GMT) Full text and rfc822 format available.

Message #20 received at 22166 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>
Cc: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
Subject: Re: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Wed, 16 Dec 2015 21:01:48 -0500
PEDRO ANDRES ARANDA GUTIERREZ wrote:

> Revisiting the documentation, I only read:
>
>> on any 'mode:' local variable near the end of a file.
>
> Maybe the 'detail' on the last page and the work-around should be
> included in the docs…

The "last page" issue is mentioned in the "Specifying File Variables"
node of the Emacs manual, where it belongs. Personally I don't think
that the "how to fool Emacs so that it doesn't detect something that
looks exactly liks a Local Variables section but isn't one" is
appropriate to mention in the manual, but if someone wants to add a
sentence about that, fine by me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Thu, 17 Dec 2015 06:30:03 GMT) Full text and rfc822 format available.

Message #23 received at 22166 <at> debbugs.gnu.org (full text, mbox):

From: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda <at> telefonica.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
Subject: Re: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Thu, 17 Dec 2015 06:29:03 +0000
Fair enough :-)
---
Dr. Pedro A. Aranda Gutiérrez

Technology Exploration -
Network Innovation & Virtualisation
email: pedroa d0t aranda At telefonica d0t com
Telefónica, Investigación y Desarrollo
C/ Zurbarán,12
28010 Madrid, Spain

Fragen sind nicht da, um beantwortet zu werden.
Fragen sind da, um gestellt zu werden.
Georg Kreisler








-----Mensaje original-----
De: Glenn Morris <rgm <at> gnu.org>
Fecha: jueves, 17 de diciembre de 2015, 3:01
Para: paag <pedroa.aranda <at> telefonica.com>
CC: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
Asunto: Re: bug#22166: 24.5; Mixing up Local Variables declarations

>PEDRO ANDRES ARANDA GUTIERREZ wrote:
>
>> Revisiting the documentation, I only read:
>>
>>> on any 'mode:' local variable near the end of a file.
>>
>> Maybe the 'detail' on the last page and the work-around should be
>> included in the docs…
>
>The "last page" issue is mentioned in the "Specifying File Variables"
>node of the Emacs manual, where it belongs. Personally I don't think
>that the "how to fool Emacs so that it doesn't detect something that
>looks exactly liks a Local Variables section but isn't one" is
>appropriate to mention in the manual, but if someone wants to add a
>sentence about that, fine by me.

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22166; Package emacs. (Sat, 19 Dec 2015 10:40:02 GMT) Full text and rfc822 format available.

Message #26 received at 22166 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: pedroa.aranda <at> telefonica.com, 22166 <at> debbugs.gnu.org
Subject: Re: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Sat, 19 Dec 2015 12:39:52 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Wed, 16 Dec 2015 21:01:48 -0500
> Cc: "22166 <at> debbugs.gnu.org" <22166 <at> debbugs.gnu.org>
> 
> The "last page" issue is mentioned in the "Specifying File Variables"
> node of the Emacs manual, where it belongs. Personally I don't think
> that the "how to fool Emacs so that it doesn't detect something that
> looks exactly liks a Local Variables section but isn't one" is
> appropriate to mention in the manual, but if someone wants to add a
> sentence about that, fine by me.

Done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Jan 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.