Skip to content

Commit

Permalink
Use currently opened view of Gnus article buffer
Browse files Browse the repository at this point in the history
When `ace-link-gnus' is called from the summary buffer, use
the currently opened article buffer instead of switching to
the selected article (which might be different).
Also, do not jump to the next button, as this might lead to
unintended scrolling of the article buffer.
  • Loading branch information
kljohann authored and abo-abo committed Jan 21, 2021
1 parent a0e426d commit 6d988e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ace-link.el
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,11 @@ If EXTERNAL is double prefix, browse in new buffer."
(interactive)
(save-selected-window
(when (eq major-mode 'gnus-summary-mode)
(gnus-summary-widget-forward 1))
(if-let ((win (gnus-get-buffer-window gnus-article-buffer 'visible)))
(progn
(select-window win)
(select-frame-set-input-focus (window-frame win)))
(user-error "No article window found")))
(let ((pt (avy-with ace-link-gnus
(avy-process
(ace-link--gnus-collect)
Expand Down

0 comments on commit 6d988e5

Please sign in to comment.