ol-gnus: Prefer nnselect to nnir if available
* lisp/ol-gnus.el (org-gnus-store-link): Use nnselect when available. In the master branch of the Emacs repository, f103e89c1d (Add aliases for recent Gnus nnselect changes, 2020-09-07) switched org-gnus-store-link over to using nnselect, but that can't be ported as is because it isn't backward compatible. Make a similar change that includes compatibility kludges.
This commit is contained in:
parent
1c5bebdad9
commit
824a4a14b0
|
@ -34,7 +34,8 @@
|
||||||
(require 'gnus-sum)
|
(require 'gnus-sum)
|
||||||
(require 'gnus-util)
|
(require 'gnus-util)
|
||||||
(require 'nnheader)
|
(require 'nnheader)
|
||||||
(require 'nnir)
|
(or (require 'nnselect nil t) ; Emacs >= 28
|
||||||
|
(require 'nnir nil t)) ; Emacs < 28
|
||||||
(require 'ol)
|
(require 'ol)
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,9 +136,15 @@ If `org-store-link' was called with a prefix arg the meaning of
|
||||||
(`(nnvirtual . ,_)
|
(`(nnvirtual . ,_)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(car (nnvirtual-map-article (gnus-summary-article-number)))))
|
(car (nnvirtual-map-article (gnus-summary-article-number)))))
|
||||||
(`(nnir . ,_)
|
(`(,(or `nnselect `nnir) . ,_) ; nnir is for Emacs < 28.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(nnir-article-group (gnus-summary-article-number))))
|
(cond
|
||||||
|
((fboundp 'nnselect-article-group)
|
||||||
|
(nnselect-article-group (gnus-summary-article-number)))
|
||||||
|
((fboundp 'nnir-article-group)
|
||||||
|
(nnir-article-group (gnus-summary-article-number)))
|
||||||
|
(t
|
||||||
|
(error "No article-group variant bound")))))
|
||||||
(_ gnus-newsgroup-name)))
|
(_ gnus-newsgroup-name)))
|
||||||
(header (if (eq major-mode 'gnus-article-mode)
|
(header (if (eq major-mode 'gnus-article-mode)
|
||||||
;; When in an article, first move to summary
|
;; When in an article, first move to summary
|
||||||
|
|
Loading…
Reference in New Issue