GNU bug report logs - #15577
24.3; dir-local variables not applied when switching major-mode

Previous Next

Package: emacs;

Reported by: yary <not.com <at> gmail.com>

Date: Wed, 9 Oct 2013 20:15:01 UTC

Severity: normal

Merged with 23407

Found in version 24.3

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: yary <not.com <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 15577 <15577 <at> debbugs.gnu.org>
Subject: bug#15577: 24.3; dir-local variables not applied when switching major-mode
Date: Thu, 10 Oct 2013 19:12:22 -0400
@Glenn "slightly impolite to post the same question to two different
places" -Understood, but this is a bug report, different purpose from
Stackoverflow question- and thus "are you happy with the answers you
have, or do you want Emacs to change?"- both! The answers are a
workaround for the current situation, but are slightly imperfect, and
as Stefan just wrote the current scheme is "at least undesirable
behavior."

The problem with the "(add-hook 'after-change-major-mode-hook
'hack-local-variables)" workaround and its variants, is when a
major-mode is set by a file-local variable- changing major mode will
reload the local variables, which will revert the major-mode again!

And the trouble with current Emacs out-of-the-box behavior is not
gaining the relevant file-local and dir-local variables for a new
major-mode when changing to that major-mode. I'd like to see a
well-thought-out solution in some future release.




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

Previous Next


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