info-gnus-english
[Top][All Lists]
Advanced

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

Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")


From: Bob Newell
Subject: Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")
Date: Thu, 21 Jan 2021 10:20:24 -1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

>> I don't do splitting but I do use the following to delete Gmail
>>
>> (gnus-summary-move-article nil "nnimap+imap.gmail.com:[Gmail]/Trash" nil)
> Hello,
> unfortunately i dont understand.
> Is it an configure option an your .gnus file?
> Or a split line?
> Could you please describe a little bit more.

I wrap this line of code in a little function to delete
(actually move Trash) a mail item. The item deleted is either
the one point is on in the Summary Buffer (which must be the
current buffer) or, if the Summary Buffer has items processed
marked, it trashes all of the marked ones.

It's not a split line. I don't split in Gnus. In my workflow,
there's no reason for me not to let Gmail apply labels and
avoid the overhead of splitting in Gnus, although then I do
add the overhead of using IMAP to fetch multiple Gmail groups.

However if you want to split and then delete all your Inbox in
Gmail, there should be some sort of hook to call a function
after splitting (I don't offhand know what it is as once
again, I don't split in Gnus).

Here is my full function for deleting EVERYTHING from a
Summary Buffer. If you bring up the Gmail Inbox in a Summary
Buffer, you can move it all to Trash. This will get it out of
All Mail. (This could be dangerous! I have a confirmation,
which you would want to remove if you fully automate this.)

In summary:

1. Do your split (to non-Gmail groups).
2. Bring up Gmail INBOX in a Summary Buffer.
3. Call this function.

(Note: I am not responsible for lost information, use at your
own risk!)

;;; Trash all.
    (defun rjn-gnus-trash-all () (interactive)
      (if (yes-or-no-p "Really trash everything")
           (if (eq major-mode 'gnus-summary-mode)
          (progn
            (setq-local gnus-show-threads nil)
            (gnus-uu-mark-buffer)
         (gnus-summary-move-article nil "nnimap+imap.gmail.com:[Gmail]/Trash" 
nil))
        (message "Must be in summary buffer"))))

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



reply via email to

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