GNU bug report logs - #13685
a way to say that dir-locals should only apply to buffers with files

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 11 Feb 2013 01:55:02 UTC

Severity: minor

Merged with 17489

Found in version 24.3

Full log


View this message in rfc822 format

From: Josh <josh <at> foxtail.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13685 <at> debbugs.gnu.org
Subject: bug#13685: a way to say that dir-locals should only apply to buffers with files
Date: Tue, 12 Feb 2013 19:24:19 -0800
On Mon, Feb 11, 2013 at 6:32 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Glenn Morris wrote:
>
>> I think there should be some way in a dir-locals file to say
>> "these settings should only be applied to buffers with files".
>> Sometimes some options are not appropriate for file-less buffers.
>> Ref bug#11127.
>
> This seems easy to do, but I don't know what the best UI is.
> An element in the dir-locals list:
>
>   (fileonly . t)
>
> or
>
>   (apply-to . files)

Or more generally, the cdr could specify a predicate taking a single
argument (the buffer), e.g.
(apply-if . buffer-file-name)

> The latter allows for
>
>   (apply-to . nonfiles)
>
> as well (though I can't think of a use for that).

Likewise, (apply-if . (lambda (buffer) (not (buffer-file-name buffer))))




This bug report was last modified 3 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.