emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#17899: closed (24.3.92.1; dabbrev-completion incorrectly searches al


From: GNU bug Tracking System
Subject: bug#17899: closed (24.3.92.1; dabbrev-completion incorrectly searches all buffers)
Date: Tue, 10 Dec 2019 20:55:02 +0000

Your message dated Tue, 10 Dec 2019 20:54:06 +0000
with message-id <address@hidden>
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
address@hidden.)


-- 
17899: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17899
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.92.1; dabbrev-completion incorrectly searches all buffers Date: Wed, 2 Jul 2014 15:54:43 +0200
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.


--- End Message ---
--- Begin Message --- Subject: Re: bug#17899: 24.3.92.1; dabbrev-completion incorrectly searches all buffers Date: Tue, 10 Dec 2019 20:54:06 +0000
On Thu, Dec 05, 2019 at 01:19:13PM +0000, Alan Third wrote:
> Stefan Guath <address@hidden> 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


--- End Message ---

reply via email to

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