From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17489: 24.3; Major mode spec in .dir-locals.el breaks dired Date: Wed, 14 May 2014 18:10:04 +0300 Message-ID: <831tvwpfar.fsf@gnu.org> References: <87d2fg6dcn.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1400080310 22192 80.91.229.3 (14 May 2014 15:11:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 May 2014 15:11:50 +0000 (UTC) Cc: 17489@debbugs.gnu.org To: Sergio Pokrovskij Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 14 17:11:44 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WkaqM-0006Oh-LI for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 17:11:42 +0200 Original-Received: from localhost ([::1]:52345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkaqM-0000iv-6J for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 11:11:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkapq-0008Vp-W2 for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 11:11:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkapj-0003ri-34 for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 11:11:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkapi-0003rX-Un for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 11:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wkapi-0003If-IL for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 May 2014 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17489-submit@debbugs.gnu.org id=B17489.140008021912599 (code B ref 17489); Wed, 14 May 2014 15:11:02 +0000 Original-Received: (at 17489) by debbugs.gnu.org; 14 May 2014 15:10:19 +0000 Original-Received: from localhost ([127.0.0.1]:35303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wkap0-0003H8-Lt for submit@debbugs.gnu.org; Wed, 14 May 2014 11:10:19 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:54492) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wkaow-0003Gq-Vq for 17489@debbugs.gnu.org; Wed, 14 May 2014 11:10:16 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N5K00600KCXR100@a-mtaout22.012.net.il> for 17489@debbugs.gnu.org; Wed, 14 May 2014 18:10:08 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5K00649KSWTB10@a-mtaout22.012.net.il>; Wed, 14 May 2014 18:10:08 +0300 (IDT) In-reply-to: <87d2fg6dcn.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89069 Archived-At: > From: Sergio Pokrovskij > Date: Wed, 14 May 2014 14:14:48 +0700 > > Given a .dir-locals.el file of the form: > > --8<---------------cut here---------------start------------->8--- > % ls -al /tmp/tst/ > total 16 > drwxrwxr-x 2 sergio sergio 4096 мая 14 12:01 . > drwxrwxrwt 17 root root 4096 мая 14 14:06 .. > -rw-rw-r-- 1 sergio sergio 44 мая 14 12:01 .dir-locals.el > -rw-rw-r-- 1 sergio sergio 4 мая 14 11:58 t.t > % > % cat /tmp/tst/.dir-locals.el > ((nil . ((mode . c) (fill-column . 80)))) > > % > --8<---------------cut here---------------end--------------->8--- > > it works okay for the local files which are read with a path in the > command-line or with a find-file: > > --8<---------------cut here---------------start------------->8--- > % emacs -nw -Q /tmp/tst/t.t > --8<---------------cut here---------------end--------------->8--- > > The file is open in c-mode, the *Messages* contains: > > --8<---------------cut here---------------start------------->8--- > ("emacs" "/tmp/tst/t.t") > For information about GNU Emacs and the GNU system, type C-h C-a. > Loading cc-langs...done > --8<---------------cut here---------------end--------------->8--- > > Yet it prevents the dired buffer for /tmp/tst/ to be displayed; a > "Wrong type argument: stringp, nil" message is issued. > > This seems to occur for any major mode; I tried it for psgml-mode, > text-mode, c-mode. It's not clear what did you expect instead. Did you expect that unconditionally turning on some mode in a Dired buffer be ignored, just because it's a Dired buffer? Or did you expect that your .dir-locals.el settings be in effect only for files, not for directories? Or did you expect that cc-mode somehow gracefully does nothing when the buffer text is not a C-like program source? Or something else? IOW, why isn't that .dir-locals.el setting of yours not a cockpit error?