New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove .dir-locals.el #48157
Remove .dir-locals.el #48157
Conversation
why not? |
Well for one, I shouldn't have to change my emacs config and enable emacs features I don't care about to be able to productively contribute to nixpkgs. That's a silly thing to annoy any drive-by or first-time contributor with. Also, my emacs config file is not writable, so I can't just get emacs to do it for me. I just home-manager to install the file from my dotfiles repo so it's a symlink to the nix store. |
The most valuable part of this for newbies is the indentation width, which is already covered by editorconfig.
|
cc @matthewbauer who added this in July |
FTR I was also annoyed by this new file because every time it asked me about these variables was not the time for me to review this file. |
Sorry about this. They were all safe local variables so it is pretty normal to have them set (Nix has done it for a while: https://github.com/NixOS/nix/blob/master/.dir-locals.el). Do you also have issues in that? This can be configured with enable-local-variables but IIRC it defaults to t. Was there a specific one that was tripping up? I do recall bug-reference-bug-regexp being made safe only in 26.1 it could have been a problem in Emacs 25. |
It could be indeed:
|
I'm using the version of Emacs that is distributed with NixOS 18.03. I see that 18.09 has just released though so I'll probably be upgrading very soon. What about you @ElvishJerricco? |
Sorry about that! Yeah since emacs 25 is still in 18.03 it definitely shouldn't be forgotten about. Anyway bug-reference-regexp is not all that useful so it's fine to leave .dir-locals.el off for now. |
Oh so there will be no prompting with emacs 26, even if I've never purposefully saved the locals? If that's the case, perhaps we can add this back after giving 18.09 some time for adoption. I'm still on 18.03 (emacs 25). |
Motivation for this change
This file has been excruciatingly annoying to me. I don't personally want to save those dir-locals as trusted in my emacs config. So now every buffer I open prompts me "Do you really want to apply it?" This includes magit, which operates by opening buffers extremely frequently. Frankly, I think anyone who wants the behavior of this file should add it to their worktree themselves. I have to keep it deleted, which causes many git commands to fail because of unstaged changes, whereas adding the file to your worktree makes it untracked and git will basically never complain about it.