unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Neil Roberts <bpeeluk@yahoo.co.uk>, 33400@debbugs.gnu.org
Subject: bug#33400: [PATCH] Let dir locals for more specific modes override those from less
Date: Mon, 29 Apr 2019 14:58:34 +0200	[thread overview]
Message-ID: <87zho9vuh1.fsf@gmx.de> (raw)
In-Reply-To: <87v9yzpbls.fsf@gmail.com> (Noam Postavsky's message of "Sat, 27 Apr 2019 14:05:51 -0400")

Noam Postavsky <npostavs@gmail.com> writes:

>> The list of dir local variables to apply is now sorted by the number
>> of parent modes of the mode used as the key in the association
>> list. That way when the variables are applied in order the variables
>> from more specific modes will override those from less specific modes.
>>
>> If there are directory entries in the list then they are sorted in
>> order of name length. The list of modes for that dir is then
>> recursively sorted with the same mechanism. That way variables tied to
>> a particular subdirectory override those in in a parent directory.
>>
>> Previously the behaviour didn’t seem to be well defined anyway and was
>> dependent on the order they appeared in the file. However this order
>> was changed in version 26.1 and it probably also depended on the
>> number of dir-local files that are merged.
>
> This patch looks basically good to me (some minor formatting: sentences
> should end in double space, and the commit message misses a ChangeLog
> formatted entry), but it exceeds to copyright exemption limit.  Would
> you be willing to sign papers?

I also believe the patch is worth to be applied, to the emacs-26
branch. It fixes a regression introduced with Emacs 26.1.

I'd appreciate if this behavior, priority of .dir-locals entries, is
documented in the Emacs manual. Could this be added to the patch?

Thanks, and best regards, Michael.





  parent reply	other threads:[~2019-04-29 12:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 13:21 bug#33400: 26.1; Order changed for overriding “nil” mode in dir-locals Neil Roberts
2018-11-15 18:01 ` bug#33400: [PATCH] Let dir locals for more specific modes override those from less Neil Roberts
2019-04-27 18:05   ` Noam Postavsky
2019-04-29  7:45     ` Neil Roberts
2019-04-29 14:41       ` Eli Zaretskii
2019-04-29 12:58     ` Michael Albinus [this message]
2019-05-08  7:18     ` Neil Roberts
2019-05-10  1:30       ` Noam Postavsky
2019-05-10  6:44         ` Eli Zaretskii
2019-05-10 10:57           ` bug#33400: [PATCH v3] " Neil Roberts
2019-05-12 14:03             ` Noam Postavsky
2019-05-01 11:49   ` bug#35522: [PATCH v2] " Neil Roberts
2018-11-16  9:48 ` bug#33400: 26.1; Order changed for overriding “nil” mode in dir-locals Phil Sainty
2019-04-25 17:08 ` bug#33400: BUMP: please merge the fix for this bug Mark Janes
2019-04-26 17:46 ` bug#33400: Merge with bug#30008? Kévin Le Gouguec
2019-04-27 18:06   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zho9vuh1.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=33400@debbugs.gnu.org \
    --cc=bpeeluk@yahoo.co.uk \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).