diff options
author | Andrew G Cohen <cohen@andy.bu.edu> | 2020-09-09 09:58:39 +0800 |
---|---|---|
committer | Andrew G Cohen <cohen@andy.bu.edu> | 2020-09-09 09:58:39 +0800 |
commit | c50643cebd762ca77c6f2bc90264e4ef04dcb43d (patch) | |
tree | a02e8a6e6bae58620c1fb4b6856e7a966c00f65d /lisp | |
parent | 45c0bbb9215eacf9627478a0d60bfb3b716bf657 (diff) | |
download | emacs-c50643cebd762ca77c6f2bc90264e4ef04dcb43d.tar.gz emacs-c50643cebd762ca77c6f2bc90264e4ef04dcb43d.tar.bz2 emacs-c50643cebd762ca77c6f2bc90264e4ef04dcb43d.zip |
Add Gnus function to make a persistent group from a search result
* lisp/gnus/gnus-sum.el (gnus-summary-make-group-from-search): New
command (bound to C-c C-p in summary buffers).
* doc/misc/gnus.texi (What is nnir?): Document it. Correct previous
errors.
* etc/NEWS (Gnus): Mention it.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/gnus-sum.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 80427434bd7..45397b518c6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -87,6 +87,7 @@ (autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t) (autoload 'nnselect-article-rsv "nnselect" nil nil) (autoload 'nnselect-article-group "nnselect" nil nil) +(autoload 'gnus-nnselect-group-p "nnselect" nil nil) (defcustom gnus-kill-summary-on-exit t "If non-nil, kill the summary buffer when you exit from it. @@ -1989,6 +1990,7 @@ increase the score of each group you read." "\M-K" gnus-summary-edit-global-kill ;; "V" gnus-version "\C-c\C-d" gnus-summary-describe-group + "\C-c\C-p" gnus-summary-make-group-from-search "q" gnus-summary-exit "Q" gnus-summary-exit-no-update "\C-c\C-i" gnus-info-find-node @@ -7120,6 +7122,21 @@ The prefix argument ALL means to select all articles." (setq info (copy-sequence (gnus-get-info group)) info (delq (gnus-info-params info) info)))))))))) +(defun gnus-summary-make-group-from-search () + "Make a persistent group from the current ephemeral search group." + (interactive) + (if (not (gnus-nnselect-group-p gnus-newsgroup-name)) + (gnus-message 3 "%s is not a search group" gnus-newsgroup-name) + (let ((name (gnus-read-group "Group name: "))) + (with-current-buffer gnus-group-buffer + (gnus-group-make-group + name + (list 'nnselect "nnselect") + nil + (list (cons 'nnselect-specs + (gnus-group-get-parameter gnus-newsgroup-name + 'nnselect-specs t)))))))) + (defun gnus-summary-save-newsrc (&optional force) "Save the current number of read/marked articles in the dribble buffer. The dribble buffer will then be saved. |