unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: michael_heerdegen@web.de
Cc: emacs-devel@gnu.org
Subject: Re: Buffer local variables, let bindings, and read-file-name
Date: Fri, 03 May 2013 09:53:23 +0200 (CEST)	[thread overview]
Message-ID: <20130503.095323.429141201649637156.hanche@math.ntnu.no> (raw)
In-Reply-To: <87ppx87tl5.fsf@web.de>

[Michael Heerdegen <michael_heerdegen@web.de> (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	other threads:[~2013-05-03  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 18:12 Buffer local variables, let bindings, and read-file-name Harald Hanche-Olsen
2013-05-03  1:14 ` Michael Heerdegen
2013-05-03  7:53   ` Harald Hanche-Olsen [this message]

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=20130503.095323.429141201649637156.hanche@math.ntnu.no \
    --to=hanche@math.ntnu.no \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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).