all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22166: 24.5; Mixing up Local Variables declarations
@ 2015-12-14 12:30 PEDRO ANDRES ARANDA GUTIERREZ
  2015-12-14 16:57 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: PEDRO ANDRES ARANDA GUTIERREZ @ 2015-12-14 12:30 UTC (permalink / raw)
  To: 22166

[-- Attachment #1: Type: text/plain, Size: 6244 bytes --]


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

[-- Attachment #2: Type: text/html, Size: 9325 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22166: 24.5; Mixing up Local Variables declarations
  2015-12-14 12:30 bug#22166: 24.5; Mixing up Local Variables declarations PEDRO ANDRES ARANDA GUTIERREZ
@ 2015-12-14 16:57 ` Glenn Morris
  2015-12-15 11:48   ` PEDRO ANDRES ARANDA GUTIERREZ
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2015-12-14 16:57 UTC (permalink / raw)
  To: PEDRO ANDRES ARANDA GUTIERREZ; +Cc: 22166

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.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22166: 24.5; Mixing up Local Variables declarations
  2015-12-14 16:57 ` Glenn Morris
@ 2015-12-15 11:48   ` PEDRO ANDRES ARANDA GUTIERREZ
  2015-12-17  2:01     ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: PEDRO ANDRES ARANDA GUTIERREZ @ 2015-12-15 11:48 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 22166@debbugs.gnu.org

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@gnu.org>
Fecha: lunes, 14 de diciembre de 2015, 17:57
Para: paag <pedroa.aranda@telefonica.com>
CC: "22166@debbugs.gnu.org" <22166@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22166: 24.5; Mixing up Local Variables declarations
  2015-12-15 11:48   ` PEDRO ANDRES ARANDA GUTIERREZ
@ 2015-12-17  2:01     ` Glenn Morris
  2015-12-17  6:29       ` PEDRO ANDRES ARANDA GUTIERREZ
  2015-12-19 10:39       ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2015-12-17  2:01 UTC (permalink / raw)
  To: PEDRO ANDRES ARANDA GUTIERREZ; +Cc: 22166@debbugs.gnu.org

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22166: 24.5; Mixing up Local Variables declarations
  2015-12-17  2:01     ` Glenn Morris
@ 2015-12-17  6:29       ` PEDRO ANDRES ARANDA GUTIERREZ
  2015-12-19 10:39       ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: PEDRO ANDRES ARANDA GUTIERREZ @ 2015-12-17  6:29 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 22166@debbugs.gnu.org

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@gnu.org>
Fecha: jueves, 17 de diciembre de 2015, 3:01
Para: paag <pedroa.aranda@telefonica.com>
CC: "22166@debbugs.gnu.org" <22166@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22166: 24.5; Mixing up Local Variables declarations
  2015-12-17  2:01     ` Glenn Morris
  2015-12-17  6:29       ` PEDRO ANDRES ARANDA GUTIERREZ
@ 2015-12-19 10:39       ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-12-19 10:39 UTC (permalink / raw)
  To: Glenn Morris; +Cc: pedroa.aranda, 22166

> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 16 Dec 2015 21:01:48 -0500
> Cc: "22166@debbugs.gnu.org" <22166@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-19 10:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 12:30 bug#22166: 24.5; Mixing up Local Variables declarations PEDRO ANDRES ARANDA GUTIERREZ
2015-12-14 16:57 ` Glenn Morris
2015-12-15 11:48   ` PEDRO ANDRES ARANDA GUTIERREZ
2015-12-17  2:01     ` Glenn Morris
2015-12-17  6:29       ` PEDRO ANDRES ARANDA GUTIERREZ
2015-12-19 10:39       ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.