unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Set process mark according to author
       [not found] ` <87zj63vjpm.fsf@debian.uxu>
@ 2015-04-19 22:46   ` Emanuel Berg
  0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2015-04-19 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

>> Did someone ever hack a function to set the process
>> mark on all messages from a given author ?
>> Right now when I want to remove/copy all messages
>> from an author, I use gnus-summary-limit-to-author,
>> mark all messages in the buffer, do whatever I want
>> with them, then pop the limit to get back to the
>> original summary. It's taking a lot of
>> keystrokes...
>
> Try this. In the summary buffer, hit M-:, then type
>
>     (gnus-kill "From" "Joe Hacker" '(gnus-summary-mark-as-processable 1) t)
>
> If it works do a defun wrapper which only accepts
> a name and inserts that instead of "Joe Hacker".
> Or even better, do a defun that pulls this name from
> the message at point.

This works:

(defun process-sender (sender)
  (gnus-kill "From" sender '(gnus-summary-mark-as-processable 1) t) )

(defun process-sender-at-point ()
  (interactive)
  (save-window-excursion          ; better way 
    (gnus-summary-select-article) ; to do this?
    (let ((sender (gnus-article-header-value "From")))
      (process-sender sender) )))

I crosspost this to gnu.emacs.help - perhaps someone
there knows how to set the article in the summary
buffer but without brining it up visually, which would
un-necessitate the use of `save-window-excursion'...

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-19 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1091.1429448493.904.info-gnus-english@gnu.org>
     [not found] ` <87zj63vjpm.fsf@debian.uxu>
2015-04-19 22:46   ` Set process mark according to author Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).