|
From: | Gustavo Barros |
Subject: | Re: .dir-locals.el in AUCTeX tree |
Date: | Wed, 30 Dec 2020 08:12:29 -0300 |
User-agent: | mu4e 1.4.13; emacs 27.1 |
Hi Tassilo, On Wed, 30 Dec 2020 at 02:52, Tassilo Horn <tsdh@gnu.org> wrote:
Gustavo Barros <gusbrs.2016@gmail.com> writes: Hi Gustavo,And it may generate some inconveniences. As an example, in my case, precisely because I want to ensure I won't fat finger the packages in the elpa/ directory, I use a .dir-locals there to open any package source files read-only. But, if AUCTeX distributes its own .dir-locals, it overrides any other ones found up in the tree.Out of curiosity: if you have ~/.emacs.d/elpa/.dir-locals.el and thereis an additional ~/.emacs.d/elpa/auctex-13.0.1/.dir-locals.el, shouldn'tthe settings of *both* apply in non-conflicting cases? (I'm not sure after reading the docs and too lazy to test myself.)
I'm no expert in directory local variables, but that's not what I understand from the docs (admittedly thin in this issue), and also not my experience.
As far as I understand, Emacs searches for `.dir-locals.el' moving up the tree, but once it finds one, it looks no further.
What the Elisp manual says about it is:"If some of the subdirectories have their own ‘.dir-locals.el’ files, Emacs uses the settings from the deepest file it finds starting from the file’s directory and moving up the directory tree."
Regardless of interpretation there, on the testing side, what I can tell you is that I have the following in ~/.emacs.d/elpa/.dir-locals.el:
#+begin_src emacs-lisp ((nil . ((magit-diff-refine-hunk . nil) ;; adapted from https://emacs.stackexchange.com/a/3681 (eval . (when buffer-file-name (setq-local view-no-disable-on-exit t);; to trigger view-mode 'view-read-only t' is required
(read-only-mode 1)))))) #+end_srcAnd, if ~/.emacs.d/elpa/auctex-13.0.1/.dir-locals.el is present, files from ~/.emacs.d/elpa/auctex-13.0.1/ are not visited in `read-only-mode'.
I can also tell that from 48 packages in my ~/.emacs.d/elpa/ directory, only ess sends a `.dir-locals.el' with the package.
That's to say: would you please consider including `.dir-locals.el' to`.elpaignore'?Considered, accepted, applied, and pushed. Will be in 13.0.2 but is notimportant enough to make a release just with this change. Bye, Tassilo
Thank you very much. And agreed, this is minor, when it comes it will be welcome, but there is no hush at all.
Best, Gustavo.
[Prev in Thread] | Current Thread | [Next in Thread] |