You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will submit a pull request for this, but I don't know if it will be accepted, since Emacs 29 hasn't been released yet. I'm submitting this issue so that others who run into the same problem may find this potential solution.
When using Emacs compiled from git sources on either the "master" or "emacs-29" branch, calling link-hint-open-link on the default Completions buffer causes an infinite loop.
This is caused by a change in how Emacs handles movement when calling the next-completion command.
This can be recreated with the following steps:
Install Emacs from the master branch.
Move your Emacs configuration so you'll be able to install link-hint without any other packages in the way. Example "mv ~/.emacs.d ~/.emacs.d.backup"
Open Emacs with "emacs -Q"
Paste the following into your scratch buffer and evaluate it.
Begin a completion like so, "M-x emacs" then press TAB until the Completions buffer appears.
Press "M-o" to call link-hint-open-link.
After waiting for a bit, you should notice that nothing is happening, or the hourglass appears. Press "C-g" to cancel the operation.
As I alluded to above, this happens because the new version of next-completion no longer moves point to the end of the buffer when called from the last completion candidate. Instead, it leaves point in place, which means that the current version of link-hint--next-completion-list-candidate never returns nil.
Replacing its definition with the one below solves the problem.
(defunlink-hint--next-completion-list-candidate (bound)
"Find the next completion list candidate location.Only search the range between just after the point and BOUND."
(let ((bound (or bound (window-end)))
(initpoint (point))
point)
(forward-char)
(next-completion1)
(setq point (point))
(when (and
(not (eql initpoint point))
(> (- point initpoint) 1)
(< point bound))
point)))
The text was updated successfully, but these errors were encountered:
I will submit a pull request for this, but I don't know if it will be accepted, since Emacs 29 hasn't been released yet. I'm submitting this issue so that others who run into the same problem may find this potential solution.
When using Emacs compiled from git sources on either the "master" or "emacs-29" branch, calling
link-hint-open-link
on the default Completions buffer causes an infinite loop.This is caused by a change in how Emacs handles movement when calling the
next-completion
command.This can be recreated with the following steps:
link-hint-open-link
.After waiting for a bit, you should notice that nothing is happening, or the hourglass appears. Press "C-g" to cancel the operation.
As I alluded to above, this happens because the new version of
next-completion
no longer moves point to the end of the buffer when called from the last completion candidate. Instead, it leaves point in place, which means that the current version oflink-hint--next-completion-list-candidate
never returnsnil
.Replacing its definition with the one below solves the problem.
The text was updated successfully, but these errors were encountered: