emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer local variables, let bindings, and read-file-name


From: Harald Hanche-Olsen
Subject: Re: Buffer local variables, let bindings, and read-file-name
Date: Fri, 03 May 2013 09:53:23 +0200 (CEST)

[Michael Heerdegen <address@hidden> (2013-05-03 01:14:30 UTC)]

> > ----------------
> > Now if I create a new buffer and evaluate (read-file-name "file: ")
> > in the buffer, I get case insensitive completion, and all is well.
> >
> > But if I evaluate (setq-local completion-ignore-case t) in the buffer
> > and try (read-file-name "file: ") again, completion is case sensitive.
> > ----------------
> 
> I can reproduce this here with Debian Linux.  I started emacs -Q,
> evaluated
> 
>   (setq read-file-name-completion-ignore-case t)
> 
> (it defaults to nil in my case), and followed your recipe step by step.
> And I get exactly the same behavior.  Simply looks like a bug, probably
> in the (newly written) completion code.

Thanks for confirming this.

> Please make a bug report (M-x report-emacs-bug), include your recipe and
> please also mention that it's the same with Linux.

Done. 14340: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14340

I also added a bit of analysis. It's short enough to repeat here:

read-file-name-default let binds completion-ignore-case to the value of
read-file-name-completion-ignore-case before doing a pile of setup
work and calling completing-read.

When completion-ignore-case is buffer local, let overrides the buffer
local binding and not the global binding. But because completing-read
evaluates the variable in the minibuffer, it gets the global value
instead, i.e., nil.

(I may be wrong about some details in this, but I but this is the gist
of the problem.)

- Harald



reply via email to

[Prev in Thread] Current Thread [Next in Thread]