emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-29 9ecebcdded: * lisp/simple.el (next-completion): Handle firs


From: Eli Zaretskii
Subject: Re: emacs-29 9ecebcdded: * lisp/simple.el (next-completion): Handle first completion specially.
Date: Fri, 13 Jan 2023 16:57:12 +0200

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org,  gregory@heytings.org,  juri@linkov.net
> Date: Fri, 13 Jan 2023 14:57:08 +0100
> 
> >>>>> On Fri, 13 Jan 2023 15:37:36 +0200, Eli Zaretskii <eliz@gnu.org> said:
> 
>     Eli> Fixed.  It's a clear case of a test that adapted the results to what
>     Eli> the code produced, not to the desired/expected value.
> 
> Itʼs fixed, but Iʼll admit that I donʼt understand why:
> 
>       (should (equal "aa" (get-text-property (point) 'completion--string)))
>       (next-completion 3)
>       (should (equal "ac" (get-text-property (point) 'completion--string)))
>       (previous-completion 2)
>       (should (equal "aa" (get-text-property (point) 'completion--string)))
> 
> So we go forward 3 from "aa" to get to "ac", but then to get back to
> "aa" itʼs back 2?

Because the first next-completion goes to "aa".  The original
"position" is _before_ the first candidate: that's what the commit
that you blamed was about.



reply via email to

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