From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs 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 Message-ID: <87mud7xifo.fsf@marxist.se> References: <83wp7fhquh.fsf@gnu.org> <83tw2ij2vt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98337"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 27639@debbugs.gnu.org, Kaushal Modi To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 08 02:32:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSt8H-000PR2-G9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2019 02:32:13 +0100 Original-Received: from localhost ([::1]:49114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSt8G-00084f-6Q for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 20:32:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38208) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSt87-00084P-O8 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 20:32:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSt86-00038O-KQ for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 20:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35399) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSt86-00038K-Gs for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 20:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSt86-0006yu-9H for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 20:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Nov 2019 01:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27639-submit@debbugs.gnu.org id=B27639.157317669625461 (code B ref 27639); Fri, 08 Nov 2019 01:32:02 +0000 Original-Received: (at 27639) by debbugs.gnu.org; 8 Nov 2019 01:31:36 +0000 Original-Received: from localhost ([127.0.0.1]:44218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSt7f-0006cA-EI for submit@debbugs.gnu.org; Thu, 07 Nov 2019 20:31:35 -0500 Original-Received: from host.gofardesign.uk ([208.79.239.190]:48700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSt7b-0006UI-Ld; Thu, 07 Nov 2019 20:31:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=wnB7fVQ4L8V32s370S/loF6c9vX3+f4mx+Q7IL6jfTA=; b=PsvMs5+ND2vY9ON1urh+7HMXCn MRstkX6HqH/uraFRjSgFYKJWRZkSxMD4mZvboWk9iT8Pqf90Ei4eHa/F/cPFLXRmZryodtAg2KOac Yt7LKrnJV/iVaJ6nW4wSJe/d2DoWFzAyxIlea0rvkpzs2XHa1BHiS9jsBcA1iGVsUZiI=; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:43966 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iSt7V-0005sR-Iv; Thu, 07 Nov 2019 19:31:26 -0600 In-Reply-To: <83tw2ij2vt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 11 Jul 2017 20:32:22 +0300") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171138 Archived-At: tags 27639 + wontfix close 27639 thanks Eli Zaretskii writes: >> From: Kaushal Modi >> Date: Tue, 11 Jul 2017 16:57:32 +0000 >> Cc: 27639@debbugs.gnu.org >>=20 >> indent-tabs-mode is the mode variable, so setting it to t is not a >> mistake. >>=20 >> 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?=20 >>=20 >> From (emacs) Minor Modes >>=20 >> =3D=3D=3D=3D=3D >> Most minor modes also have a "mode variable", with the same name as >> the mode command. Its value is non-=E2=80=98nil=E2=80=99 if the mode is = enabled, and >> =E2=80=98nil=E2=80=99 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.=20 > > That's unrelated to file-local variables, IMO. > >> In any case, as a user, I find it clearer to understand that you must ne= ver 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-mod= e . 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