From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#27639: 25.2; Fix syntax for minor mode enabling in dir locals in manual Date: Mon, 10 Jul 2017 11:55:58 +0000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1cbeb2c474620553f544a6" X-Trace: blaine.gmane.org 1499687837 20941 195.159.176.226 (10 Jul 2017 11:57:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2017 11:57:17 +0000 (UTC) To: 27639@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 10 13:57:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUXJJ-0004mU-6e for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Jul 2017 13:57:05 +0200 Original-Received: from localhost ([::1]:40063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUXJM-0002Hz-VM for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Jul 2017 07:57:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUXJH-0002He-9t for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:57:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUXJG-0007qC-An for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:57:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUXJG-0007q4-69 for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUXJF-0005my-Vn for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jul 2017 11:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149968778722204 (code B ref -1); Mon, 10 Jul 2017 11:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jul 2017 11:56:27 +0000 Original-Received: from localhost ([127.0.0.1]:59683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUXIg-0005m4-LR for submit@debbugs.gnu.org; Mon, 10 Jul 2017 07:56:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUXIf-0005lr-88 for submit@debbugs.gnu.org; Mon, 10 Jul 2017 07:56:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUXIY-0007SG-UT for submit@debbugs.gnu.org; Mon, 10 Jul 2017 07:56:19 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUXIY-0007S1-RO for submit@debbugs.gnu.org; Mon, 10 Jul 2017 07:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUXIX-0002Fy-94 for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:56:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUXIR-0007OE-G4 for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:56:17 -0400 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:35286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUXIR-0007Nl-7t for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2017 07:56:11 -0400 Original-Received: by mail-lf0-x22f.google.com with SMTP id b207so58185059lfg.2 for ; Mon, 10 Jul 2017 04:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=x3PWoQ5ZJQrDyivqchEbBKoS+jVm33dp/9k+s5sA84E=; b=U96F2LOgWz1cYF9Mr3ytztiyS2WM+0s7BX6jkA3mMW6awZqJpcb81fe3hN4keQ5GP7 PgsO93Y2IbuepTdHHeQA4/q5r3fGFxq/QUDU3I7+HAZ0J/rjie+x8nITmm7peHT5PSTQ 70KOWurPe5QLljVOCtKHQ6yzHkzEsEdDEcxvzbFKEvmo+GVHycWvGYpwQN99Sry0JYsv gN/PmtUULg7nWbWyAh+GdKiCJYGR8UMl9PFLOD+ElriLeRjZJUYBFBOHpTfJq0qLiKUI k0jLyjtjuFwO1hoEzRJIWCGbKM8bsEGiYTTtFpaimVw3yZadr48B8h2sDxNfurLuAGFQ EOyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=x3PWoQ5ZJQrDyivqchEbBKoS+jVm33dp/9k+s5sA84E=; b=dx7MTjOGiuoiIG0qx5mtbwkdIOZQq4A76CpqoJztL3GnQ5RAOmNZpdp+sgsk78r1hj BtaNn9yyo0Cf7+cTDvkqoZ934kZr+rObBfUQHBgp20QnxRkDV0V60AkGxxSzXexaEudk +6qqUic+A/WIYjTNiv1drvxfLtvs5eJ5cSF1tTpLbhnXWCZkS/fWg3uGnkhHi4Xp5DZQ iRsMvMtFmhns1MupuBVRC0rH/Fc60iCAcVPqSCszwLXOWOCN3Q0IinODoS++pFZwAD1c 7l80wi0Um0zIzTeR9jJoSiXmGkggoUdQ55d1ytaOsFIJZXZRpuTurNwGxlo3mdm9IQyV v3RQ== X-Gm-Message-State: AIVw110hDHDSbQmUgCW09tWKone/duXwA7Mgm+U+52uoGgEBjH9TCOHH r46XILNgvIopqiVI9gJYGI26p9fsDg== X-Received: by 10.25.80.17 with SMTP id e17mr1169590lfb.95.1499687769370; Mon, 10 Jul 2017 04:56:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 208.118.235.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:134389 Archived-At: --94eb2c1cbeb2c474620553f544a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I recently stumbled across this Reddit post[1] where a user is trying to enable a minor mode in .dir-locals.el. But he was doing that by setting the mode name to `t'. We generally(?) enable minor modes by doing (mode . MINOR) in .dir-locals.el. So I thought of looking up the Emacs manual to check that: Here's an example of a .dir-locals.el file: ((nil . ((indent-tabs-mode . t) (fill-column . 80))) This sets =E2=80=98indent-tabs-mode=E2=80=99 and fill-column for any file i= n the directory tree. That would lead the readers to think that that's how *any* minor mode can be enabled from .dir-locals.el. I think that example should be fixed by using a minor mode example that can be enabled using the (mode . MINOR) syntax. [1]: https://www.reddit.com/r/emacs/comments/6malb6/disable_warning_message_when= _enabling_minor_modes/ --=20 Kaushal Modi --94eb2c1cbeb2c474620553f544a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello,

I recently stumbled across this Reddit post[1] wh= ere a user is trying to enable a minor mode in .dir-locals.el. But he was d= oing that by setting the mode name to `t'.=C2=A0

We generally(?) enable minor modes by doing (mode . MINOR) in .dir-local= s.el.=C2=A0

So I thought of looking up the Emacs m= anual to check that:

Here's an example of a .d= ir-locals.el file:

((nil . ((indent-tabs-mode . t)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (fill-column . 80)))
<snip= >

This sets =E2=80=98indent-tabs-mode=E2=80=99 = and fill-column for any file in the directory tree.

That would lead the readers to think that that's how *any* minor = mode can be enabled from .dir-locals.el.=C2=A0

I t= hink that example should be fixed by using a minor mode example that can be= enabled using the (mode . MINOR) syntax.

--

Kaushal Modi

--94eb2c1cbeb2c474620553f544a6--