GNU bug report logs - #21252
25.0.50; `describe-variable': use current buffer, not minibuffer, in `completing-read' PREDICATE

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 13 Aug 2015 15:45:03 UTC

Severity: minor

Tags: fixed

Found in version 25.0.50

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 21252 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 21252 <at> debbugs.gnu.org
Subject: Re: bug#21252: 25.0.50;
 `describe-variable': use current buffer, not minibuffer, in
 `completing-read' PREDICATE
Date: Sun, 01 May 2016 00:09:18 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> This bug is at least as old as Emacs 20!  Never noticed it before.
>
> 1. emacs -Q
> 2. Type this in *scratch* and evaluate it using `C-x C-e':
>
>    (set (make-local-variable 'toto) 42)
>
> 3. C-h v tot TAB
>
> There is no completion for variable `toto'.
>
> The reason is that the PREDICATE arg passed to `completing-read' gets
> evaluated with the minibuffer as the current buffer, and `toto' is not
> bound in the minibuffer.
>
> The predicate should use `with-current-buffer' to make the originally
> current buffer current for the test.

Makes sense.  I applied your changes, slightly changed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 8 years and 230 days ago.

Previous Next


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