Function: nnmairix-purge-old-groups

nnmairix-purge-old-groups is an interactive and byte-compiled function defined in nnmairix.el.gz.

Signature

(nnmairix-purge-old-groups &optional DONTASK SERVER)

Documentation

Delete mairix search groups which are no longer used.

You may want to call this from time to time if you are creating and deleting lots of nnmairix groups. If DONTASK is t, do not ask before deleting a group on the back end. SERVER specifies nnmairix server.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnmairix.el.gz
(defun nnmairix-purge-old-groups (&optional dontask server)
  "Delete mairix search groups which are no longer used.

You may want to call this from time to time if you are creating
and deleting lots of nnmairix groups.  If DONTASK is t, do not ask
before deleting a group on the back end.  SERVER specifies nnmairix server."
  (interactive)
  (let ((server (or server
		    (gnus-server-to-method (car (nnmairix-get-server))))))
    (if (nnmairix-open-server (nth 1 server))
	(when (nnmairix-call-backend
	       "request-list" nnmairix-backend-server)
	  (let (cur qualgroup) ;; folder
	    (with-current-buffer nntp-server-buffer
	      (goto-char (point-min))
	      (while (re-search-forward nnmairix-group-regexp (point-max) t)
		(setq cur (match-string 0)
		      qualgroup (gnus-group-prefixed-name
				 (match-string 1) server))
		(when (not (and (gnus-group-entry qualgroup)
				(string= cur
					 (gnus-group-get-parameter
					  qualgroup 'folder))))
		  (when (or dontask
			    (y-or-n-p
			     (concat "Delete group " cur
				     " on server " nnmairix-backend-server "? ")))
		    (nnmairix-call-backend
		     "request-delete-group" cur t nnmairix-backend-server)))))))
      (message "Couldn't open server %s" (nth 1 server)))))