minad / consult

:mag: consult.el - Consulting completing-read
GNU General Public License v3.0
1.14k stars 99 forks source link

Restore point in buffer when pressing C-g in consult-org-agenda #858

Closed overideal closed 8 months ago

overideal commented 8 months ago

Open an arbitrary Org file (with a couple of headings) and add it to org-agenda-files. Change the window configuration so that the Org file is not visible. Call consult-org-agenda, navigate to a heading and cancel out via C-g. When switching back to to the Org file, one sees that the position of point has moved, despite having canceled the command. Note that when the buffer is visible, the point is correctly restored after pressing C-g.

Tested on Emacs 29.1 (Linux).