* patch proposed: gnus-summary-limit-to-from-to
@ 2007-05-28 16:34 Loic Dachary
2007-05-29 3:51 ` Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Loic Dachary @ 2007-05-28 16:34 UTC (permalink / raw)
To: ding
Hi,
I wanted to see all mails from OR to a someone. With
gnus-summary-limit-to-from-to one can see all mails coming from
or sent to yves.guiard (for instance ;-)
The patch is against
No Gnus v0.6
GNU Emacs 22.0.99.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2007-05-01 on pacem, modified by Debian
When added to .emacs it can be bound to / f using:
(define-key gnus-summary-limit-map (kbd "f") 'gnus-summary-limit-to-from-to)
Cheers,
diff -r 01fe29f10b77 gnus-sum.el
--- a/gnus-sum.el Mon May 28 17:01:17 2007 +0200
+++ b/gnus-sum.el Mon May 28 18:11:06 2007 +0200
@@ -1787,6 +1787,7 @@ increase the score of each group you rea
"w" gnus-summary-pop-limit
"s" gnus-summary-limit-to-subject
"a" gnus-summary-limit-to-author
+ "f" gnus-summary-limit-to-from-to
"u" gnus-summary-limit-to-unread
"m" gnus-summary-limit-to-marks
"M" gnus-summary-limit-exclude-marks
@@ -7800,6 +7801,23 @@ If NOT-MATCHING, excluding articles that
(gnus-summary-limit articles))
(gnus-summary-position-point))))
+(defun gnus-summary-limit-to-from-to (fromto &optional ignored ig)
+ "Limit the summary buffer to articles that have from or to header that match a regexp.
+If NOT-MATCHING, excluding articles that have from or to header that match a regexp."
+ (interactive
+ (list (read-string "Limit to from/to (regexp): ")
+ nil current-prefix-arg))
+ (when (not (equal "" fromto))
+ (prog1
+ (let ((articles-from (gnus-summary-find-matching
+ "from" fromto 'all nil nil nil))
+ (articles-to (gnus-summary-find-matching
+ (cons 'extra 'To) fromto 'all nil nil nil)))
+ (unless (or articles-from articles-to)
+ (error "Found no matches for \"%s\"" fromto))
+ (gnus-summary-limit (gnus-sorted-nunion articles-from articles-to)))
+ (gnus-summary-position-point))))
+
(defun gnus-summary-limit-to-author (from &optional not-matching)
"Limit the summary buffer to articles that have authors that match a regexp.
If NOT-MATCHING, excluding articles that have authors that match a regexp."
--
+33 1 76 60 72 81 Loic Dachary mailto:loic@dachary.org
http://dachary.org/loic/gpg.txt sip:loic@dachary.org
Latitude: 48.86962325498033 Longitude: 2.3623046278953552
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-28 16:34 patch proposed: gnus-summary-limit-to-from-to Loic Dachary
@ 2007-05-29 3:51 ` Katsumi Yamaoka
2007-05-29 5:52 ` Reiner Steib
2007-05-29 9:17 ` Loic Dachary
0 siblings, 2 replies; 9+ messages in thread
From: Katsumi Yamaoka @ 2007-05-29 3:51 UTC (permalink / raw)
To: Loic Dachary; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
>>>>> In <87hcpwkiur.fsf@call.dachary.org> Loic Dachary wrote:
> I wanted to see all mails from OR to a someone. With
> gnus-summary-limit-to-from-to one can see all mails coming from
> or sent to yves.guiard (for instance ;-)
Isn't it better to be `gnus-summary-limit-to-from-to-cc'? In
addition, isn't there a use of excluding ones matching a regexp?
;-)
> +(defun gnus-summary-limit-to-from-to (fromto &optional ignored ig)
> + "Limit the summary buffer to articles that have from or to header that match a regexp.
> +If NOT-MATCHING, excluding articles that have from or to header that match a regexp."
I tried improving it modifying `gnus-summary-limit-to-recipient'.
[-- Attachment #2: Type: application/emacs-lisp, Size: 1688 bytes --]
[-- Attachment #3: Type: text/plain, Size: 33 bytes --]
How about adding it to No Gnus?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 3:51 ` Katsumi Yamaoka
@ 2007-05-29 5:52 ` Reiner Steib
2007-05-29 9:17 ` Loic Dachary
1 sibling, 0 replies; 9+ messages in thread
From: Reiner Steib @ 2007-05-29 5:52 UTC (permalink / raw)
To: ding
On Tue, May 29 2007, Katsumi Yamaoka wrote:
> Isn't it better to be `gnus-summary-limit-to-from-to-cc'? In
> addition, isn't there a use of excluding ones matching a regexp?
[...]
> I tried improving it modifying `gnus-summary-limit-to-recipient'.
[...]
> How about adding it to No Gnus?
If you didn't take code from Loic's suggestion, please add it.
Otherwise we might need papers from Loic.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 3:51 ` Katsumi Yamaoka
2007-05-29 5:52 ` Reiner Steib
@ 2007-05-29 9:17 ` Loic Dachary
2007-05-29 9:57 ` Katsumi Yamaoka
1 sibling, 1 reply; 9+ messages in thread
From: Loic Dachary @ 2007-05-29 9:17 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> I tried improving it modifying `gnus-summary-limit-to-recipient'.
Cool. However, it says Cc is not in nnmail-extra-headers (no-gnus 0.6)
--
+33 1 76 60 72 81 Loic Dachary mailto:loic@dachary.org
http://dachary.org/loic/gpg.txt sip:loic@dachary.org
Latitude: 48.86962325498033 Longitude: 2.3623046278953552
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 9:17 ` Loic Dachary
@ 2007-05-29 9:57 ` Katsumi Yamaoka
2007-05-29 11:32 ` Loic Dachary
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2007-05-29 9:57 UTC (permalink / raw)
To: Loic Dachary; +Cc: ding
>>>>> In <87bqg4j8e4.fsf@call.dachary.org> Loic Dachary wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> I tried improving it modifying `gnus-summary-limit-to-recipient'.
> Cool. However, it says Cc is not in nnmail-extra-headers (no-gnus 0.6)
Yes, it does. Because the default value of `nnmail-extra-headers'
is `(To Newsgroups)'. Although we can make this command silence
even if `nnmail-extra-headers' doesn't have `Cc', I believe
checking the Cc header is indispensable to make this feature work
perfectly. So, I wrote in the doc string as follows:
,----
| To, Cc and From headers are checked. You need to include `To' and `Cc'
| in `nnmail-extra-headers'.
`----
The `gnus-summary-limit-to-recipient' command requires it, too.
The related info sections are (type `C-x C-e' at the end of each
line):
(info "(gnus)To From Newsgroups")
(info "(gnus)Scoring On Other Headers")
If you are a nnml user and add `Cc' to `nnmail-extra-headers',
you need rebuilding the NOV databases. To do that, type:
M-x nnml-generate-nov-databases RET
Please note, it takes a looooooong time and needs extra space in
the disk.
Regards,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 9:57 ` Katsumi Yamaoka
@ 2007-05-29 11:32 ` Loic Dachary
2007-05-29 12:06 ` Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Loic Dachary @ 2007-05-29 11:32 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> If you are a nnml user and add `Cc' to `nnmail-extra-headers',
> you need rebuilding the NOV databases. To do that, type:
>
> M-x nnml-generate-nov-databases RET
Great :-) Works. Nice.
--
+33 1 76 60 72 81 Loic Dachary mailto:loic@dachary.org
http://dachary.org/loic/gpg.txt sip:loic@dachary.org
Latitude: 48.86962325498033 Longitude: 2.3623046278953552
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 11:32 ` Loic Dachary
@ 2007-05-29 12:06 ` Katsumi Yamaoka
2007-05-29 12:16 ` Loic Dachary
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2007-05-29 12:06 UTC (permalink / raw)
To: Loic Dachary; +Cc: ding
>>>>> In <874plv50gt.fsf@call.dachary.org> Loic Dachary wrote:
>> M-x nnml-generate-nov-databases RET
> Great :-) Works. Nice.
Thank you for testing. I've added `gnus-summary-limit-to-address'
to the Gnus CVS trunk and bound the `/ A' key to it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 12:06 ` Katsumi Yamaoka
@ 2007-05-29 12:16 ` Loic Dachary
2007-05-29 12:27 ` Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Loic Dachary @ 2007-05-29 12:16 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>>> In <874plv50gt.fsf@call.dachary.org> Loic Dachary wrote:
>
>>> M-x nnml-generate-nov-databases RET
>
>> Great :-) Works. Nice.
>
> Thank you for testing. I've added `gnus-summary-limit-to-address'
> to the Gnus CVS trunk and bound the `/ A' key to it.
I'll stick to / A while waiting for the next release.
Cheers,
--
+33 1 76 60 72 81 Loic Dachary mailto:loic@dachary.org
http://dachary.org/loic/gpg.txt sip:loic@dachary.org
Latitude: 48.86962325498033 Longitude: 2.3623046278953552
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: patch proposed: gnus-summary-limit-to-from-to
2007-05-29 12:16 ` Loic Dachary
@ 2007-05-29 12:27 ` Katsumi Yamaoka
0 siblings, 0 replies; 9+ messages in thread
From: Katsumi Yamaoka @ 2007-05-29 12:27 UTC (permalink / raw)
To: Loic Dachary; +Cc: ding
>>>>> In <87k5ur3jw0.fsf@call.dachary.org> Loic Dachary wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> Thank you for testing. I've added `gnus-summary-limit-to-address'
>> to the Gnus CVS trunk and bound the `/ A' key to it.
> I'll stick to / A while waiting for the next release.
Er, I found that the `gnus-summary-limit-to-headers' command
(`/ h') works similarly, though it checks all headers and
requires fetching articles (not only headers).
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-29 12:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-28 16:34 patch proposed: gnus-summary-limit-to-from-to Loic Dachary
2007-05-29 3:51 ` Katsumi Yamaoka
2007-05-29 5:52 ` Reiner Steib
2007-05-29 9:17 ` Loic Dachary
2007-05-29 9:57 ` Katsumi Yamaoka
2007-05-29 11:32 ` Loic Dachary
2007-05-29 12:06 ` Katsumi Yamaoka
2007-05-29 12:16 ` Loic Dachary
2007-05-29 12:27 ` Katsumi Yamaoka
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).