Mercurial > emacs
comparison lisp/mail/rmailsort.el @ 16348:2cf33d3c5540
Add many autoload cookies.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 27 Sep 1996 00:33:39 +0000 |
parents | 48efd0c5b5dc |
children | 18b8f50567b2 |
comparison
equal
deleted
inserted
replaced
16347:d710d3502336 | 16348:2cf33d3c5540 |
---|---|
1 ;;; rmailsort.el --- Rmail: sort messages. | 1 ;;; rmailsort.el --- Rmail: sort messages. |
2 | 2 |
3 ;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> | 5 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> |
6 ;; Version: $Header: /home/gd/gnu/emacs/19.0/lisp/RCS/rmailsort.el,v 1.23 1996/01/14 14:30:11 kwzh Exp kwzh $ | 6 ;; Version: $Header: /home/fsf/rms/e19/lisp/RCS/rmailsort.el,v 1.24 1996/01/20 07:41:37 kwzh Exp rms $ |
7 ;; Keywords: mail | 7 ;; Keywords: mail |
8 | 8 |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 | 10 |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
32 | 32 |
33 (autoload 'timezone-make-date-sortable "timezone") | 33 (autoload 'timezone-make-date-sortable "timezone") |
34 | 34 |
35 ;; Sorting messages in Rmail buffer | 35 ;; Sorting messages in Rmail buffer |
36 | 36 |
37 ;;;###autoload | |
37 (defun rmail-sort-by-date (reverse) | 38 (defun rmail-sort-by-date (reverse) |
38 "Sort messages of current Rmail file by date. | 39 "Sort messages of current Rmail file by date. |
39 If prefix argument REVERSE is non-nil, sort them in reverse order." | 40 If prefix argument REVERSE is non-nil, sort them in reverse order." |
40 (interactive "P") | 41 (interactive "P") |
41 (rmail-sort-messages reverse | 42 (rmail-sort-messages reverse |
42 (function | 43 (function |
43 (lambda (msg) | 44 (lambda (msg) |
44 (rmail-make-date-sortable | 45 (rmail-make-date-sortable |
45 (rmail-fetch-field msg "Date")))))) | 46 (rmail-fetch-field msg "Date")))))) |
46 | 47 |
48 ;;;###autoload | |
47 (defun rmail-sort-by-subject (reverse) | 49 (defun rmail-sort-by-subject (reverse) |
48 "Sort messages of current Rmail file by subject. | 50 "Sort messages of current Rmail file by subject. |
49 If prefix argument REVERSE is non-nil, sort them in reverse order." | 51 If prefix argument REVERSE is non-nil, sort them in reverse order." |
50 (interactive "P") | 52 (interactive "P") |
51 (rmail-sort-messages reverse | 53 (rmail-sort-messages reverse |
56 ;; Remove `Re:' | 58 ;; Remove `Re:' |
57 (if (string-match "^\\(re:[ \t]*\\)*" key) | 59 (if (string-match "^\\(re:[ \t]*\\)*" key) |
58 (substring key (match-end 0)) | 60 (substring key (match-end 0)) |
59 key)))))) | 61 key)))))) |
60 | 62 |
63 ;;;###autoload | |
61 (defun rmail-sort-by-author (reverse) | 64 (defun rmail-sort-by-author (reverse) |
62 "Sort messages of current Rmail file by author. | 65 "Sort messages of current Rmail file by author. |
63 If prefix argument REVERSE is non-nil, sort them in reverse order." | 66 If prefix argument REVERSE is non-nil, sort them in reverse order." |
64 (interactive "P") | 67 (interactive "P") |
65 (rmail-sort-messages reverse | 68 (rmail-sort-messages reverse |
68 (downcase ;Canonical name | 71 (downcase ;Canonical name |
69 (mail-strip-quoted-names | 72 (mail-strip-quoted-names |
70 (or (rmail-fetch-field msg "From") | 73 (or (rmail-fetch-field msg "From") |
71 (rmail-fetch-field msg "Sender") ""))))))) | 74 (rmail-fetch-field msg "Sender") ""))))))) |
72 | 75 |
76 ;;;###autoload | |
73 (defun rmail-sort-by-recipient (reverse) | 77 (defun rmail-sort-by-recipient (reverse) |
74 "Sort messages of current Rmail file by recipient. | 78 "Sort messages of current Rmail file by recipient. |
75 If prefix argument REVERSE is non-nil, sort them in reverse order." | 79 If prefix argument REVERSE is non-nil, sort them in reverse order." |
76 (interactive "P") | 80 (interactive "P") |
77 (rmail-sort-messages reverse | 81 (rmail-sort-messages reverse |
81 (mail-strip-quoted-names | 85 (mail-strip-quoted-names |
82 (or (rmail-fetch-field msg "To") | 86 (or (rmail-fetch-field msg "To") |
83 (rmail-fetch-field msg "Apparently-To") "") | 87 (rmail-fetch-field msg "Apparently-To") "") |
84 )))))) | 88 )))))) |
85 | 89 |
90 ;;;###autoload | |
86 (defun rmail-sort-by-correspondent (reverse) | 91 (defun rmail-sort-by-correspondent (reverse) |
87 "Sort messages of current Rmail file by other correspondent. | 92 "Sort messages of current Rmail file by other correspondent. |
88 If prefix argument REVERSE is non-nil, sort them in reverse order." | 93 If prefix argument REVERSE is non-nil, sort them in reverse order." |
89 (interactive "P") | 94 (interactive "P") |
90 (rmail-sort-messages reverse | 95 (rmail-sort-messages reverse |
102 (mail-strip-quoted-names | 107 (mail-strip-quoted-names |
103 (or (rmail-fetch-field msg (car fields)) "")))) | 108 (or (rmail-fetch-field msg (car fields)) "")))) |
104 (setq fields (cdr fields))) | 109 (setq fields (cdr fields))) |
105 ans)) | 110 ans)) |
106 | 111 |
112 ;;;###autoload | |
107 (defun rmail-sort-by-lines (reverse) | 113 (defun rmail-sort-by-lines (reverse) |
108 "Sort messages of current Rmail file by number of lines. | 114 "Sort messages of current Rmail file by number of lines. |
109 If prefix argument REVERSE is non-nil, sort them in reverse order." | 115 If prefix argument REVERSE is non-nil, sort them in reverse order." |
110 (interactive "P") | 116 (interactive "P") |
111 (rmail-sort-messages reverse | 117 (rmail-sort-messages reverse |
112 (function | 118 (function |
113 (lambda (msg) | 119 (lambda (msg) |
114 (count-lines (rmail-msgbeg msg) | 120 (count-lines (rmail-msgbeg msg) |
115 (rmail-msgend msg)))))) | 121 (rmail-msgend msg)))))) |
116 | 122 |
123 ;;;###autoload | |
117 (defun rmail-sort-by-keywords (reverse labels) | 124 (defun rmail-sort-by-keywords (reverse labels) |
118 "Sort messages of current Rmail file by labels. | 125 "Sort messages of current Rmail file by labels. |
119 If prefix argument REVERSE is non-nil, sort them in reverse order. | 126 If prefix argument REVERSE is non-nil, sort them in reverse order. |
120 KEYWORDS is a comma-separated list of labels." | 127 KEYWORDS is a comma-separated list of labels." |
121 (interactive "P\nsSort by labels: ") | 128 (interactive "P\nsSort by labels: ") |