emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/gnus-select2 73c0da2 27/32: Improve search and sel


From: Andrew G Cohen
Subject: [Emacs-diffs] feature/gnus-select2 73c0da2 27/32: Improve search and select group creation
Date: Sun, 16 Dec 2018 06:54:05 -0500 (EST)

branch: feature/gnus-select2
commit 73c0da2b37d7f2caf83a1208de79fa6d0f9d6650
Author: Andrew G Cohen <address@hidden>
Commit: Andrew G Cohen <address@hidden>

    Improve search and select group creation
    
    * lisp/gnus/gnus-group.el (gnus-group-make-search-group): Make sure
    new group is inserted into the group buffer.
    * lisp/gnus/nnselect.el (nnselect-request-create-group): Improve input
    of selection function.
---
 lisp/gnus/gnus-group.el | 23 ++++++++++++-----------
 lisp/gnus/nnselect.el   |  2 +-
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 18ed054..41c0760 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -3209,17 +3209,18 @@ mail messages or news articles in files that have 
numeric names."
 ;; Temporary to make group creation easier
 (defun gnus-group-make-search-group (nnir-extra-parms &optional specs)
   (interactive "P")
-  (let ((name (read-string "Group name: " nil)))
-    (gnus-group-make-group
-     name
-     (list 'nnselect "nnselect")
-     nil
-     (list
-      (cons 'nnselect-specs
-           (list
-            (cons 'nnselect-function 'nnir-run-query)
-            (cons 'nnselect-args
-                  (nnir-make-specs nnir-extra-parms specs))))))))
+  (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
+             (list
+              (cons 'nnselect-function 'nnir-run-query)
+              (cons 'nnselect-args
+                    (nnir-make-specs nnir-extra-parms specs)))))))))
 
 (defun gnus-group-read-ephemeral-search-group (nnir-extra-parms        
&optional specs)
   "Create an nnselect group based on a search.  Prompt for a
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index 793775f..132f9dd 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -586,7 +586,7 @@ If this variable is nil, or if the provided function 
returns nil,
          (specs (assq 'nnselect-specs args))
          (function-spec
           (or  (alist-get 'nnselect-function specs)
-              (read-from-minibuffer "Function: " nil nil t)))
+              (intern (completing-read "Function: " obarray #'functionp))))
          (args-spec
           (or  (alist-get 'nnselect-args specs)
                (read-from-minibuffer "Args: " nil nil t nil "nil")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]