[Top][All Lists]

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

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

From: Michael Heerdegen
Subject: Re: Buffer local variables, let bindings, and read-file-name
Date: Fri, 03 May 2013 03:14:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hello Harald,

> Is there a good explanation for the following behaviour?
> Background: This is on OS X, which has a case insensitive filesystem,
> so read-file-name-completion-ignore-case is accordingly set to t.
> Possibly, the problem can be reproduced on other OSs by setting the
> variable first; but I haven't checked.
> ----------------
> 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.
> ----------------
> How can this be? I see that the code for read-file-name-default does
> (let ((completion-ignore-case read-file-name-completion-ignore-case)) …)
> i.e., it let binds a buffer local variable to the same value it has
> already, namely t. And yet, it behaves as if it were now nil.
> I know that there can be difficulties with let bindings and
> buffer-local variables, but not this kind of difficulties?
> Starting emacs with -Q produces the same result.
> This is emacs from trunk as of April 11.

I can reproduce this here with Debian Linux.  I started emacs -Q,

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

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

Sorry for the late reply (where is Stefan?), and thanks for letting us



reply via email to

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