Mercurial > emacs
comparison lisp/mh-e/mh-e.el @ 67760:9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
hyperlinks such as symbols, Info nodes, or URLs. Use \" quotes for
everything else. Otherwise, you can accidently get links to
nonsense symbols.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Fri, 23 Dec 2005 08:40:31 +0000 |
parents | b7b75914a27d |
children | f2d49739378c |
comparison
equal
deleted
inserted
replaced
67759:b7b75914a27d | 67760:9c3504ae6060 |
---|---|
137 This string is passed to the scan program via the -format | 137 This string is passed to the scan program via the -format |
138 argument. This format is identical to the default except that | 138 argument. This format is identical to the default except that |
139 additional hints for fontification have been added to the fifth | 139 additional hints for fontification have been added to the fifth |
140 column (remember that in Emacs, the first column is 0). | 140 column (remember that in Emacs, the first column is 0). |
141 | 141 |
142 The values of the fifth column, in priority order, are: `-' if | 142 The values of the fifth column, in priority order, are: \"-\" if |
143 the message has been replied to, t if an address on the To: line | 143 the message has been replied to, t if an address on the To: line |
144 matches one of the mailboxes of the current user, `c' if the Cc: | 144 matches one of the mailboxes of the current user, \"c\" if the Cc: |
145 line matches, `b' if the Bcc: line matches, and `n' if a | 145 line matches, \"b\" if the Bcc: line matches, and \"n\" if a |
146 non-empty Newsgroups: header is present.") | 146 non-empty Newsgroups: header is present.") |
147 | 147 |
148 (defvar mh-scan-format-nmh | 148 (defvar mh-scan-format-nmh |
149 (concat | 149 (concat |
150 "%4(msg)" | 150 "%4(msg)" |
163 This string is passed to the scan program via the -format arg. | 163 This string is passed to the scan program via the -format arg. |
164 This format is identical to the default except that additional | 164 This format is identical to the default except that additional |
165 hints for fontification have been added to the fifth | 165 hints for fontification have been added to the fifth |
166 column (remember that in Emacs, the first column is 0). | 166 column (remember that in Emacs, the first column is 0). |
167 | 167 |
168 The values of the fifth column, in priority order, are: `-' if | 168 The values of the fifth column, in priority order, are: \"-\" if |
169 the message has been replied to, t if an address on the To: field | 169 the message has been replied to, t if an address on the To: field |
170 matches one of the mailboxes of the current user, `c' if the Cc: | 170 matches one of the mailboxes of the current user, \"c\" if the Cc: |
171 field matches, `b' if the Bcc: field matches, and `n' if a | 171 field matches, \"b\" if the Bcc: field matches, and \"n\" if a |
172 non-empty Newsgroups: field is present.") | 172 non-empty Newsgroups: field is present.") |
173 | 173 |
174 (defvar mh-note-deleted ?D | 174 (defvar mh-note-deleted ?D |
175 "Messages that have been deleted are marked by this character. | 175 "Messages that have been deleted are marked by this character. |
176 See also `mh-scan-deleted-msg-regexp'.") | 176 See also `mh-scan-deleted-msg-regexp'.") |
264 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 264 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
265 "This regular expression specifies the recipient in messages you sent. | 265 "This regular expression specifies the recipient in messages you sent. |
266 | 266 |
267 Note that the default setting of `mh-folder-font-lock-keywords' | 267 Note that the default setting of `mh-folder-font-lock-keywords' |
268 expects this expression to contain two parenthesized expressions. | 268 expects this expression to contain two parenthesized expressions. |
269 The first is expected to match the `To:' that the default scan | 269 The first is expected to match the \"To:\" that the default scan |
270 format file generates. The second is expected to match the | 270 format file generates. The second is expected to match the |
271 recipient's name as in the default of | 271 recipient's name as in the default of |
272 \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular | 272 \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular |
273 expression is not correct, the recipient will not be | 273 expression is not correct, the recipient will not be |
274 highlighted.") | 274 highlighted.") |
287 "This regular expression matches the subject. | 287 "This regular expression matches the subject. |
288 | 288 |
289 It must match from the beginning of the line. Note that the | 289 It must match from the beginning of the line. Note that the |
290 default setting of `mh-folder-font-lock-keywords' expects this | 290 default setting of `mh-folder-font-lock-keywords' expects this |
291 expression to contain at least three parenthesized expressions. | 291 expression to contain at least three parenthesized expressions. |
292 The first is expected to match the `Re:' string, if any. The | 292 The first is expected to match the \"Re:\" string, if any. The |
293 second matches an optional bracketed number after `Re:', such as | 293 second matches an optional bracketed number after \"Re:\", such as |
294 in `Re[2]:' (and is thus a sub-expression of the first | 294 in \"Re[2]:\" (and is thus a sub-expression of the first |
295 expression) and the third is expected to match the subject line | 295 expression) and the third is expected to match the subject line |
296 itself as in the default of (broken on multiple lines for | 296 itself as in the default of (broken on multiple lines for |
297 readability): | 297 readability): |
298 | 298 |
299 ^ *[0-9]+........[ ]*................... | 299 ^ *[0-9]+........[ ]*................... |
354 "Keywords (regular expressions) used to fontify the MH-Folder buffer.") | 354 "Keywords (regular expressions) used to fontify the MH-Folder buffer.") |
355 | 355 |
356 (defvar mh-scan-cmd-note-width 1 | 356 (defvar mh-scan-cmd-note-width 1 |
357 "Number of columns consumed by the cmd-note field in `mh-scan-format'. | 357 "Number of columns consumed by the cmd-note field in `mh-scan-format'. |
358 | 358 |
359 This column will have one of the values: ` ', `D', `^', `+' and | 359 This column will have one of the values: \" \", \"D\", \"^\", \"+\" and |
360 where ` ' is the default value, | 360 where \" \" is the default value, |
361 | 361 |
362 `D' is the `mh-note-deleted' character, | 362 \"D\" is the `mh-note-deleted' character, |
363 `^' is the `mh-note-refiled' character, and | 363 \"^\" is the `mh-note-refiled' character, and |
364 `+' is the `mh-note-cur' character.") | 364 \"+\" is the `mh-note-cur' character.") |
365 | 365 |
366 (defvar mh-scan-destination-width 1 | 366 (defvar mh-scan-destination-width 1 |
367 "Number of columns consumed by the destination field in `mh-scan-format'. | 367 "Number of columns consumed by the destination field in `mh-scan-format'. |
368 | 368 |
369 This column will have one of ' ', '%', '-', 't', 'c', 'b', or `n' | 369 This column will have one of \" \", \"%\", \"-\", \"t\", \"c\", \"b\", or \"n\" |
370 in it. | 370 in it. |
371 | 371 |
372 ' ' blank space is the default character. | 372 \" \" blank space is the default character. |
373 '%' indicates that the message in in a named MH sequence. | 373 \"%\" indicates that the message in in a named MH sequence. |
374 '-' indicates that the message has been annotated with a replied field. | 374 \"-\" indicates that the message has been annotated with a replied field. |
375 't' indicates that the message contains mymbox in the To: field. | 375 \"t\" indicates that the message contains mymbox in the To: field. |
376 'c' indicates that the message contains mymbox in the Cc: field. | 376 \"c\" indicates that the message contains mymbox in the Cc: field. |
377 'b' indicates that the message contains mymbox in the Bcc: field. | 377 \"b\" indicates that the message contains mymbox in the Bcc: field. |
378 'n' indicates that the message contains a Newsgroups: field.") | 378 \"n\" indicates that the message contains a Newsgroups: field.") |
379 | 379 |
380 (defvar mh-scan-date-width 5 | 380 (defvar mh-scan-date-width 5 |
381 "Number of columns consumed by the date field in `mh-scan-format'. | 381 "Number of columns consumed by the date field in `mh-scan-format'. |
382 This column will typically be of the form mm/dd.") | 382 This column will typically be of the form mm/dd.") |
383 | 383 |
384 (defvar mh-scan-date-flag-width 1 | 384 (defvar mh-scan-date-flag-width 1 |
385 "Number of columns consumed to flag (in)valid dates in `mh-scan-format'. | 385 "Number of columns consumed to flag (in)valid dates in `mh-scan-format'. |
386 This column will have ` ' for valid and `*' for invalid or | 386 This column will have \" \" for valid and \"*\" for invalid or |
387 missing dates.") | 387 missing dates.") |
388 | 388 |
389 (defvar mh-scan-from-mbox-width 17 | 389 (defvar mh-scan-from-mbox-width 17 |
390 "Number of columns consumed with the \"From:\" line in `mh-scan-format'. | 390 "Number of columns consumed with the \"From:\" line in `mh-scan-format'. |
391 This column will have a friendly name or e-mail address of the | 391 This column will have a friendly name or e-mail address of the |
776 | 776 |
777 The name of the folder is derived as follows: | 777 The name of the folder is derived as follows: |
778 | 778 |
779 a) The folder name associated with the first address found in | 779 a) The folder name associated with the first address found in |
780 the list `mh-default-folder-list' is used. Each element in | 780 the list `mh-default-folder-list' is used. Each element in |
781 this list contains a `Check Recipient' item. If this item is | 781 this list contains a \"Check Recipient\" item. If this item is |
782 turned on, then the address is checked against the recipient | 782 turned on, then the address is checked against the recipient |
783 instead of the sender. This is useful for mailing lists. | 783 instead of the sender. This is useful for mailing lists. |
784 | 784 |
785 b) An alias prefixed by `mh-default-folder-prefix' | 785 b) An alias prefixed by `mh-default-folder-prefix' |
786 corresponding to the address is used. The prefix is used to | 786 corresponding to the address is used. The prefix is used to |
1368 (equal current-folder folder)) | 1368 (equal current-folder folder)) |
1369 (setq folder (substring folder 0 (1- (length folder))))) | 1369 (setq folder (substring folder 0 (1- (length folder))))) |
1370 (values (format "+%s" folder) (car unseen) (car total)))))))) | 1370 (values (format "+%s" folder) (car unseen) (car total)))))))) |
1371 | 1371 |
1372 (defun mh-folder-size-folder (folder) | 1372 (defun mh-folder-size-folder (folder) |
1373 "Find size of FOLDER using `folder'." | 1373 "Find size of FOLDER using \"folder\"." |
1374 (with-temp-buffer | 1374 (with-temp-buffer |
1375 (let ((u (length (cdr (assoc mh-unseen-seq | 1375 (let ((u (length (cdr (assoc mh-unseen-seq |
1376 (mh-read-folder-sequences folder nil)))))) | 1376 (mh-read-folder-sequences folder nil)))))) |
1377 (call-process (expand-file-name "folder" mh-progs) nil t nil | 1377 (call-process (expand-file-name "folder" mh-progs) nil t nil |
1378 "-norecurse" folder) | 1378 "-norecurse" folder) |
1380 (if (re-search-forward " has \\([0-9]+\\) " nil t) | 1380 (if (re-search-forward " has \\([0-9]+\\) " nil t) |
1381 (values (car (read-from-string (match-string 1))) u folder) | 1381 (values (car (read-from-string (match-string 1))) u folder) |
1382 (values 0 u folder))))) | 1382 (values 0 u folder))))) |
1383 | 1383 |
1384 (defun mh-folder-size-flist (folder) | 1384 (defun mh-folder-size-flist (folder) |
1385 "Find size of FOLDER using `flist'." | 1385 "Find size of FOLDER using \"flist\"." |
1386 (with-temp-buffer | 1386 (with-temp-buffer |
1387 (call-process (expand-file-name "flist" mh-progs) nil t nil "-showzero" | 1387 (call-process (expand-file-name "flist" mh-progs) nil t nil "-showzero" |
1388 "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) | 1388 "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) |
1389 (goto-char (point-min)) | 1389 (goto-char (point-min)) |
1390 (multiple-value-bind (folder unseen total) | 1390 (multiple-value-bind (folder unseen total) |
1787 | 1787 |
1788 <num1>-<num2> | 1788 <num1>-<num2> |
1789 Indicates all messages in the range <num1> to <num2>, inclusive. | 1789 Indicates all messages in the range <num1> to <num2>, inclusive. |
1790 The range must be nonempty. | 1790 The range must be nonempty. |
1791 | 1791 |
1792 `<num>:N' | 1792 <num>:N |
1793 `<num>:+N' | 1793 <num>:+N |
1794 `<num>:-N' | 1794 <num>:-N |
1795 Up to N messages beginning with (or ending with) message num. Num | 1795 Up to N messages beginning with (or ending with) message num. Num |
1796 may be any of the predefined symbols: first, prev, cur, next or | 1796 may be any of the predefined symbols: first, prev, cur, next or |
1797 last. | 1797 last. |
1798 | 1798 |
1799 `first:N' | 1799 first:N |
1800 `prev:N' | 1800 prev:N |
1801 `next:N' | 1801 next:N |
1802 `last:N' | 1802 last:N |
1803 The first, previous, next or last messages, if they exist. | 1803 The first, previous, next or last messages, if they exist. |
1804 | 1804 |
1805 `all' | 1805 all |
1806 All of the messages. | 1806 All of the messages. |
1807 | 1807 |
1808 For example, a range that shows all of these things is `1 2 3 | 1808 For example, a range that shows all of these things is `1 2 3 |
1809 5-10 last:5 unseen'. | 1809 5-10 last:5 unseen'. |
1810 | 1810 |
2641 (defalias 'mh-alt-show 'mh-show) | 2641 (defalias 'mh-alt-show 'mh-show) |
2642 (defalias 'mh-alt-refile-msg 'mh-refile-msg) | 2642 (defalias 'mh-alt-refile-msg 'mh-refile-msg) |
2643 (defalias 'mh-alt-send 'mh-send) | 2643 (defalias 'mh-alt-send 'mh-send) |
2644 (defalias 'mh-alt-visit-folder 'mh-visit-folder) | 2644 (defalias 'mh-alt-visit-folder 'mh-visit-folder) |
2645 | 2645 |
2646 ;; Save the `b' binding for a future `back'. Maybe? | 2646 ;; Save the "b" binding for a future `back'. Maybe? |
2647 (gnus-define-keys mh-folder-mode-map | 2647 (gnus-define-keys mh-folder-mode-map |
2648 " " mh-page-msg | 2648 " " mh-page-msg |
2649 "!" mh-refile-or-write-again | 2649 "!" mh-refile-or-write-again |
2650 "'" mh-toggle-tick | 2650 "'" mh-toggle-tick |
2651 "," mh-header-display | 2651 "," mh-header-display |
2791 ;; example, the first line is "ways to view messages," the second line is | 2791 ;; example, the first line is "ways to view messages," the second line is |
2792 ;; "things you can do with messages", and the third is "composing" messages. | 2792 ;; "things you can do with messages", and the third is "composing" messages. |
2793 ;; | 2793 ;; |
2794 ;; When adding a new prefix, ensure that the help message contains "what" the | 2794 ;; When adding a new prefix, ensure that the help message contains "what" the |
2795 ;; prefix is for. For example, if the word "folder" were not present in the | 2795 ;; prefix is for. For example, if the word "folder" were not present in the |
2796 ;; `F' entry, it would not be clear what these commands operated upon. | 2796 ;; "F" entry, it would not be clear what these commands operated upon. |
2797 (defvar mh-help-messages | 2797 (defvar mh-help-messages |
2798 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" | 2798 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" |
2799 "[d]elete, [o]refile, e[x]ecute,\n" | 2799 "[d]elete, [o]refile, e[x]ecute,\n" |
2800 "[s]end, [r]eply,\n" | 2800 "[s]end, [r]eply,\n" |
2801 "[;]toggle MIME decoding.\n" | 2801 "[;]toggle MIME decoding.\n" |