From: <jari.aalto@poboxes.com> (Jari Aalto+list.ding)
Subject: patch: 5.6.38 gnus-uu, new regexp marking commands
Date: 22 Aug 1998 18:12:13 +0300 [thread overview]
Message-ID: <tbu335hwz6.fsf@blue.sea.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
Hi,
A day ago I subscribed to handfull of new mailing lists and when I
was away last night my procmail recipes sorted them to wrong folders.
so I had to move lot of mail from group to another.
The first command that come into my mind was
gnus-uu-mark-by-regexp
But it only matched subjects. I assumed it would match the
visible Summary line, but it didn't :-). There was nothing in common
in the subject lines that come from eg liserv XXX. However If I
matched against From field, then I could tag all the messages
coming from particular list and move then all to right group.
Here is the new functions that do that: They un/mark articles
that match From field. The patch is against 5.6.38. Feel free
to move the new keybinds to somewhere more appropriate.
jari
[-- Attachment #2: Type: text/plain, Size: 639 bytes --]
Sat Aug 22 17:56:04 1998 Jari Aalto <jari.aalto@poboxes.com>
* gnus-uu.el ((gnus-uu-mark-map "P" gnus-summary-mark-map)):
Added commands
"f" gnus-uu-mark-by-from-regexp
"F" gnus-uu-unmark-by-from-regexp
(gnus-uu-mark-by-from-regexp): New user function.
(gnus-uu-find-articles-matching): Added anew arg `data-flag'
Which may have other uses in the future. Curretly if flag
is set to non-nil, the matching list is generated by looking
at `from' fields. If flag is nil, then list is generated
by looking at `subject'.
(gnus-uu-find-articles-matching): variable changes
`list-of-subjects' --> `list' and `subject' --> `string'
[-- Attachment #3: gnus-uu.el.diff --]
[-- Type: text/plain, Size: 3108 bytes --]
Prereq: 1.1
===================================================================
RCS file: RCS/gnus-uu.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 1.1 1998/08/22 14:53:26
+++ 1.2 1998/08/22 15:01:27
@@ -356,6 +356,8 @@
"g" gnus-uu-unmark-region
"R" gnus-uu-mark-by-regexp
"G" gnus-uu-unmark-by-regexp
+ "f" gnus-uu-mark-by-from-regexp
+ "F" gnus-uu-unmark-by-from-regexp
"t" gnus-uu-mark-thread
"T" gnus-uu-unmark-thread
"a" gnus-uu-mark-all
@@ -578,6 +580,25 @@
(interactive (list (read-from-minibuffer "Mark (regexp): ")))
(gnus-uu-mark-by-regexp regexp t))
+
+(defun gnus-uu-mark-by-from-regexp (regexp &optional unmark)
+ "Ask for a regular expression and set the process mark on all articles that match `From'."
+ (interactive (list (read-from-minibuffer "Mark (From regexp): ")))
+ (let ((articles (gnus-uu-find-articles-matching regexp nil nil 'from)))
+ (while articles
+ (if unmark
+ (gnus-summary-remove-process-mark (pop articles))
+ (gnus-summary-set-process-mark (pop articles))))
+ (message ""))
+ (gnus-summary-position-point))
+
+
+(defun gnus-uu-unmark-by-from-regexp (regexp &optional unmark)
+ "Ask for a regular expression and remove the process mark on all articles that match `from' ."
+ (interactive (list (read-from-minibuffer "Mark (regexp): ")))
+ (gnus-uu-mark-by-from-regexp regexp t))
+
+
(defun gnus-uu-mark-series ()
"Mark the current series with the process mark."
(interactive)
@@ -1081,14 +1102,19 @@
(string< (car l1) (car l2)))
(defun gnus-uu-find-articles-matching
- (&optional subject only-unread do-not-translate)
+ (&optional subject only-unread do-not-translate data-flag)
;; Finds all articles that matches the regexp SUBJECT. If it is
;; nil, the current article name will be used. If ONLY-UNREAD is
;; non-nil, only unread articles are chosen. If DO-NOT-TRANSLATE is
;; non-nil, article names are not equalized before sorting.
+ ;;
+ ;; If DATA-FLAG is non-nil, match `from' gnus-data instead of `subject'
(let ((subject (or subject
(gnus-uu-reginize-string (gnus-summary-article-subject))))
- list-of-subjects)
+ list
+ from
+ string
+ )
(save-excursion
(if (not subject)
()
@@ -1104,16 +1130,21 @@
gnus-unread-mark)
(= mark gnus-ticked-mark)
(= mark gnus-dormant-mark))
- (setq subj (mail-header-subject (gnus-data-header d)))
- (string-match subject subj)
- (push (cons subj (gnus-data-number d))
- list-of-subjects))))
+ (cond
+ ((null data-flag)
+ (setq string (mail-header-subject (gnus-data-header d)))
+ (string-match subject string))
+ (t
+ (setq string (mail-header-from (gnus-data-header d)))
+ (string-match subject string)))
+ (push (cons string (gnus-data-number d))
+ list))))
;; Expand numbers, sort, and return the list of article
;; numbers.
(mapcar (lambda (sub) (cdr sub))
(sort (gnus-uu-expand-numbers
- list-of-subjects
+ list
(not do-not-translate))
'gnus-uu-string<))))))
next reply other threads:[~1998-08-22 15:12 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-22 15:12 Jari Aalto+list.ding [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-11-05 16:52 Feature req: import/export Group parameter or Server data Jari Aalto+list.ding
1998-10-20 18:26 Pterodactyl Gnus v0.36 is released Lars Magne Ingebrigtsen
1998-10-20 19:27 ` *Group* buffer disappearance (Re: Pterodactyl Gnus v0.36 is released) Lloyd Zusman
1998-10-21 2:58 ` I fixed it, but I need Lars ... (Was: *Group* buffer disappearance) Lloyd Zusman
1998-10-21 12:40 ` Hrvoje Niksic
1998-10-21 13:54 ` Lloyd Zusman
1998-10-21 14:22 ` Hrvoje Niksic
1998-10-21 14:55 ` Lloyd Zusman
1998-10-21 14:59 ` Hrvoje Niksic
1998-10-21 15:07 ` Lloyd Zusman
1998-10-21 15:10 ` Hrvoje Niksic
1998-10-21 15:17 ` Lloyd Zusman
1998-10-21 15:24 ` Hrvoje Niksic
1998-10-21 15:39 ` Lloyd Zusman
1998-10-21 15:48 ` Hrvoje Niksic
1998-10-21 15:56 ` Lee Willis
1998-10-22 13:10 ` Jari Aalto+list.ding
1998-10-11 6:48 compatibility request -- `q' in *Article* buffer shouldn't quit group SL Baur
1998-10-11 15:29 ` Lars Magne Ingebrigtsen
1998-10-11 17:11 ` Matt Simmons
1998-10-11 17:23 ` Hrvoje Niksic
1998-10-11 19:05 ` SL Baur
1998-10-11 19:11 ` Hrvoje Niksic
1998-10-11 20:40 ` SL Baur
1998-10-11 20:44 ` Hrvoje Niksic
1998-10-11 21:24 ` Karl Kleinpaste
1998-10-11 21:41 ` Hrvoje Niksic
1998-10-11 22:18 ` Kai Grossjohann
1998-10-12 10:08 ` Lloyd Zusman
1998-10-12 13:12 ` Lars Magne Ingebrigtsen
1998-10-12 22:17 ` Lloyd Zusman
1998-10-17 19:21 ` Lars Magne Ingebrigtsen
1998-10-12 13:39 ` Per Abrahamsen
1998-10-12 14:01 ` Jari Aalto+list.ding
1998-10-11 22:13 ` Kai Grossjohann
[not found] ` <6f7ly7i16q.fsf@dna.lth.se>
1998-10-11 15:41 ` Michael Harnois
1998-10-11 15:50 ` Hrvoje Niksic
1998-10-11 16:34 ` Michael Harnois
[not found] ` <6fiuhrgkq1.fsf@dna.lth.se>
1998-10-11 16:36 ` Michael Harnois
1998-10-11 17:08 ` Lars Magne Ingebrigtsen
1998-10-11 17:35 ` Hrvoje Niksic
1998-10-11 17:57 ` Lars Magne Ingebrigtsen
1998-10-11 18:28 ` Julian Assange
1998-09-08 16:08 Patch: be verbose if POP3 setup is not ok Jari Aalto+list.ding
1998-09-03 15:57 Suggestion: to problem nndraft "Can't select group" Jari Aalto+list.ding
1998-09-03 17:10 ` David S. Goldberg
1998-09-03 17:31 ` Jari Aalto+list.ding
1998-09-02 13:26 Hallvard's gnus-e20/19.34/Pgnus 0.13 emulation (backtrace included) Jari Aalto+list.ding
1998-08-24 22:12 Suggestion: Topic mode get news and topic group indentation level Jari Aalto+list.ding
1998-08-21 15:49 Suggestion: *Group* SPC to show only new articles? Jari Aalto+list.ding
1998-08-21 9:35 pop3 reading with gnus? jari.aalto
1998-08-21 9:56 ` Jean-Yves Perrier
1998-08-21 10:09 ` Jari Aalto+list.ding
1998-08-20 20:29 5.6.38 Can't read drafts server? Jari Aalto+list.ding
1998-08-19 15:57 Suggestion: Command to rename all Subejcts in thread Jari Aalto+list.ding
1998-08-17 9:04 Master or slave?? Andy Eskilsson
[not found] ` <6flnooezsi.fsf@bavur.dna.lth.se>
1998-08-17 11:27 ` Jari Aalto+list.ding
1998-08-17 14:44 ` Andy Eskilsson
1998-08-15 19:37 Marking new unread articles differently? Matt Simmons
1998-08-15 20:43 ` Lars Magne Ingebrigtsen
1998-08-15 21:03 ` SL Baur
1998-08-15 22:40 ` Lars Magne Ingebrigtsen
1998-08-15 21:14 ` Harry Putnam
1998-08-25 6:23 ` Matt Simmons
1998-08-15 21:20 ` Eze Ogwuma
1998-08-16 6:05 ` Mike McEwan
1998-08-16 18:30 ` Jari Aalto+list.ding
1998-08-13 14:39 request: commands for subsribe/unsubsribe from/to mailing lists Jari Aalto+list.ding
[not found] ` <jari.aalto@poboxes.com>
1998-08-13 16:35 ` Jason L Tibbitts III
1998-08-13 16:56 ` Lars Magne Ingebrigtsen
1998-08-13 18:27 ` William M. Perry
1998-08-19 17:30 ` Christopher Davis
1998-08-13 16:41 ` Lars Magne Ingebrigtsen
1998-08-13 17:21 ` Bud Rogers
1998-08-17 13:06 ` Master or slave?? Lars Magne Ingebrigtsen
1998-08-19 0:52 ` Marking new unread articles differently? Mike McEwan
1998-08-20 21:23 ` Lars Magne Ingebrigtsen
1998-08-21 17:11 ` Mike McEwan
1998-08-21 19:15 ` Lars Magne Ingebrigtsen
1998-08-25 6:25 ` Matt Simmons
1998-08-26 3:46 ` Mike McEwan
1998-08-20 1:26 ` Suggestion: Command to rename all Subejcts in thread Lars Magne Ingebrigtsen
1998-08-20 8:46 ` Jari Aalto+list.ding
1998-08-20 19:41 ` Lars Magne Ingebrigtsen
1998-08-20 21:19 ` 5.6.38 Can't read drafts server? Lars Magne Ingebrigtsen
1998-08-21 6:38 ` Jari Aalto+list.ding
1998-08-21 11:52 ` Karl Kleinpaste
1998-08-21 19:09 ` Lars Magne Ingebrigtsen
1998-08-23 21:20 ` Jari Aalto+list.ding
1998-08-21 19:10 ` pop3 reading with gnus? Lars Magne Ingebrigtsen
1998-08-21 20:05 ` William M. Perry
1998-08-21 19:13 ` Suggestion: *Group* SPC to show only new articles? Lars Magne Ingebrigtsen
1998-08-22 20:57 ` patch: 5.6.38 gnus-uu, new regexp marking commands Lars Magne Ingebrigtsen
1998-08-24 7:30 ` Suggestion: *Group* SPC to show only new articles? Kai Grossjohann
1998-08-24 8:37 ` Jari Aalto+list.ding
1998-08-24 8:48 ` Kai Grossjohann
1998-08-24 10:10 ` Jari Aalto+list.ding
1998-08-24 11:41 ` Kai Grossjohann
1998-08-24 12:20 ` Francisco Solsona
1998-08-24 14:38 ` Mike McEwan
1998-08-25 5:55 ` 5.6.38 Can't read drafts server? Lars Magne Ingebrigtsen
1998-08-25 13:05 ` Jari Aalto+list.ding
1998-08-25 6:11 ` Suggestion: Topic mode get news and topic group indentation level Lars Magne Ingebrigtsen
1998-09-02 14:34 ` Hallvard's gnus-e20/19.34/Pgnus 0.13 emulation (backtrace included) Hrvoje Niksic
1998-09-02 14:35 ` Lars Magne Ingebrigtsen
1998-09-03 21:03 ` Suggestion: to problem nndraft "Can't select group" Lars Magne Ingebrigtsen
1998-09-08 19:38 ` Patch: be verbose if POP3 setup is not ok Lars Magne Ingebrigtsen
1998-09-08 21:04 ` Jari Aalto+list.ding
1998-09-09 11:35 ` Per Abrahamsen
1998-09-09 13:07 ` Jari Aalto+list.ding
1998-10-12 14:07 ` compatibility request -- `q' in *Article* buffer shouldn't quit group Hrvoje Niksic
1998-10-13 12:54 ` Robert Pluim
1998-10-22 13:16 ` I fixed it, but I need Lars ... (Was: *Group* buffer disappearance) Hrvoje Niksic
1998-11-05 18:27 ` Feature req: import/export Group parameter or Server data Simon Josefsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tbu335hwz6.fsf@blue.sea.net \
--to=jari.aalto@poboxes.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).