* Re: Set process mark according to author
[not found] <mailman.1091.1429448493.904.info-gnus-english@gnu.org>
@ 2015-04-19 22:25 ` Emanuel Berg
2015-04-19 22:46 ` Emanuel Berg
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-04-19 22:25 UTC (permalink / raw)
To: info-gnus-english
Julien Cubizolles <j.cubizolles@free.fr> 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.
--
underground experts united
http://user.it.uu.se/~embe8573
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Set process mark according to author
2015-04-19 22:25 ` Set process mark according to author Emanuel Berg
@ 2015-04-19 22:46 ` Emanuel Berg
2015-04-20 7:32 ` Julien Cubizolles
[not found] ` <mailman.1160.1429515196.904.info-gnus-english@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-04-19 22:46 UTC (permalink / raw)
To: info-gnus-english
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
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Set process mark according to author
2015-04-19 22:25 ` Set process mark according to author Emanuel Berg
2015-04-19 22:46 ` Emanuel Berg
@ 2015-04-20 7:32 ` Julien Cubizolles
[not found] ` <mailman.1160.1429515196.904.info-gnus-english@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Julien Cubizolles @ 2015-04-20 7:32 UTC (permalink / raw)
To: info-gnus-english
Emanuel Berg <embe8573@student.uu.se> writes:
> 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) )))
Indeed it does. I just had to define:
--8<---------------cut here---------------start------------->8---
(defun gnus-article-header-value (header)
"Get the value of HEADER for the current article."
(with-current-buffer gnus-original-article-buffer
(gnus-fetch-field header) ))
--8<---------------cut here---------------end--------------->8---
which seems to be a custom function of yours.
Thanks,
Julien.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Set process mark according to author
[not found] ` <mailman.1160.1429515196.904.info-gnus-english@gnu.org>
@ 2015-04-20 21:08 ` Emanuel Berg
0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-04-20 21:08 UTC (permalink / raw)
To: info-gnus-english
Julien Cubizolles <j.cubizolles@free.fr> writes:
>> This works ... process-sender
>
> Indeed it does. I just had to define ...
>
> gnus-article-header-value ...
>
> which seems to be a custom function of yours.
Oh! Good digging.
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 5+ messages in thread
* Set process mark according to author
@ 2015-04-19 13:01 Julien Cubizolles
0 siblings, 0 replies; 5+ messages in thread
From: Julien Cubizolles @ 2015-04-19 13:01 UTC (permalink / raw)
To: info-gnus-english
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...
Julien.
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-20 21:08 UTC | newest]
Thread overview: 5+ messages (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>
2015-04-19 22:25 ` Set process mark according to author Emanuel Berg
2015-04-19 22:46 ` Emanuel Berg
2015-04-20 7:32 ` Julien Cubizolles
[not found] ` <mailman.1160.1429515196.904.info-gnus-english@gnu.org>
2015-04-20 21:08 ` Emanuel Berg
2015-04-19 13:01 Julien Cubizolles
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 NNTP newsgroup(s).