GNU bug report logs - #15658
24.1; (wishlist) Easy way to make a file-local variable also permanent-local

Previous Next

Package: emacs;

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

Date: Sat, 19 Oct 2013 22:16:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 24.1

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: yary <not.com <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 15658 <at> debbugs.gnu.org
Subject: Re: bug#15658: 24.1; (wishlist) Easy way to make a file-local
 variable also permanent-local
Date: Tue, 10 May 2022 15:54:00 -0400
I was working on this about 5 years ago, before 24.1, and the use case
I had for this doesn't apply to my current situation. So it might
already work as I wanted it, and my wants have changed! OK to close
this.

-y

On Tue, May 10, 2022 at 11:14 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> yary <not.com <at> gmail.com> writes:
>
> > There are occasional needs to preserve buffer-local variables across
> > major-mode changes. In the specific case of directory-local variables,
> > an automated solution looks to be feasible, see "bug#15577: 24.3;
> > dir-local variables not applied when switching major-mode"
> >
> > File-local variables on the other hand are not as easy to categorize as
> > to their intent- for a particular mode, vs the file contents in general.
> >
> > I propose adding `permanent' as another special "variable name" (along
> > the lines of `mode', `eval', `coding', and `unibyte') to let people
> > mark the file variables they want to remain between mode changes. For
> > example:
> >
> > ; mode: Lisp
> > ; fill-column: 75
> > ; comment-column: 50
> > ; permanent: fill-column tab-width
> >
> > would set & keep fill-column at 75 between mode changes, and would
> > preserve between major-mode switches any changes to tab-width.
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> With the following:
>
> ;; Local variables:
> ;; foo-var: t
> ;; end:
>
> foo-var is set whenever I change the major mode.  Has the behaviour
> changed here since Emacs 24.1?  (The earliest Emacs I have is Emacs
> 25.1.)
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 12 days ago.

Previous Next


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