Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Gnus support and update for Emacs 27.1 #71

Closed
wants to merge 5 commits into from

Conversation

kljohann
Copy link
Contributor

@kljohann kljohann commented Sep 12, 2020

This should fix #56. In addition I added some ergonomic improvements:

  • Allow calling ace-link from the summary buffer
  • After selecting a link return to the summary buffer (only if it was selected before)
  • Do not skip around in the article buffer (previously the equivalent of forward-button was called, which would scroll the window if the next button after point was out of view)
  • When called from the summary: Do not change the selected article buffer but use the currently opened one

@poulpoulsen Maybe you are interested in giving this a try.

N.B. The last two commits have only been tested with Emacs 27.1, so any feedback from someone still on Emacs 26.3 is appreciated.

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.
(while (progn (widget-forward 1)
(> (point) pt))
(if (<= 27 emacs-major-version)
(mapcar #'cdr (ace-link--woman-collect))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the "collect links in a buffer using button.el" functionality could be extracted and given a more general name.

(declare-function widget-button-press "wid-edit")
(cond ((< emacs-major-version 27)
(widget-button-press (point)))
((and (eq mm-text-html-renderer 'shr)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could possibly already be required for Emacs 26.3 to open links in portions of the buffer rendered by shr.

@kljohann
Copy link
Contributor Author

kljohann commented Jan 6, 2021

Friendly ping @abo-abo, can you have a look at this change? :)

@abo-abo abo-abo closed this in e1b1c91 Jan 21, 2021
@abo-abo
Copy link
Owner

abo-abo commented Jan 21, 2021

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ace-link-gnus; possible error in emacs 27
2 participants