Questions tagged [directory-local-variables]
The directory-local-variables tag has no usage guidance.
18
questions with no upvoted or accepted answers
3
votes
0answers
104 views
Evaluation of .dir-locals.el in shell?
I observed that directory local variables, defined in .dir-locals.el, are set for files, dired-buffers, new buffers, but not for shell or eshell buffers (well, that is also the case for buffers ...
3
votes
0answers
562 views
How to mark risky variable as safe?
I have some customization in my .dir-locals.el. Some of variables set there are unsafe and when I set them and visit some file in dir for the first time Emacs nicely asks me to save their name-value ...
2
votes
0answers
134 views
Setting org-babel-load-languages in .dir-locals.el
As per the title, I'd like to set the org-babel-load-languages (to contain ditaa and calc languages) for a specific project only.
The only solution I found so far is this one
(
(org-mode .
...
2
votes
0answers
273 views
How to set indentation style substatement-open offset parameter from .dir-locals.el?
Within CC mode, for C and C++ files inside a directory, I'd like to have the open braces following a case/do/for/if/while not indented, whatever the style is and without having to change anything in ....
2
votes
0answers
99 views
org-journal-mode new entry ignores .dir-locals.el
I am using org-journal-mode. I have created .dir-locals.el in my ~/Documents/journal directory and it gets correctly applied if I open a file the usual way. However, if I hit the C-xC-j to add a new ...
1
vote
0answers
23 views
Ignore file- and directory-variables when using “emacs -Q”?
I am using emacs -Q as editor for git, because my startup is too heavy for "quick editing" use and using emacsclient will hang when git is invoked with M-x shell-command. However, as a ...
1
vote
0answers
42 views
how best to set the `projectile-regenerate-tags` command
I have a fortran project I'm working on and I cannot figure out the right way to use .dir-locals to set the projectile-tags-command
here is my dir-locals.el file:
(
(f90-mode
(projectile-tags-...
1
vote
0answers
21 views
Is there a way to undo hook attached to major modes in spacemacs?
In my .spacemacs file I set the following hooks to run:
(add-hook 'js-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)
I, however, have projects where I don't want these to ...
1
vote
2answers
53 views
Directory Variable: .dirs-local.el with regexp
We can specify modes :
(c-mode . ((c-file-style . "BSD")
(subdirs . nil)))
Or directories :
("src/imported"
. ((nil . ((change-log-default-name . "ChangeLog.local")))))
Is there ...
1
vote
0answers
634 views
Why are my .dir-locals not being applied even though they are loaded
Still on a never ending quest to get per project settings working for python using tramp and .dir-locals.
Hitting a strange problem when I open a buffer I am asked if i would like to run my .dir-...
0
votes
1answer
40 views
How to set a “#+SETUPFILE: .xxx.setup” as dir local?
I need this line in every my org files. It's tedious to include it in everyone of them.
0
votes
1answer
17 views
How to manually define trusted paths for directory local variables '.dir-locals.el'?
I would like to define a list of trusted paths.
Where dir-locals.el can be loaded without asking me.
Without having to be concerned with safe-local-variable-valuesWhich isn't very practical if the ...
0
votes
0answers
22 views
Set multiple dir-local variables for the same mode
I understand from here, that I can use dir-locals.el to customize modes, such as given in the example:
;; Warn about spaces used for indentation:
(haskell-mode . ((eval . (highlight-regexp ...
0
votes
0answers
12 views
Set mode for new Tex files in a directory
How to change the default mode for new Tex files in a directory? I tried putting this into a .dir-local.el:
((nil
(tex-default-mode . context-mode)
(TeX-default-mode . context-mode)))
but newly ...
0
votes
0answers
26 views
specify predicate in safe-local-variable-values
I am trying to configure safe-local-variable-values in my init.el so that all string values for projectile-project-name in any .dir-locals.el file are considered safe.
(custom-set-variables
'(safe-...
0
votes
0answers
34 views
ispell dictionary in .dir-locals.el
Aim:
I am writing papers in different languages mostly in multifile latex projects. Thats why I would like to set the ispell dictionary in the directory local variables.
Problem:
Flyspell is not using ...
0
votes
0answers
8 views
How to set block comment style in .dir-locals.el
When I do C-c C-k (c-toggle-comment-style) the value of comment-style remains indent. To achieve the same result as setting block comments, in my .dir-locals.el I have:
((c-mode . ((comment-start . "/...
0
votes
0answers
47 views
Add custom project config loading via `.dir-local.el`
I have a custom config for a project which I would like to load whenever emacs is started from project's root directory. The custom config lies in path/to/project/emacs.d/custom-init.el. I have also ...