unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sergio Pokrovskij <sergio.pokrovskij@gmail.com>
Cc: 17489@debbugs.gnu.org
Subject: bug#17489: 24.3; Major mode spec in .dir-locals.el breaks dired
Date: Wed, 14 May 2014 18:10:04 +0300	[thread overview]
Message-ID: <831tvwpfar.fsf@gnu.org> (raw)
In-Reply-To: <87d2fg6dcn.fsf@gmail.com>

> From: Sergio Pokrovskij <sergio.pokrovskij@gmail.com>
> 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?





  reply	other threads:[~2014-05-14 15:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  7:14 bug#17489: 24.3; Major mode spec in .dir-locals.el breaks dired Sergio Pokrovskij
2014-05-14 15:10 ` Eli Zaretskii [this message]
2014-05-14 16:56   ` Stefan Monnier
2014-05-14 17:24   ` Sergio Pokrovskij
2014-05-14 17:31     ` Glenn Morris
2014-05-14 17:38       ` Glenn Morris
2014-05-14 18:20         ` Eli Zaretskii
2014-05-14 18:29           ` Glenn Morris
2014-05-14 18:40             ` Eli Zaretskii
2014-05-14 19:01               ` Glenn Morris
2014-05-14 19:38                 ` Eli Zaretskii
2014-05-14 19:40                   ` Glenn Morris
2022-02-22 14:29       ` Lars Ingebrigtsen
2014-05-14 18:17     ` Eli Zaretskii
2014-05-15  0:39       ` Sergio Pokrovskij

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831tvwpfar.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17489@debbugs.gnu.org \
    --cc=sergio.pokrovskij@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).