GNU bug report logs - #18188
Please make it possible to have a directory-local setting for auto-mode-alist

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Mon, 4 Aug 2014 10:29:02 UTC

Severity: wishlist

Tags: patch

Merged with 18721

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 18188 in the body.
You can then email your comments to 18188 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#18188; Package emacs. (Mon, 04 Aug 2014 10:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reuben Thomas <rrt <at> sc3d.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 04 Aug 2014 10:29:02 GMT) Full text and rfc822 format available.

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

From: Reuben Thomas <rrt <at> sc3d.org>
To: bug-emacs <bug-emacs <at> gnu.org>
Subject: Please make it possible to have a directory-local setting for
 auto-mode-alist
Date: Mon, 4 Aug 2014 11:28:18 +0100
[Message part 1 (text/plain, inline)]
I'd like to use a different major mode for Javascript files in a particular
project from the one I use by default. At present this seems to be easy to
achieve only by changing auto-mode-alist; changing this idempotently in
.dir-locals.el is tricky.

As per
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-01/msg00363.html ,
where Stefan Monnier said he thought this was a reasonable idea and a bug
should be filed, and as per
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-01/msg00579.html
where Ted Zlatonov noticed that the original requester had not filed a bug,
I'm requesting this feature.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

Merged 18188 18721. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Wed, 15 Jun 2016 03:41:01 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 29 May 2021 04:07:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18188; Package emacs. (Sat, 29 May 2021 04:08:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tom Tromey <tom <at> tromey.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 18721 <at> debbugs.gnu.org, 18188 <at> debbugs.gnu.org
Subject: Re: bug#18188: Please make it possible to have a directory-local
 setting for auto-mode-alist
Date: Sat, 29 May 2021 06:07:40 +0200
Tom Tromey <tom <at> tromey.com> writes:

> Eli> So I'm asking why not keep the current syntax for this feature, and
> Eli> avoid introducing a new kind of special key?  This would mean your
> Eli> example above will look like this:
> Eli>   (nil . ((auto-mode-alist . (("\\.def\\'" . c-mode)))))
>
> I suppose it would work ok as long as the code also doesn't try to set
> auto-mode-alist locally in the buffer, both because that variable isn't
> safe, and because I think it doesn't make sense to set it buffer-locally
> anyhow.

I think everybody agreed that this was a good feature to add (with Eli's
tweaks), but as far as I can tell, it was never added.  Tom, would it be
possible for you to re-spin this patch for Emacs 28?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18188; Package emacs. (Sat, 29 May 2021 15:15:01 GMT) Full text and rfc822 format available.

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

From: Tom Tromey <tom <at> tromey.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Tom Tromey <tom <at> tromey.com>,
 18721 <at> debbugs.gnu.org, 18188 <at> debbugs.gnu.org
Subject: Re: bug#18188: Please make it possible to have a directory-local
 setting for auto-mode-alist
Date: Sat, 29 May 2021 09:13:58 -0600
Lars> I think everybody agreed that this was a good feature to add (with Eli's
Lars> tweaks), but as far as I can tell, it was never added.  Tom, would it be
Lars> possible for you to re-spin this patch for Emacs 28?

Doubtful, but it's fine by me if someone takes it over.  I don't recall
who objected or why, but someone didn't like the approach I took and
requested changes, so whoever does it would have to navigate this.

Tom




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18188; Package emacs. (Fri, 23 Jul 2021 14:01:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tom Tromey <tom <at> tromey.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 18721 <at> debbugs.gnu.org, 18188 <at> debbugs.gnu.org
Subject: Re: bug#18721: 25.0.50; choose major mode from .dir-locals.el
Date: Fri, 23 Jul 2021 16:00:11 +0200
Tom Tromey <tom <at> tromey.com> writes:

> Lars> I think everybody agreed that this was a good feature to add (with Eli's
> Lars> tweaks), but as far as I can tell, it was never added.  Tom, would it be
> Lars> possible for you to re-spin this patch for Emacs 28?
>
> Doubtful, but it's fine by me if someone takes it over.  I don't recall
> who objected or why, but someone didn't like the approach I took and
> requested changes, so whoever does it would have to navigate this.

I've now respun the patch for Emacs 28, and it seems to work fine, and I
think everybody agreed that this was useful functionality.

There was some discussion about whether to introduce a new dir-locals
element for this, or just use the normal variable-setting thing.  As Tom
said, the normal thing is awkward to use here (because of the
buffer-local thing), so I think Tom's approach here is the best,
overall.

So I've now pushed this to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 18721 <at> debbugs.gnu.org and Tom Tromey <tom <at> tromey.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Jul 2021 14:01:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 21 Aug 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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