help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Delete emails of my Gmail account which doesn't relevant to me.


From: Emanuel Berg
Subject: Re: Delete emails of my Gmail account which doesn't relevant to me.
Date: Sun, 27 Jun 2021 06:42:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> (defun gnus-summary-respool-all ()
>   (interactive)
>   (let ((lines (count-lines (point-min) (point-max))))
>     (goto-char (point-min))
>     (gnus-summary-respool-article lines
>      (gnus-find-method-for-group "nnml:mail.misc") )))

Hm, this maybe a better interface ...

Tricky with optional args - interactive/non-interactive -
region/no region - that's the way it should look?

(defun gnus-summary-respool-all (&optional beg end)
  (interactive (when (use-region-p)
                 (list (region-beginning) (region-end)) ))
  (let*((b (or beg (point-min)))
        (e (or end (point-max)))
        (lines (count-lines b e)) )
    (goto-char b)
    (gnus-summary-respool-article
       lines
       (gnus-find-method-for-group "nnml:mail.misc") )))

https://dataswamp.org/~incal/emacs-init/gnus/summary.el

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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