* Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el
@ 2019-11-28 17:23 Alberto Luaces
2019-11-29 12:01 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Alberto Luaces @ 2019-11-28 17:23 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 917 bytes --]
Hi,
f90-mode sets by default indent-tabs-mode to nil, which is good for me.
If I want to set automatically (indent-tabs-mode t) for the rest of the
modes, I set .dir-locals.el to
--8<---------------cut here---------------start------------->8---
((nil (indent-tabs-mode . t)))
--8<---------------cut here---------------end--------------->8---
However, that sets the variable to nil even in f90-mode, as expected.
The problem is that I cannot revert that setting for f90-mode even being
specific in .dir-locals.el:
--8<---------------cut here---------------start------------->8---
((nil (indent-tabs-mode . t))
(f90-mode . ((indent-tabs-mode . nil)))) ; It is evaluated to t nevertheless
--8<---------------cut here---------------end--------------->8---
This is somewhat strange, according to the manual. Are there any
pointers for further debugging this issue?
Thanks!
--
Alberto
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 272 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el
2019-11-28 17:23 Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el Alberto Luaces
@ 2019-11-29 12:01 ` Stefan Kangas
2019-11-29 14:04 ` Robert Pluim
2019-11-29 15:08 ` Alberto Luaces
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Kangas @ 2019-11-29 12:01 UTC (permalink / raw)
To: Alberto Luaces; +Cc: help-gnu-emacs
Alberto Luaces <aluaces@udc.es> writes:
> f90-mode sets by default indent-tabs-mode to nil, which is good for me.
[...]
> The problem is that I cannot revert that setting for f90-mode even being
> specific in .dir-locals.el:
>
> --8<---------------cut here---------------start------------->8---
> ((nil (indent-tabs-mode . t))
BTW, I think you are missing a parenthesis here:
((nil . ((indent-tabs-mode . t)))
It doesn't seem to make a difference in this case, though.
> (f90-mode . ((indent-tabs-mode . nil)))) ; It is evaluated to t nevertheless
> --8<---------------cut here---------------end--------------->8---
>
> This is somewhat strange, according to the manual. Are there any
> pointers for further debugging this issue?
The manual (info "(emacs)Directory Variables") indeed says:
If the ‘.dir-locals.el’ file contains multiple different values for a
variable using different mode names or directories, the values will be
applied in an order such that the values for more specific modes take
priority over more generic modes.
I tried, but I can't reproduce this issue here (using the upcoming
Emacs 27 development branch). I would try using "emacs -Q" to rule
out that there is something in your local configuration which causes
this.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el
2019-11-29 12:01 ` Stefan Kangas
@ 2019-11-29 14:04 ` Robert Pluim
2019-11-29 15:18 ` Alberto Luaces
2019-11-29 15:08 ` Alberto Luaces
1 sibling, 1 reply; 5+ messages in thread
From: Robert Pluim @ 2019-11-29 14:04 UTC (permalink / raw)
To: Stefan Kangas; +Cc: help-gnu-emacs, Alberto Luaces
>>>>> On Fri, 29 Nov 2019 13:01:51 +0100, Stefan Kangas <stefan@marxist.se> said:
Stefan> The manual (info "(emacs)Directory Variables") indeed says:
Stefan> If the ‘.dir-locals.el’ file contains multiple different values for a
Stefan> variable using different mode names or directories, the values will be
Stefan> applied in an order such that the values for more specific modes take
Stefan> priority over more generic modes.
Stefan> I tried, but I can't reproduce this issue here (using the upcoming
Stefan> Emacs 27 development branch). I would try using "emacs -Q" to rule
Stefan> out that there is something in your local configuration which causes
Stefan> this.
This is <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33400>, which
was fixed in emacs-26.3
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el
2019-11-29 12:01 ` Stefan Kangas
2019-11-29 14:04 ` Robert Pluim
@ 2019-11-29 15:08 ` Alberto Luaces
1 sibling, 0 replies; 5+ messages in thread
From: Alberto Luaces @ 2019-11-29 15:08 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Kangas writes:
> I tried, but I can't reproduce this issue here (using the upcoming
> Emacs 27 development branch). I would try using "emacs -Q" to rule
> out that there is something in your local configuration which causes
> this.
Thanks for your help! Indeed I tried all of this first with "-Q",
wanting to be a good emacs citizen :-)
My version is 26.1.
--
Alberto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el
2019-11-29 14:04 ` Robert Pluim
@ 2019-11-29 15:18 ` Alberto Luaces
0 siblings, 0 replies; 5+ messages in thread
From: Alberto Luaces @ 2019-11-29 15:18 UTC (permalink / raw)
To: help-gnu-emacs
Robert Pluim writes:
>>>>>> On Fri, 29 Nov 2019 13:01:51 +0100, Stefan Kangas said:
> Stefan> The manual (info "(emacs)Directory Variables") indeed says:
>
> Stefan> If the ‘.dir-locals.el’ file contains multiple different values for a
> Stefan> variable using different mode names or directories, the values will be
> Stefan> applied in an order such that the values for more specific modes take
> Stefan> priority over more generic modes.
>
> Stefan> I tried, but I can't reproduce this issue here (using the upcoming
> Stefan> Emacs 27 development branch). I would try using "emacs -Q" to rule
> Stefan> out that there is something in your local configuration which causes
> Stefan> this.
>
> This is <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33400>, which
> was fixed in emacs-26.3
Thanks a lot for the info! Specially for the pointer to the bug,
because understanding the bug I discovered a workaround: reordering the
list so f90-mode appears first, things work as expected.
--
Alberto
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-29 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-28 17:23 Trying to set indent-tabs-mode to nil in f90-mode with .dir-locals.el Alberto Luaces
2019-11-29 12:01 ` Stefan Kangas
2019-11-29 14:04 ` Robert Pluim
2019-11-29 15:18 ` Alberto Luaces
2019-11-29 15:08 ` Alberto Luaces
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).