GNU bug report logs -
#17899
24.3.92.1; dabbrev-completion incorrectly searches all buffers
Previous Next
Reported by: Stefan Guath <stefan <at> automata.se>
Date: Wed, 2 Jul 2014 13:56:02 UTC
Severity: normal
Found in versions 23.1, 24.3.92.1
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 10 Dec 2019 20:54:06 +0000
with message-id <20191210205406.GA61566 <at> breton.holly.idiocy.org>
and subject line Re: bug#17899: 24.3.92.1; dabbrev-completion incorrectly searches all buffers
has caused the debbugs.gnu.org bug report #17899,
regarding 24.3.92.1; dabbrev-completion incorrectly searches all buffers
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
17899: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17899
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
VERSION:
GNU Emacs 24.3.92.1 (x86_64-apple-darwin13.2.0, NS apple-appkit-1265.20)
TO REPRODUCE BUG:
* emacs -Q
* Create two buffers (C-x b) with the following contents:
foo.el: "idris0 idris1"
bar.el: "ideal0 ideal1"
* Go to end of foo.el, write "id" and execute dabbrev-completion (C-M-/)
EXPECTED RESULT
"id" should complete to "idris". The doc of dabbrev-completion is very clear on this:
"Like M-/ but finds all expansions in the current buffer
and presents suggestions for completion.
With a prefix argument ARG, it searches all buffers accepted by the
function pointed out by `dabbrev-friend-buffer-function' to find the
completions.
If the prefix argument is 16 (which comes from C-u C-u),
then it searches *all* buffers."
No prefix was given here, so it should just look in the current buffer.
ACTUAL RESULT
A new buffer opens with the text:
"In this buffer, type RET to select the completion near point.
Possible completions are:
ideal0 ideal1
idris0 idris1"
Apparently, the buffer bar.el was incorrectly taken into account. After killing buffer bar.el, dabbrev-completion completes as expected in foo.el.
[Message part 3 (message/rfc822, inline)]
On Thu, Dec 05, 2019 at 01:19:13PM +0000, Alan Third wrote:
> Stefan Guath <stefan <at> automata.se> writes:
>
> > TO REPRODUCE BUG:
> > * emacs -Q
> > * Create two buffers (C-x b) with the following contents:
> > foo.el: "idris0 idris1"
> > bar.el: "ideal0 ideal1"
> > * Go to end of foo.el, write "id" and execute dabbrev-completion (C-M-/)
> >
> > EXPECTED RESULT
> > "id" should complete to "idris".
>
> Hi, sorry it took so long for someone to look at this.
>
> I believe the attached patch fixes it. The problem seems to have been
> switching dabbrev.el over to using lexical scoping. It was previously
> using let* to temporarily override a couple of global variables, which
> works with dynamic scoping, but not lexical.
I’ve pushed to master and am therefore closing this bug report.
--
Alan Third
This bug report was last modified 5 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.