Hi, Do any other mu-users have lisp code they might share to do batch tagging/re-tagging of the X-Keywords? I'd LOVE to be able to just sync All Mail & quickly retag lots of messages to Archive or multiple other tags.
I wasn't able to make the mu4e-headers-for-each code example work for me - likely due to my poor lisping than anything else! Thanks in advance. On Wed, Oct 9, 2013 at 3:47 PM, Herschel Krustofsky <[email protected]> wrote: > Hi all, > > Can anyone share working code for batch changing X-Keywords here? I'm > thrilled with using Abdo's patched offlineimap to just work with All Mail, > but I'd like to be able to both do one click refile to remove the \Inbox tag > as well as select items with INS and then refile, or even better, make the > X-Keyword/tag manipulation the equal of moving folders. > > Herschel > > On Saturday, January 26, 2013 1:53:59 AM UTC-8, djcb wrote: >> >> Hi Kai, >> >> On Fri, Jan 25 2013, Kai Arzheimer wrote: >> >> > Dear all, >> > >> > I'm using mu4e with gmail using Abdo's patched offlineimap that >> > translates >> > gmail labels into tags/X-keywords and vice versa, syncing only All Mail. >> > This is already very close to my ideal emacs/gmail setup - thanks to >> > everybody involved! >> > >> > I realised that I can very efficiently delete messages from gmail by >> > setting the \Trash tag/label, as only the new tag and not the whole >> > message >> > is updated (much better than syncing the trash folder, as my uplink is >> > slow). What I don't understand, however, is how I can apply the \Trash >> > (or >> > in fact any other tag) to a whole bunch of messages in on go using >> > marks. >> > As far as I can see, operations on marks use the docids, whereas actions >> > need the full msg structure. Am I missing something obvious? >> >> It's possible; but would require a bit of elisp, I think. >> >> One way to do it might be to mark the messages you want to tag with >> deferred marks (the ones you get with <Insert>), and then iterate over >> them (mu4e-headers-for-each). >> >> (defun my-tag-marked-message () >> "Do something with all marked messages." >> (interactive) >> (mu4e-headers-for-each >> (lambda (msg) >> (when (mu4e-mark-docid-marked-p (mu4e-message-field msg :docid)) >> ;; <tag this message> >> )))) >> >> Of course <tag this message> could be any function, it doesn't have to >> be related to tagging at all. >> >> I think it could be done in a bit nicer way with a bit more support from >> mu4e, but this should work now. >> >> Best wishes, >> Dirk. >> >> >> -- >> Dirk-Jan C. Binnema Helsinki, Finland >> e:[email protected] w:www.djcbsoftware.nl >> pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C > > -- > You received this message because you are subscribed to the Google Groups > "mu-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
