From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27639@debbugs.gnu.org, Kaushal Modi <kaushal.modi@gmail.com>
Subject: bug#27639: 25.2; Fix syntax for minor mode enabling in dir locals in manual
Date: Fri, 08 Nov 2019 02:31:23 +0100 [thread overview]
Message-ID: <87mud7xifo.fsf@marxist.se> (raw)
In-Reply-To: <83tw2ij2vt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 11 Jul 2017 20:32:22 +0300")
tags 27639 + wontfix
close 27639
thanks
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Kaushal Modi <kaushal.modi@gmail.com>
>> Date: Tue, 11 Jul 2017 16:57:32 +0000
>> Cc: 27639@debbugs.gnu.org
>>
>> indent-tabs-mode is the mode variable, so setting it to t is not a
>> mistake.
>>
>> The mistake (as explained in the Reddit post) was setting a 'custom-mode' to t and expecting that that would
>> rightaway enable that 'custom-mode' minor mode.
>
> There's no variable by that name, so it's little surprise that it
> didn't work.
>
>> But why do you think we should only advertise one method, but not the
>> other?
>>
>> From (emacs) Minor Modes
>>
>> =====
>> Most minor modes also have a "mode variable", with the same name as
>> the mode command. Its value is non-‘nil’ if the mode is enabled, and
>> ‘nil’ if it is disabled. In general, you should not try to enable or
>> disable the mode by changing the value of the mode variable directly in
>> Lisp; you should run the mode command instead.
>
> That's unrelated to file-local variables, IMO.
>
>> In any case, as a user, I find it clearer to understand that you must never enable minor modes by just setting
>> their var; you should call that minor mode fn instead.
>
> And I object to the "never" part. This is Emacs: we should teach
> users to know and understand what they are doing, not follow recipes
> prepared by others like a kind of cookbook. If the mode variable is a
> simple variable, and setting it is all that it takes to turn on or off
> the mode, why should we tell users it's wrong?
>
>> Also, if a user uses the (mode . minor) convention instead of (minor-mode . t), they do not have to worry
>> about declaring them safe.
>
> Let them find that out by themselves, and see if they care. Who
> knows, we might even find a few bugs that way -- perhaps some mode
> variable should have a safe-local-variable property that we failed to
> specify.
>
> IOW, I think it's wrong to try to save users from themselves. We
> should provide clear documentation which explains the pros and cons,
> and then let the users decide based on knowledge, not on blindly
> following advice that makes some of the methods "magic".
>
> OK, that's my opinion. What do others think?
I agree with you Eli, and since no one else has commented in the last
2 years, I'm closing this bug report as wontfix.
Best regards,
Stefan Kangas
next prev parent reply other threads:[~2019-11-08 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 11:55 bug#27639: 25.2; Fix syntax for minor mode enabling in dir locals in manual Kaushal Modi
2017-07-10 22:36 ` Kaushal Modi
2017-07-11 16:37 ` Eli Zaretskii
2017-07-11 16:57 ` Kaushal Modi
2017-07-11 17:32 ` Eli Zaretskii
2019-11-08 1:31 ` Stefan Kangas [this message]
2017-07-15 3:14 ` npostavs
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mud7xifo.fsf@marxist.se \
--to=stefan@marxist.se \
--cc=27639@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=kaushal.modi@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.