Mercurial > emacs
comparison lisp/=gnus.el @ 10073:71b3508d5418
Many doc fixes. Fix progress message formats.
(gnus-article-prev-digest): Rename arg to n.
(gnus-summary-next-digest, gnus-summary-prev-digest): Likewise.
(file-newer-than-file-p): Definition deleted.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 28 Nov 1994 13:54:27 +0000 |
parents | 1a60406f3d3e |
children | 6270254bfd9a |
comparison
equal
deleted
inserted
replaced
10072:a7b70665c937 | 10073:71b3508d5418 |
---|---|
96 (require 'mail-utils) | 96 (require 'mail-utils) |
97 (require 'timezone) | 97 (require 'timezone) |
98 | 98 |
99 (defvar gnus-default-nntp-server nil | 99 (defvar gnus-default-nntp-server nil |
100 "*Specify default NNTP server. | 100 "*Specify default NNTP server. |
101 This variable should be defined in paths.el.") | 101 This variable should be defined in `site-init.el'.") |
102 | 102 |
103 (defvar gnus-nntp-server (or (getenv "NNTPSERVER") gnus-default-nntp-server) | 103 (defvar gnus-nntp-server (or (getenv "NNTPSERVER") gnus-default-nntp-server) |
104 "*The name of the host running NNTP server. | 104 "*The name of the host running NNTP server. |
105 If it is a string such as `:DIRECTORY', the user's private DIRECTORY | 105 If it is a string starting with a colon, as in as `:DIRECTORY', then the |
106 is used as a news spool. | 106 directory ~/DIRECTORY is used as the news spool. |
107 Initialized from the NNTPSERVER environment variable.") | 107 This variable is initialized from the NNTPSERVER environment variable |
108 or from `gnus-default-nntp-server'.") | |
108 | 109 |
109 (defvar gnus-nntp-service "nntp" | 110 (defvar gnus-nntp-service "nntp" |
110 "*NNTP service name (\"nntp\" or 119). | 111 "*NNTP service name (\"nntp\" or 119). |
111 Go to a local news spool if its value is nil.") | 112 Go to a local news spool if its value is nil.") |
112 | 113 |
122 subscribed newsgroups. Otherwise, if not nil nor t, mark articles as | 123 subscribed newsgroups. Otherwise, if not nil nor t, mark articles as |
123 read in all newsgroups.") | 124 read in all newsgroups.") |
124 | 125 |
125 (defvar gnus-use-followup-to t | 126 (defvar gnus-use-followup-to t |
126 "*Specifies what to do with Followup-To: field. | 127 "*Specifies what to do with Followup-To: field. |
127 If nil, ignore followup-to: field. If t, use its value except for | 128 If nil, ignore `Followup-to:' field. If t, use its value except for |
128 `poster'. Otherwise, if not nil nor t, always use its value.") | 129 `poster'. Otherwise, if not nil nor t, always use its value.") |
129 | 130 |
130 (defvar gnus-large-newsgroup 50 | 131 (defvar gnus-large-newsgroup 50 |
131 "*The number of articles which indicates a large newsgroup. | 132 "*The number of articles which indicates a large newsgroup. |
132 If the number of articles in a newsgroup is greater than the value, | 133 If the number of articles in a newsgroup is greater than the value, |
137 Initialized from the AUTHORCOPY environment variable. | 138 Initialized from the AUTHORCOPY environment variable. |
138 | 139 |
139 Articles are saved using a function specified by the the variable | 140 Articles are saved using a function specified by the the variable |
140 `gnus-author-copy-saver' (`rmail-output' is default) if a file name is | 141 `gnus-author-copy-saver' (`rmail-output' is default) if a file name is |
141 given. Instead, if the first character of the name is `|', the | 142 given. Instead, if the first character of the name is `|', the |
142 contents of the article is piped out to the named program. It is | 143 contents of the article is piped out to the named program. It is |
143 possible to save an article in an MH folder as follows: | 144 possible to save an article in an MH folder as follows: |
144 | 145 |
145 \(setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")") | 146 \(setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")") |
146 | 147 |
147 (defvar gnus-author-copy-saver (function rmail-output) | 148 (defvar gnus-author-copy-saver (function rmail-output) |
148 "*A function called with a file name to save an author copy to. | 149 "*A function called with a file name to save an author copy to. |
149 The default function is `rmail-output' which saves in Unix mailbox format.") | 150 The default function is `rmail-output' which saves in inbox format.") |
150 | 151 |
151 (defvar gnus-use-long-file-name | 152 (defvar gnus-use-long-file-name |
152 (not (memq system-type '(usg-unix-v xenix))) | 153 (not (memq system-type '(usg-unix-v xenix))) |
153 "*Non-nil means that a newsgroup name is used as a default file name | 154 "*Non-nil means that a newsgroup name is used as a default file name |
154 to save articles to. If it's nil, the directory form of a newsgroup is | 155 to save articles to. If it's nil, the directory form of a newsgroup is |
155 used instead.") | 156 used instead.") |
156 | 157 |
157 (defvar gnus-article-save-directory (getenv "SAVEDIR") | 158 (defvar gnus-article-save-directory (getenv "SAVEDIR") |
158 "*A directory name to save articles to (default to ~/News). | 159 "*A directory name to save articles to (default is `~/News'). |
159 Initialized from the SAVEDIR environment variable.") | 160 Initialized from the SAVEDIR environment variable.") |
160 | 161 |
161 (defvar gnus-kill-files-directory (getenv "SAVEDIR") | 162 (defvar gnus-kill-files-directory (getenv "SAVEDIR") |
162 "*A directory name to save kill files to (default to ~/News). | 163 "*A directory name to save kill files to (default to ~/News). |
163 Initialized from the SAVEDIR environment variable.") | 164 Initialized from the SAVEDIR environment variable.") |
244 removed from the newsgroup list before anything else is done to it, | 245 removed from the newsgroup list before anything else is done to it, |
245 thus making them effectively invisible.") | 246 thus making them effectively invisible.") |
246 | 247 |
247 (defvar gnus-ignored-headers | 248 (defvar gnus-ignored-headers |
248 "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" | 249 "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" |
249 "*All random fields within the header of a message.") | 250 "*Header fields not worth displaying. |
251 Ordinarily GNUS excludes these when displaying an article. | |
252 If you want to see them, ask to see the message with \"the full header\" | |
253 \(also known as \"the original header\").") | |
250 | 254 |
251 (defvar gnus-required-headers | 255 (defvar gnus-required-headers |
252 '(From Date Newsgroups Subject Message-ID Path Organization Distribution) | 256 '(From Date Newsgroups Subject Message-ID Path Organization Distribution) |
253 "*All required fields for articles you post. | 257 "*All required fields for articles you post. |
254 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, Message-ID | 258 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, Message-ID |
255 and Path fields. Organization, Distribution and Lines are optional. | 259 and Path fields. Organization, Distribution and Lines are optional. |
256 If you want GNUS not to insert some field, remove it from the | 260 If you want GNUS not to insert some field, remove it from this list.") |
257 variable.") | |
258 | 261 |
259 (defvar gnus-show-all-headers nil | 262 (defvar gnus-show-all-headers nil |
260 "*Show all headers of an article if non-nil.") | 263 "*Show all headers of an article if non-nil.") |
261 | 264 |
262 (defvar gnus-save-all-headers t | 265 (defvar gnus-save-all-headers t |
263 "*Save all headers of an article if non-nil.") | 266 "*Save all headers of an article if non-nil.") |
264 | 267 |
265 (defvar gnus-optional-headers (function gnus-optional-lines-and-from) | 268 (defvar gnus-optional-headers (function gnus-optional-lines-and-from) |
266 "*A function generating a optional string displayed in GNUS Summary | 269 "*A function generating a optional string displayed in GNUS Summary |
267 mode buffer. The function is called with an article HEADER. The | 270 mode buffer. The function is called with an article HEADER. The |
268 result must be a string excluding `[' and `]'.") | 271 result must be a string excluding `[' and `]'.") |
269 | 272 |
270 (defvar gnus-auto-extend-newsgroup t | 273 (defvar gnus-auto-extend-newsgroup t |
271 "*Extend visible articles to forward and backward if non-nil.") | 274 "*Extend visible articles to forward and backward if non-nil.") |
272 | 275 |
373 (defvar gnus-open-server-hook nil | 376 (defvar gnus-open-server-hook nil |
374 "*A hook called just before opening connection to news server.") | 377 "*A hook called just before opening connection to news server.") |
375 | 378 |
376 (defvar gnus-startup-hook nil | 379 (defvar gnus-startup-hook nil |
377 "*A hook called at start up time. | 380 "*A hook called at start up time. |
378 This hook is called after GNUS is connected to the NNTP server. So, it | 381 This hook is called after GNUS is connected to the NNTP server. So, it |
379 is possible to change the behavior of GNUS according to the selected | 382 is possible to change the behavior of GNUS according to the selected |
380 NNTP server.") | 383 NNTP server.") |
381 | 384 |
382 (defvar gnus-group-prepare-hook nil | 385 (defvar gnus-group-prepare-hook nil |
383 "*A hook called after newsgroup list is created in the Newsgroup buffer. | 386 "*A hook called after newsgroup list is created in the Newsgroup buffer. |
394 (defvar gnus-select-group-hook nil | 397 (defvar gnus-select-group-hook nil |
395 "*A hook called when a newsgroup is selected. | 398 "*A hook called when a newsgroup is selected. |
396 If you want to sort Summary buffer by date and then by subject, you | 399 If you want to sort Summary buffer by date and then by subject, you |
397 can use the following hook: | 400 can use the following hook: |
398 | 401 |
399 \(setq gnus-select-group-hook | 402 \(add-hook 'gnus-select-group-hook |
400 (list | |
401 (function | 403 (function |
402 (lambda () | 404 (lambda () |
403 ;; First of all, sort by date. | 405 ;; First of all, sort by date. |
404 (gnus-keysort-headers | 406 (gnus-keysort-headers |
405 (function string-lessp) | 407 (function string-lessp) |
413 (function | 415 (function |
414 (lambda (a) | 416 (lambda (a) |
415 (if case-fold-search | 417 (if case-fold-search |
416 (downcase (gnus-simplify-subject (gnus-header-subject a) t)) | 418 (downcase (gnus-simplify-subject (gnus-header-subject a) t)) |
417 (gnus-simplify-subject (gnus-header-subject a) t))))) | 419 (gnus-simplify-subject (gnus-header-subject a) t))))) |
418 )))) | 420 ))) |
419 | 421 |
420 If you'd like to simplify subjects like the | 422 If you'd like to simplify subjects like the |
421 `gnus-summary-next-same-subject' command does, you can use the | 423 `gnus-summary-next-same-subject' command does, you can use the |
422 following hook: | 424 following hook: |
423 | 425 |
424 \(setq gnus-select-group-hook | 426 \(add-hook 'gnus-select-group-hook |
425 (list | |
426 (function | 427 (function |
427 (lambda () | 428 (lambda () |
428 (mapcar (function | 429 (mapcar (function |
429 (lambda (header) | 430 (lambda (header) |
430 (nntp-set-header-subject | 431 (nntp-set-header-subject |
431 header | 432 header |
432 (gnus-simplify-subject | 433 (gnus-simplify-subject |
433 (gnus-header-subject header) 're-only)))) | 434 (gnus-header-subject header) 're-only)))) |
434 gnus-newsgroup-headers))))) | 435 gnus-newsgroup-headers)))) |
435 | 436 |
436 In some newsgroups author name is meaningless. It is possible to | 437 In some newsgroups author name is meaningless. It is possible to |
437 prevent listing author names in GNUS Summary buffer as follows: | 438 prevent listing author names in GNUS Summary buffer as follows: |
438 | 439 |
439 \(setq gnus-select-group-hook | 440 \(add-hook 'gnus-select-group-hook |
440 (list | |
441 (function | 441 (function |
442 (lambda () | 442 (lambda () |
443 (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name) | 443 (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name) |
444 (setq gnus-optional-headers | 444 (setq gnus-optional-headers |
445 (function gnus-optional-lines))) | 445 (function gnus-optional-lines))) |
446 (t | 446 (t |
447 (setq gnus-optional-headers | 447 (setq gnus-optional-headers |
448 (function gnus-optional-lines-and-from))))))))") | 448 (function gnus-optional-lines-and-from)))))))") |
449 | 449 |
450 (defvar gnus-select-article-hook | 450 (defvar gnus-select-article-hook |
451 '(gnus-summary-show-thread) | 451 '(gnus-summary-show-thread) |
452 "*A hook called when an article is selected. | 452 "*A hook called when an article is selected. |
453 The default hook shows conversation thread subtrees of the selected | 453 The default hook shows conversation thread subtrees of the selected |
454 article automatically using `gnus-summary-show-thread'. | 454 article automatically using `gnus-summary-show-thread'. |
455 | 455 |
456 If you'd like to run RMAIL on a digest article automagically, you can | 456 If you'd like to run Rmail on a digest article automagically, you can |
457 use the following hook: | 457 use the following hook: |
458 | 458 |
459 \(setq gnus-select-article-hook | 459 \(add-hook 'gnus-select-article-hook |
460 (list | |
461 (function | 460 (function |
462 (lambda () | 461 (lambda () |
463 (gnus-summary-show-thread) | |
464 (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name) | 462 (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name) |
465 (gnus-summary-rmail-digest)) | 463 (gnus-summary-rmail-digest)) |
466 ((and (string-equal \"comp.text\" gnus-newsgroup-name) | 464 ((and (string-equal \"comp.text\" gnus-newsgroup-name) |
467 (string-match \"^TeXhax Digest\" | 465 (string-match \"^TeXhax Digest\" |
468 (gnus-header-subject gnus-current-headers))) | 466 (gnus-header-subject gnus-current-headers))) |
469 (gnus-summary-rmail-digest) | 467 (gnus-summary-rmail-digest) |
470 ))))))") | 468 )))) |
469 t)") | |
471 | 470 |
472 (defvar gnus-select-digest-hook | 471 (defvar gnus-select-digest-hook |
473 (list | 472 (list |
474 (function | 473 (function |
475 (lambda () | 474 (lambda () |
480 (insert (gnus-fetch-field "From"))))))) | 479 (insert (gnus-fetch-field "From"))))))) |
481 "*A hook called when reading digest messages using Rmail. | 480 "*A hook called when reading digest messages using Rmail. |
482 This hook can be used to modify incomplete digest articles as follows | 481 This hook can be used to modify incomplete digest articles as follows |
483 \(this is the default): | 482 \(this is the default): |
484 | 483 |
485 \(setq gnus-select-digest-hook | 484 \(add-hook 'gnus-select-digest-hook |
486 (list | |
487 (function | 485 (function |
488 (lambda () | 486 (lambda () |
489 ;; Reply-To: is required by `undigestify-rmail-message'. | 487 ;; Reply-To: is required by `undigestify-rmail-message'. |
490 (or (mail-position-on-field \"Reply-to\" t) | 488 (or (mail-position-on-field \"Reply-to\" t) |
491 (progn | 489 (progn |
492 (mail-position-on-field \"Reply-to\") | 490 (mail-position-on-field \"Reply-to\") |
493 (insert (gnus-fetch-field \"From\"))))))))") | 491 (insert (gnus-fetch-field \"From\")))))))") |
494 | 492 |
495 (defvar gnus-rmail-digest-hook nil | 493 (defvar gnus-rmail-digest-hook nil |
496 "*A hook called when reading digest messages using Rmail. | 494 "*A hook called when reading digest messages using Rmail. |
497 This hook is intended to customize Rmail mode for reading digest articles.") | 495 This hook is intended to customize Rmail mode for reading digest articles.") |
498 | 496 |
500 "*A hook called when a newsgroup is selected and summary list is prepared. | 498 "*A hook called when a newsgroup is selected and summary list is prepared. |
501 This hook is intended to apply a KILL file to the selected newsgroup. | 499 This hook is intended to apply a KILL file to the selected newsgroup. |
502 The function `gnus-apply-kill-file' is called by default. | 500 The function `gnus-apply-kill-file' is called by default. |
503 | 501 |
504 Since a general KILL file is too heavy to use only for a few | 502 Since a general KILL file is too heavy to use only for a few |
505 newsgroups, I recommend you to use a lighter hook function. For | 503 newsgroups, I recommend you to use a lighter hook function. For |
506 example, if you'd like to apply a KILL file to articles which contains | 504 example, if you'd like to apply a KILL file to articles which contains |
507 a string `rmgroup' in subject in newsgroup `control', you can use the | 505 a string `rmgroup' in subject in newsgroup `control', you can use the |
508 following hook: | 506 following hook: |
509 | 507 |
510 \(setq gnus-apply-kill-hook | 508 \(setq gnus-apply-kill-hook |
546 to a file).") | 544 to a file).") |
547 | 545 |
548 (defvar gnus-exit-group-hook nil | 546 (defvar gnus-exit-group-hook nil |
549 "*A hook called when exiting (not quitting) Summary mode. | 547 "*A hook called when exiting (not quitting) Summary mode. |
550 If your machine is so slow that exiting from Summary mode takes very | 548 If your machine is so slow that exiting from Summary mode takes very |
551 long time, set the variable `gnus-use-cross-reference' to nil. This | 549 long time, set the variable `gnus-use-cross-reference' to nil. This |
552 inhibits marking articles as read using cross-reference information.") | 550 inhibits marking articles as read using cross-reference information.") |
553 | 551 |
554 (defvar gnus-suspend-gnus-hook nil | 552 (defvar gnus-suspend-gnus-hook nil |
555 "*A hook called when suspending (not exiting) GNUS.") | 553 "*A hook called when suspending (not exiting) GNUS.") |
556 | 554 |
560 (defvar gnus-save-newsrc-hook nil | 558 (defvar gnus-save-newsrc-hook nil |
561 "*A hook called when saving the newsrc file. | 559 "*A hook called when saving the newsrc file. |
562 This hook is called before saving the `.newsrc' file.") | 560 This hook is called before saving the `.newsrc' file.") |
563 | 561 |
564 | 562 |
565 ;; Site dependent variables. You have to define these variables in | 563 ;; Site dependent variables. You have to define these variables in |
566 ;; site-init.el, default.el or your .emacs. | 564 ;; site-init.el, default.el or your .emacs. |
567 | 565 |
568 (defvar gnus-local-timezone nil | 566 (defvar gnus-local-timezone nil |
569 "*Local time zone. | 567 "*Local time zone. |
570 This value is used only if `current-time-zone' does not work in your Emacs. | 568 This value is used only if `current-time-zone' does not work in your Emacs. |
590 The first element in the list is used as default. If distributions | 588 The first element in the list is used as default. If distributions |
591 file is available, its content is also used.") | 589 file is available, its content is also used.") |
592 | 590 |
593 (defvar gnus-use-generic-from nil | 591 (defvar gnus-use-generic-from nil |
594 "*If nil, prepend local host name to the defined domain in the From: | 592 "*If nil, prepend local host name to the defined domain in the From: |
595 field; if stringp, use this; if non-nil, strip of the local host name.") | 593 field; if a string, use this; if non-nil, strip of the local host name.") |
596 | 594 |
597 (defvar gnus-use-generic-path nil | 595 (defvar gnus-use-generic-path nil |
598 "*If nil, use the NNTP server name in the Path: field; if stringp, | 596 "*If nil, use the NNTP server name in the Path: field; if stringp, |
599 use this; if non-nil, use no host name (user name only)") | 597 use this; if non-nil, use no host name (user name only)") |
600 | 598 |
682 It is a list of `(original overload &optional file)'.") | 680 It is a list of `(original overload &optional file)'.") |
683 | 681 |
684 (defvar gnus-distribution-list nil) | 682 (defvar gnus-distribution-list nil) |
685 | 683 |
686 (defvar gnus-newsrc-options nil | 684 (defvar gnus-newsrc-options nil |
687 "Options line in the .newsrc file.") | 685 "Options line in the `.newsrc' file.") |
688 | 686 |
689 (defvar gnus-newsrc-options-n-yes nil | 687 (defvar gnus-newsrc-options-n-yes nil |
690 "Regexp representing subscribed newsgroups.") | 688 "Regexp representing subscribed newsgroups.") |
691 | 689 |
692 (defvar gnus-newsrc-options-n-no nil | 690 (defvar gnus-newsrc-options-n-no nil |
693 "Regexp representing unsubscribed newsgroups.") | 691 "Regexp representing unsubscribed newsgroups.") |
694 | 692 |
695 (defvar gnus-newsrc-assoc nil | 693 (defvar gnus-newsrc-assoc nil |
696 "Assoc list of read articles. | 694 "Assoc list of read articles. |
697 gnus-newsrc-hashtb should be kept so that both hold the same information.") | 695 `gnus-newsrc-hashtb' should be kept so that both hold the same information.") |
698 | 696 |
699 (defvar gnus-newsrc-hashtb nil | 697 (defvar gnus-newsrc-hashtb nil |
700 "Hashtable of gnus-newsrc-assoc.") | 698 "Hashtable of `gnus-newsrc-assoc'.") |
701 | 699 |
702 (defvar gnus-killed-assoc nil | 700 (defvar gnus-killed-assoc nil |
703 "Assoc list of newsgroups removed from gnus-newsrc-assoc. | 701 "Assoc list of newsgroups removed from `gnus-newsrc-assoc'. |
704 gnus-killed-hashtb should be kept so that both hold the same information.") | 702 `gnus-killed-hashtb' should be kept so that both hold the same information.") |
705 | 703 |
706 (defvar gnus-killed-hashtb nil | 704 (defvar gnus-killed-hashtb nil |
707 "Hashtable of gnus-killed-assoc.") | 705 "Hashtable of `gnus-killed-assoc'.") |
708 | 706 |
709 (defvar gnus-marked-assoc nil | 707 (defvar gnus-marked-assoc nil |
710 "Assoc list of articles marked as unread. | 708 "Assoc list of articles marked as unread. |
711 gnus-marked-hashtb should be kept so that both hold the same information.") | 709 `gnus-marked-hashtb' should be kept so that both hold the same information.") |
712 | 710 |
713 (defvar gnus-marked-hashtb nil | 711 (defvar gnus-marked-hashtb nil |
714 "Hashtable of gnus-marked-assoc.") | 712 "Hashtable of `gnus-marked-assoc'.") |
715 | 713 |
716 (defvar gnus-unread-hashtb nil | 714 (defvar gnus-unread-hashtb nil |
717 "Hashtable of unread articles.") | 715 "Hashtable of unread articles.") |
718 | 716 |
719 (defvar gnus-active-hashtb nil | 717 (defvar gnus-active-hashtb nil |
750 (defvar gnus-newsgroup-marked nil | 748 (defvar gnus-newsgroup-marked nil |
751 "List of marked articles in the current newsgroup (a subset of unread art).") | 749 "List of marked articles in the current newsgroup (a subset of unread art).") |
752 | 750 |
753 (defvar gnus-newsgroup-headers nil | 751 (defvar gnus-newsgroup-headers nil |
754 "List of article headers in the current newsgroup. | 752 "List of article headers in the current newsgroup. |
755 If the variable is modified (added or deleted), the function | 753 If you modify the variable, you must call the function |
756 gnus-clear-hashtables-for-newsgroup-headers must be called to clear | 754 `gnus-clear-hashtables-for-newsgroup-headers' to clear the hash tables.") |
757 the hash tables.") | |
758 (defvar gnus-newsgroup-headers-hashtb-by-id nil) | 755 (defvar gnus-newsgroup-headers-hashtb-by-id nil) |
759 (defvar gnus-newsgroup-headers-hashtb-by-number nil) | 756 (defvar gnus-newsgroup-headers-hashtb-by-number nil) |
760 | 757 |
761 (defvar gnus-current-article nil) | 758 (defvar gnus-current-article nil) |
762 (defvar gnus-current-headers nil) | 759 (defvar gnus-current-headers nil) |
809 "List the killed newsgroups." t) | 806 "List the killed newsgroups." t) |
810 (autoload 'gnus-gmt-to-local "gnusmisc" | 807 (autoload 'gnus-gmt-to-local "gnusmisc" |
811 "Rewrite Date field in GMT to local in current buffer.") | 808 "Rewrite Date field in GMT to local in current buffer.") |
812 | 809 |
813 (autoload 'metamail-buffer "metamail" | 810 (autoload 'metamail-buffer "metamail" |
814 "Process current buffer through 'metamail'." t) | 811 "Process current buffer through `metamail'." t) |
815 | 812 |
816 (autoload 'rmail-output "rmailout" | 813 (autoload 'rmail-output "rmailout" |
817 "Append this message to Unix mail file named FILE-NAME." t) | 814 "Append this message to Unix mail file named FILE-NAME." t) |
818 (autoload 'mail-position-on-field "sendmail") | 815 (autoload 'mail-position-on-field "sendmail") |
819 (autoload 'mh-find-path "mh-e") | 816 (autoload 'mh-find-path "mh-e") |
847 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) | 844 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) |
848 ;;(` (abbrev-expansion (, string) (, hashtable))) | 845 ;;(` (abbrev-expansion (, string) (, hashtable))) |
849 (` (symbol-value (intern-soft (, string) (, hashtable))))) | 846 (` (symbol-value (intern-soft (, string) (, hashtable))))) |
850 | 847 |
851 (defmacro gnus-sethash (string value hashtable) | 848 (defmacro gnus-sethash (string value hashtable) |
852 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." | 849 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." |
853 ;; We cannot use define-abbrev since it only accepts string as value. | 850 ;; We cannot use define-abbrev since it only accepts string as value. |
854 (` (set (intern (, string) (, hashtable)) (, value)))) | 851 (` (set (intern (, string) (, hashtable)) (, value)))) |
855 | 852 |
856 ;; Note: Macros defined here are also defined in nntp.el. I don't like | 853 ;; Note: Macros defined here are also defined in nntp.el. I don't like |
857 ;; to put them here, but many users got troubled with the old | 854 ;; to put them here, but many users got troubled with the old |
858 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. | 855 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. |
859 | 856 |
860 (defmacro nntp-header-number (header) | 857 (defmacro nntp-header-number (header) |
861 "Return article number in HEADER." | 858 "Return article number in HEADER." |
862 (` (aref (, header) 0))) | 859 (` (aref (, header) 0))) |
863 | 860 |
1061 ? Describe Group Mode commands briefly. | 1058 ? Describe Group Mode commands briefly. |
1062 C-h m Describe Group Mode. | 1059 C-h m Describe Group Mode. |
1063 C-c C-i Read Info about Group Mode. | 1060 C-c C-i Read Info about Group Mode. |
1064 | 1061 |
1065 The name of the host running NNTP server is asked for if no default | 1062 The name of the host running NNTP server is asked for if no default |
1066 host is specified. It is also possible to choose another NNTP server | 1063 host is specified. It is also possible to choose another NNTP server |
1067 even when the default server is defined by giving a prefix argument to | 1064 even when the default server is defined by giving a prefix argument to |
1068 the command `\\[gnus]'. | 1065 the command `\\[gnus]'. |
1069 | 1066 |
1070 If an NNTP server is preceded by a colon such as `:Mail', the user's | 1067 If the NNTP server name starts with a colon, as in `:Mail', the user's |
1071 private directory `~/Mail' is used as a news spool. This makes it | 1068 own directory `~/Mail' is used as a news spool. This makes it |
1072 possible to read mail stored in MH folders or articles saved by GNUS. | 1069 possible to read mail stored in MH folders or articles saved by GNUS. |
1073 File names of mail or articles must consist of only numeric | 1070 File names of mail or articles must consist of only numeric |
1074 characters. Otherwise, they are ignored. | 1071 characters. Otherwise, they are ignored. |
1075 | 1072 |
1076 If there is a file named `~/.newsrc-SERVER', it is used as the | 1073 If there is a file named `~/.newsrc-SERVER', it is used as the |
1077 startup file instead of standard one when talking to SERVER. It is | 1074 startup file instead of standard one when talking to SERVER. It is |
1078 possible to talk to many hosts by using different startup files for | 1075 possible to talk to many hosts by using different startup files for |
1079 each. | 1076 each. |
1080 | 1077 |
1081 Option `-n' of the options line in the startup file is recognized | 1078 Option `-n' of the options line in the startup file is recognized |
1082 properly the same as the Bnews system. For example, if the options | 1079 properly the same as the Bnews system. For example, if the options |
1083 line is `options -n !talk talk.rumors', newsgroups under the `talk' | 1080 line is `options -n !talk talk.rumors', newsgroups under the `talk' |
1084 hierarchy except for `talk.rumors' are ignored while checking new | 1081 hierarchy except for `talk.rumors' are ignored while checking new |
1085 newsgroups. | 1082 newsgroups. |
1086 | 1083 |
1087 If there is a file named `~/.signature-DISTRIBUTION', it is used as | 1084 If there is a file named `~/.signature-DISTRIBUTION', it is used as |
1096 `mhspool-version' have the version numbers of this version of gnus.el, | 1093 `mhspool-version' have the version numbers of this version of gnus.el, |
1097 nntp.el, nnspool.el, and mhspoo.el, respectively. | 1094 nntp.el, nnspool.el, and mhspoo.el, respectively. |
1098 | 1095 |
1099 User customizable variables: | 1096 User customizable variables: |
1100 gnus-nntp-server | 1097 gnus-nntp-server |
1101 Specifies the name of the host running the NNTP server. If its | 1098 Specifies the name of the host running the NNTP server. If its |
1102 value is a string such as `:DIRECTORY', the user's private | 1099 value is a string such as `:DIRECTORY', the user's private |
1103 DIRECTORY is used as a news spool. The variable is initialized | 1100 DIRECTORY is used as a news spool. The variable is initialized |
1104 from the NNTPSERVER environment variable. | 1101 from the NNTPSERVER environment variable. |
1105 | 1102 |
1106 gnus-nntp-service | 1103 gnus-nntp-service |
1177 And more and more. Please refer to texinfo documentation. | 1174 And more and more. Please refer to texinfo documentation. |
1178 | 1175 |
1179 Various hooks for customization: | 1176 Various hooks for customization: |
1180 gnus-group-mode-hook | 1177 gnus-group-mode-hook |
1181 Entry to this mode calls the value with no arguments, if that | 1178 Entry to this mode calls the value with no arguments, if that |
1182 value is non-nil. This hook is called before GNUS is connected to | 1179 value is non-nil. This hook is called before GNUS is connected to |
1183 the NNTP server. So, you can change or define the NNTP server in | 1180 the NNTP server. So, you can change or define the NNTP server in |
1184 this hook. | 1181 this hook. |
1185 | 1182 |
1186 gnus-startup-hook | 1183 gnus-startup-hook |
1187 Called with no arguments after the NNTP server is selected. It is | 1184 Called with no arguments after the NNTP server is selected. It is |
1188 possible to change the behavior of GNUS or initialize the | 1185 possible to change the behavior of GNUS or initialize the |
1189 variables according to the selected NNTP server. | 1186 variables according to the selected NNTP server. |
1190 | 1187 |
1191 gnus-group-prepare-hook | 1188 gnus-group-prepare-hook |
1192 Called with no arguments after a newsgroup list is created in the | 1189 Called with no arguments after a newsgroup list is created in the |
1273 | 1270 |
1274 NNTP-based News Reader for GNU Emacs | 1271 NNTP-based News Reader for GNU Emacs |
1275 | 1272 |
1276 | 1273 |
1277 If you have any trouble with this software, please let me | 1274 If you have any trouble with this software, please let me |
1278 know. I will fix your problems in the next release. | 1275 know. I will fix your problems in the next release. |
1279 | 1276 |
1280 Comments, suggestions, and bug fixes are welcome. | 1277 Comments, suggestions, and bug fixes are welcome. |
1281 | 1278 |
1282 Masanobu UMEDA | 1279 Masanobu UMEDA |
1283 umerin@mse.kyutech.ac.jp" gnus-version)) | 1280 umerin@mse.kyutech.ac.jp" gnus-version)) |
1366 (run-hooks 'gnus-group-prepare-hook) | 1363 (run-hooks 'gnus-group-prepare-hook) |
1367 )) | 1364 )) |
1368 | 1365 |
1369 (defun gnus-group-prepare-line (info) | 1366 (defun gnus-group-prepare-line (info) |
1370 "Return a string for the Newsgroup buffer from INFO. | 1367 "Return a string for the Newsgroup buffer from INFO. |
1371 INFO is an element of gnus-newsrc-assoc or gnus-killed-assoc." | 1368 INFO is an element of `gnus-newsrc-assoc' or `gnus-killed-assoc'." |
1372 (let* ((group-name (car info)) | 1369 (let* ((group-name (car info)) |
1373 (unread-count | 1370 (unread-count |
1374 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) | 1371 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) |
1375 ;; Not in hash table, so compute it now. | 1372 ;; Not in hash table, so compute it now. |
1376 (gnus-number-of-articles | 1373 (gnus-number-of-articles |
1419 (goto-char (point-min)) | 1416 (goto-char (point-min)) |
1420 (re-search-forward regexp nil t)))) | 1417 (re-search-forward regexp nil t)))) |
1421 ((progn | 1418 ((progn |
1422 (goto-char (point-max)) | 1419 (goto-char (point-max)) |
1423 (re-search-backward regexp nil t)))) | 1420 (re-search-backward regexp nil t)))) |
1424 ;; GROUP is listed in current buffer. So, delete old line. | 1421 ;; GROUP is listed in current buffer. So, delete old line. |
1425 (progn | 1422 (progn |
1426 (setq visible t) | 1423 (setq visible t) |
1427 (beginning-of-line) | 1424 (beginning-of-line) |
1428 (delete-region (point) (progn (forward-line 1) (point))) | 1425 (delete-region (point) (progn (forward-line 1) (point))) |
1429 ) | 1426 ) |
1519 (beginning-of-line) | 1516 (beginning-of-line) |
1520 (search-forward ":" nil t) | 1517 (search-forward ":" nil t) |
1521 )) | 1518 )) |
1522 | 1519 |
1523 (defun gnus-group-next-group (n) | 1520 (defun gnus-group-next-group (n) |
1524 "Go to next N'th newsgroup." | 1521 "Go to Nth following newsgroup." |
1525 (interactive "p") | 1522 (interactive "p") |
1526 (while (and (> n 1) | 1523 (while (and (> n 1) |
1527 (gnus-group-search-forward nil t)) | 1524 (gnus-group-search-forward nil t)) |
1528 (setq n (1- n))) | 1525 (setq n (1- n))) |
1529 (or (gnus-group-search-forward nil t) | 1526 (or (gnus-group-search-forward nil t) |
1530 (message "No more newsgroups"))) | 1527 (message "No more newsgroups"))) |
1531 | 1528 |
1532 (defun gnus-group-next-unread-group (n) | 1529 (defun gnus-group-next-unread-group (n) |
1533 "Go to next N'th unread newsgroup." | 1530 "Go to Nth following unread newsgroup." |
1534 (interactive "p") | 1531 (interactive "p") |
1535 (while (and (> n 1) | 1532 (while (and (> n 1) |
1536 (gnus-group-search-forward nil nil)) | 1533 (gnus-group-search-forward nil nil)) |
1537 (setq n (1- n))) | 1534 (setq n (1- n))) |
1538 (or (gnus-group-search-forward nil nil) | 1535 (or (gnus-group-search-forward nil nil) |
1539 (message "No more unread newsgroups"))) | 1536 (message "No more unread newsgroups"))) |
1540 | 1537 |
1541 (defun gnus-group-prev-group (n) | 1538 (defun gnus-group-prev-group (n) |
1542 "Go to previous N'th newsgroup." | 1539 "Go to Nth previous newsgroup." |
1543 (interactive "p") | 1540 (interactive "p") |
1544 (while (and (> n 1) | 1541 (while (and (> n 1) |
1545 (gnus-group-search-forward t t)) | 1542 (gnus-group-search-forward t t)) |
1546 (setq n (1- n))) | 1543 (setq n (1- n))) |
1547 (or (gnus-group-search-forward t t) | 1544 (or (gnus-group-search-forward t t) |
1548 (message "No more newsgroups"))) | 1545 (message "No more newsgroups"))) |
1549 | 1546 |
1550 (defun gnus-group-prev-unread-group (n) | 1547 (defun gnus-group-prev-unread-group (n) |
1551 "Go to previous N'th unread newsgroup." | 1548 "Go to Nth previous unread newsgroup." |
1552 (interactive "p") | 1549 (interactive "p") |
1553 (while (and (> n 1) | 1550 (while (and (> n 1) |
1554 (gnus-group-search-forward t nil)) | 1551 (gnus-group-search-forward t nil)) |
1555 (setq n (1- n))) | 1552 (setq n (1- n))) |
1556 (or (gnus-group-search-forward t nil) | 1553 (or (gnus-group-search-forward t nil) |
1594 (gnus-group-next-group 1)) | 1591 (gnus-group-next-group 1)) |
1595 (message "No Newsgroup found to \(un\)subscribe")))) | 1592 (message "No Newsgroup found to \(un\)subscribe")))) |
1596 | 1593 |
1597 (defun gnus-group-unsubscribe-group (group) | 1594 (defun gnus-group-unsubscribe-group (group) |
1598 "Toggle subscribe from/to unsubscribe GROUP. | 1595 "Toggle subscribe from/to unsubscribe GROUP. |
1599 New newsgroup is added to .newsrc automatically." | 1596 \(If GROUP is new, it is added to `.newsrc' automatically.)" |
1600 (interactive | 1597 (interactive |
1601 (list (completing-read "Newsgroup: " | 1598 (list (completing-read "Newsgroup: " |
1602 gnus-active-hashtb nil 'require-match))) | 1599 gnus-active-hashtb nil 'require-match))) |
1603 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) | 1600 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
1604 (cond ((not (null newsrc)) | 1601 (cond ((not (null newsrc)) |
1626 (message "Listing all groups...") | 1623 (message "Listing all groups...") |
1627 (gnus-group-list-groups t) | 1624 (gnus-group-list-groups t) |
1628 (message "Listing all groups...done")) | 1625 (message "Listing all groups...done")) |
1629 | 1626 |
1630 (defun gnus-group-get-new-news () | 1627 (defun gnus-group-get-new-news () |
1631 "Get newly arrived articles. In fact, read the active file again." | 1628 "Get newly arrived articles. In fact, read the active file again." |
1632 (interactive) | 1629 (interactive) |
1633 (gnus-setup-news) | 1630 (gnus-setup-news) |
1634 (gnus-group-list-groups gnus-have-all-newsgroups)) | 1631 (gnus-group-list-groups gnus-have-all-newsgroups)) |
1635 | 1632 |
1636 (defun gnus-group-restart () | 1633 (defun gnus-group-restart () |
1685 (gnus-save-newsrc-file)) | 1682 (gnus-save-newsrc-file)) |
1686 | 1683 |
1687 (defun gnus-group-suspend () | 1684 (defun gnus-group-suspend () |
1688 "Suspend the current GNUS session. | 1685 "Suspend the current GNUS session. |
1689 In fact, cleanup buffers except for Group Mode buffer. | 1686 In fact, cleanup buffers except for Group Mode buffer. |
1690 The hook gnus-suspend-gnus-hook is called before actually suspending." | 1687 The hook `gnus-suspend-gnus-hook' is called before actually suspending." |
1691 (interactive) | 1688 (interactive) |
1692 (run-hooks 'gnus-suspend-gnus-hook) | 1689 (run-hooks 'gnus-suspend-gnus-hook) |
1693 ;; Kill GNUS buffers except for Group Mode buffer. | 1690 ;; Kill GNUS buffers except for Group Mode buffer. |
1694 (let ((buffers gnus-buffer-list) | 1691 (let ((buffers gnus-buffer-list) |
1695 (group-buf (get-buffer gnus-group-buffer))) | 1692 (group-buf (get-buffer gnus-group-buffer))) |
1701 ) | 1698 ) |
1702 (bury-buffer group-buf) | 1699 (bury-buffer group-buf) |
1703 (delete-windows-on group-buf t))) | 1700 (delete-windows-on group-buf t))) |
1704 | 1701 |
1705 (defun gnus-group-exit () | 1702 (defun gnus-group-exit () |
1706 "Quit reading news after updating .newsrc. | 1703 "Quit reading news after updating `.newsrc'. |
1707 The hook gnus-exit-gnus-hook is called before actually quitting." | 1704 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
1708 (interactive) | 1705 (interactive) |
1709 (if (or noninteractive ;For gnus-batch-kill | 1706 (if (or noninteractive ;For gnus-batch-kill |
1710 (zerop (buffer-size)) ;No news is good news. | 1707 (zerop (buffer-size)) ;No news is good news. |
1711 (not (gnus-server-opened)) ;NNTP connection closed. | 1708 (not (gnus-server-opened)) ;NNTP connection closed. |
1712 (not gnus-interactive-exit) ;Without confirmation | 1709 (not gnus-interactive-exit) ;Without confirmation |
1718 (gnus-clear-system) | 1715 (gnus-clear-system) |
1719 (gnus-close-server)) | 1716 (gnus-close-server)) |
1720 )) | 1717 )) |
1721 | 1718 |
1722 (defun gnus-group-quit () | 1719 (defun gnus-group-quit () |
1723 "Quit reading news without updating .newsrc. | 1720 "Quit reading news without updating `.newsrc'. |
1724 The hook gnus-exit-gnus-hook is called before actually quitting." | 1721 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
1725 (interactive) | 1722 (interactive) |
1726 (if (or noninteractive ;For gnus-batch-kill | 1723 (if (or noninteractive ;For gnus-batch-kill |
1727 (zerop (buffer-size)) | 1724 (zerop (buffer-size)) |
1728 (not (gnus-server-opened)) | 1725 (not (gnus-server-opened)) |
1729 (yes-or-no-p | 1726 (yes-or-no-p |
2059 C-c C-s C-n Sort subjects by article number. | 2056 C-c C-s C-n Sort subjects by article number. |
2060 C-c C-s C-a Sort subjects by article author. | 2057 C-c C-s C-a Sort subjects by article author. |
2061 C-c C-s C-s Sort subjects alphabetically. | 2058 C-c C-s C-s Sort subjects alphabetically. |
2062 C-c C-s C-d Sort subjects by date. | 2059 C-c C-s C-d Sort subjects by date. |
2063 = Expand Summary window to show headers full window. | 2060 = Expand Summary window to show headers full window. |
2064 C-x C-s Reselect the current newsgroup. Prefix argument means to select all. | 2061 C-x C-s Reselect the current newsgroup. Prefix argument means to select all. |
2065 w Stop page breaking by linefeed. | 2062 w Stop page breaking by linefeed. |
2066 C-c C-r Caesar rotates letters by 13/47 places. | 2063 C-c C-r Caesar rotates letters by 13/47 places. |
2067 g Force to show the current article. | 2064 g Force to show the current article. |
2068 t Show original article header if pruned header currently shown, or | 2065 t Show original article header if pruned header currently shown, or |
2069 vice versa. | 2066 vice versa. |
2087 C-h m Describe Summary mode. | 2084 C-h m Describe Summary mode. |
2088 C-c C-i Read Info about Summary mode. | 2085 C-c C-i Read Info about Summary mode. |
2089 | 2086 |
2090 User customizable variables: | 2087 User customizable variables: |
2091 gnus-large-newsgroup | 2088 gnus-large-newsgroup |
2092 The number of articles which indicates a large newsgroup. If the | 2089 The number of articles which indicates a large newsgroup. If the |
2093 number of articles in a newsgroup is greater than the value, the | 2090 number of articles in a newsgroup is greater than the value, the |
2094 number of articles to be selected is asked for. If the given value | 2091 number of articles to be selected is asked for. If the given value |
2095 N is positive, the last N articles is selected. If N is negative, | 2092 N is positive, the last N articles is selected. If N is negative, |
2096 the first N articles are selected. An empty string means to select | 2093 the first N articles are selected. An empty string means to select |
2097 all articles. | 2094 all articles. |
2098 | 2095 |
2099 gnus-use-long-file-name | 2096 gnus-use-long-file-name |
2100 Non-nil means that a newsgroup name is used as a default file name | 2097 Non-nil means that a newsgroup name is used as a default file name |
2101 to save articles to. If it's nil, the directory form of a | 2098 to save articles to. If it's nil, the directory form of a |
2102 newsgroup is used instead. | 2099 newsgroup is used instead. |
2103 | 2100 |
2104 gnus-default-article-saver | 2101 gnus-default-article-saver |
2105 Specifies your favorite article saver which is interactively | 2102 Specifies your favorite article saver which is interactively |
2106 funcallable. Following functions are available: | 2103 funcallable. Following functions are available: |
2107 | 2104 |
2108 gnus-summary-save-in-rmail (in Rmail format) | 2105 gnus-summary-save-in-rmail (in Rmail format) |
2109 gnus-summary-save-in-mail (in Unix mail format) | 2106 gnus-summary-save-in-mail (in Unix mail format) |
2110 gnus-summary-save-in-folder (in MH folder) | 2107 gnus-summary-save-in-folder (in MH folder) |
2111 gnus-summary-save-in-file (in article format). | 2108 gnus-summary-save-in-file (in article format). |
2115 gnus-folder-save-name | 2112 gnus-folder-save-name |
2116 gnus-file-save-name | 2113 gnus-file-save-name |
2117 Specifies a function generating a file name to save articles in | 2114 Specifies a function generating a file name to save articles in |
2118 specified format. The function is called with NEWSGROUP, HEADERS, | 2115 specified format. The function is called with NEWSGROUP, HEADERS, |
2119 and optional LAST-FILE. Access macros to the headers are defined | 2116 and optional LAST-FILE. Access macros to the headers are defined |
2120 as nntp-header-FIELD, and functions are defined as | 2117 as `nntp-header-FIELD', and functions are defined as |
2121 gnus-header-FIELD. | 2118 `gnus-header-FIELD'. |
2122 | 2119 |
2123 gnus-article-save-directory | 2120 gnus-article-save-directory |
2124 Specifies a directory name to save articles to using the commands | 2121 Specifies a directory name to save articles to using the commands |
2125 gnus-summary-save-in-rmail, gnus-summary-save-in-mail and | 2122 `gnus-summary-save-in-rmail', `gnus-summary-save-in-mail' and |
2126 gnus-summary-save-in-file. The variable is initialized from the | 2123 `gnus-summary-save-in-file'. The variable is initialized from the |
2127 SAVEDIR environment variable. | 2124 SAVEDIR environment variable. |
2128 | 2125 |
2129 gnus-kill-files-directory | 2126 gnus-kill-files-directory |
2130 Specifies a directory name to save KILL files to using the commands | 2127 Specifies a directory name to save KILL files to using the commands |
2131 gnus-edit-global-kill, and gnus-edit-local-kill. The variable is | 2128 `gnus-edit-global-kill', and `gnus-edit-local-kill'. The variable is |
2132 initialized from the SAVEDIR environment variable. | 2129 initialized from the SAVEDIR environment variable. |
2133 | 2130 |
2134 gnus-show-all-headers | 2131 gnus-show-all-headers |
2135 Non-nil means that all headers of an article are shown. | 2132 Non-nil means that all headers of an article are shown. |
2136 | 2133 |
2159 gnus-thread-indent-level | 2156 gnus-thread-indent-level |
2160 Indentation of thread subtrees. | 2157 Indentation of thread subtrees. |
2161 | 2158 |
2162 gnus-optional-headers | 2159 gnus-optional-headers |
2163 Specifies a function which generates an optional string displayed | 2160 Specifies a function which generates an optional string displayed |
2164 in the Summary buffer. The function is called with an article | 2161 in the Summary buffer. The function is called with an article |
2165 HEADERS. The result must be a string excluding `[' and `]'. The | 2162 HEADERS. The result must be a string excluding `[' and `]'. The |
2166 default function returns a string like NNN:AUTHOR, where NNN is | 2163 default function returns a string like NNN:AUTHOR, where NNN is |
2167 the number of lines in an article and AUTHOR is the name of the | 2164 the number of lines in an article and AUTHOR is the name of the |
2168 author. | 2165 author. |
2169 | 2166 |
2171 Non-nil means visible articles are extended to forward and | 2168 Non-nil means visible articles are extended to forward and |
2172 backward automatically if possible. | 2169 backward automatically if possible. |
2173 | 2170 |
2174 gnus-auto-select-first | 2171 gnus-auto-select-first |
2175 Non-nil means the first unread article is selected automagically | 2172 Non-nil means the first unread article is selected automagically |
2176 when a newsgroup is selected normally (by gnus-group-read-group). | 2173 when a newsgroup is selected normally (by `gnus-group-read-group'). |
2177 If you'd like to prevent automatic selection of the first unread | 2174 If you'd like to prevent automatic selection of the first unread |
2178 article in some newsgroups, set the variable to nil in | 2175 article in some newsgroups, set the variable to nil in |
2179 gnus-select-group-hook or gnus-apply-kill-hook. | 2176 `gnus-select-group-hook' or `gnus-apply-kill-hook'. |
2180 | 2177 |
2181 gnus-auto-select-next | 2178 gnus-auto-select-next |
2182 Non-nil means the next newsgroup is selected automagically at the | 2179 Non-nil means the next newsgroup is selected automagically at the |
2183 end of the newsgroup. If the value is t and the next newsgroup is | 2180 end of the newsgroup. If the value is t and the next newsgroup is |
2184 empty (no unread articles), GNUS will exit Summary mode and go | 2181 empty (no unread articles), GNUS will exit Summary mode and go |
2185 back to Group mode. If the value is neither nil nor t, GNUS won't | 2182 back to Group mode. If the value is neither nil nor t, GNUS won't |
2186 exit Summary mode but select the following unread newsgroup. | 2183 exit Summary mode but select the following unread newsgroup. |
2187 Especially, if the value is the symbol `quietly', the next unread | 2184 Especially, if the value is the symbol `quietly', the next unread |
2188 newsgroup will be selected without any confirmations. | 2185 newsgroup will be selected without any confirmations. |
2189 | 2186 |
2190 gnus-auto-select-same | 2187 gnus-auto-select-same |
2202 | 2199 |
2203 gnus-page-delimiter | 2200 gnus-page-delimiter |
2204 Specifies a regexp describing line-beginnings that separate pages | 2201 Specifies a regexp describing line-beginnings that separate pages |
2205 of news article. | 2202 of news article. |
2206 | 2203 |
2207 [gnus-more-message is obsolete. overlay-arrow-string interfares | |
2208 with other subsystems, such as dbx mode.] | |
2209 | |
2210 gnus-digest-show-summary | 2204 gnus-digest-show-summary |
2211 Non-nil means that a summary of digest messages is shown when | 2205 Non-nil means that a summary of digest messages is shown when |
2212 reading a digest article using `gnus-summary-rmail-digest' | 2206 reading a digest article using `gnus-summary-rmail-digest' |
2213 command. | 2207 command. |
2214 | 2208 |
2216 Specifies a regexp separating messages in a digest article. | 2210 Specifies a regexp separating messages in a digest article. |
2217 | 2211 |
2218 gnus-mail-reply-method | 2212 gnus-mail-reply-method |
2219 gnus-mail-other-window-method | 2213 gnus-mail-other-window-method |
2220 Specifies a function to begin composing mail message using | 2214 Specifies a function to begin composing mail message using |
2221 commands gnus-summary-reply and gnus-summary-mail-other-window. | 2215 commands `gnus-summary-reply' and `gnus-summary-mail-other-window'. |
2222 Functions gnus-mail-reply-using-mail and gnus-mail-reply-using-mhe | 2216 Functions `gnus-mail-reply-using-mail' and `gnus-mail-reply-using-mhe' |
2223 are available for the value of gnus-mail-reply-method. And | 2217 are available for the value of `gnus-mail-reply-method'. And |
2224 functions gnus-mail-other-window-using-mail and | 2218 functions `gnus-mail-other-window-using-mail' and |
2225 gnus-mail-other-window-using-mhe are available for the value of | 2219 `gnus-mail-other-window-using-mhe' are available for the value of |
2226 gnus-mail-other-window-method. | 2220 `gnus-mail-other-window-method'. |
2227 | 2221 |
2228 gnus-mail-send-method | 2222 gnus-mail-send-method |
2229 Specifies a function to mail a message too which is being posted | 2223 Specifies a function to mail a message too which is being posted |
2230 as an article. The message must have To: or Cc: field. The value | 2224 as an article. The message must have To: or Cc: field. The value |
2231 of the variable send-mail-function is the default function which | 2225 of the variable `send-mail-function' is the default function, which |
2232 uses sendmail mail program. | 2226 uses sendmail mail program. |
2233 | 2227 |
2234 Various hooks for customization: | 2228 Various hooks for customization: |
2235 gnus-summary-mode-hook | 2229 gnus-summary-mode-hook |
2236 Entry to this mode calls the value with no arguments, if that | 2230 Entry to this mode calls the value with no arguments, if that |
2237 value is non-nil. | 2231 value is non-nil. |
2238 | 2232 |
2239 gnus-select-group-hook | 2233 gnus-select-group-hook |
2240 Called with no arguments when newsgroup is selected, if that value | 2234 Called with no arguments when newsgroup is selected, if that value |
2241 is non-nil. It is possible to sort subjects in this hook. See the | 2235 is non-nil. It is possible to sort subjects in this hook. See the |
2242 documentation of this variable for more information. | 2236 documentation of this variable for more information. |
2243 | 2237 |
2244 gnus-summary-prepare-hook | 2238 gnus-summary-prepare-hook |
2245 Called with no arguments after a summary list is created in the | 2239 Called with no arguments after a summary list is created in the |
2246 Summary buffer, if that value is non-nil. If you'd like to modify | 2240 Summary buffer, if that value is non-nil. If you'd like to modify |
2247 the buffer, you can use this hook. | 2241 the buffer, you can use this hook. |
2248 | 2242 |
2249 gnus-select-article-hook | 2243 gnus-select-article-hook |
2250 Called with no arguments when an article is selected, if that | 2244 Called with no arguments when an article is selected, if that |
2251 value is non-nil. See the documentation of this variable for more | 2245 value is non-nil. See the documentation of this variable for more |
2252 information. | 2246 information. |
2253 | 2247 |
2254 gnus-select-digest-hook | 2248 gnus-select-digest-hook |
2255 Called with no arguments when reading digest messages using Rmail, | 2249 Called with no arguments when reading digest messages using Rmail, |
2256 if that value is non-nil. This hook can be used to modify an | 2250 if that value is non-nil. This hook can be used to modify an |
2257 article so that Rmail can work with it. See the documentation of | 2251 article so that Rmail can work with it. See the documentation of |
2258 the variable for more information. | 2252 the variable for more information. |
2259 | 2253 |
2260 gnus-rmail-digest-hook | 2254 gnus-rmail-digest-hook |
2261 Called with no arguments when reading digest messages using Rmail, | 2255 Called with no arguments when reading digest messages using Rmail, |
2262 if that value is non-nil. This hook is intended to customize Rmail | 2256 if that value is non-nil. This hook is intended to customize Rmail |
2263 mode. | 2257 mode. |
2264 | 2258 |
2265 gnus-apply-kill-hook | 2259 gnus-apply-kill-hook |
2266 Called with no arguments when a newsgroup is selected and the | 2260 Called with no arguments when a newsgroup is selected and the |
2267 Summary buffer is prepared. This hook is intended to apply a KILL | 2261 Summary buffer is prepared. This hook is intended to apply a KILL |
2268 file to the selected newsgroup. The format of KILL file is | 2262 file to the selected newsgroup. The format of KILL file is |
2269 completely different from that of version 3.8. You have to rewrite | 2263 completely different from that of version 3.8. You have to rewrite |
2270 them in the new format. See the documentation of Kill file mode | 2264 them in the new format. See the documentation of Kill file mode |
2271 for more information. | 2265 for more information. |
2272 | 2266 |
2273 gnus-mark-article-hook | 2267 gnus-mark-article-hook |
2274 Called with no arguments when an article is selected at the first | 2268 Called with no arguments when an article is selected at the first |
2275 time. The hook is intended to mark an article as read (or unread) | 2269 time. The hook is intended to mark an article as read (or unread) |
2276 automatically when it is selected. See the documentation of the | 2270 automatically when it is selected. See the documentation of the |
2277 variable for more information. | 2271 variable for more information. |
2278 | 2272 |
2279 gnus-exit-group-hook | 2273 gnus-exit-group-hook |
2280 Called with no arguments when exiting the current newsgroup, if | 2274 Called with no arguments when exiting the current newsgroup, if |
2281 that value is non-nil. If your machine is so slow that exiting | 2275 that value is non-nil. If your machine is so slow that exiting |
2282 from Summary mode takes very long time, inhibit marking articles | 2276 from Summary mode takes very long time, inhibit marking articles |
2283 as read using cross-references by setting the variable | 2277 as read using cross-references by setting the variable |
2284 gnus-use-cross-reference to nil in this hook." | 2278 gnus-use-cross-reference to nil in this hook." |
2285 (interactive) | 2279 (interactive) |
2286 (kill-all-local-variables) | 2280 (kill-all-local-variables) |
2494 | 2488 |
2495 ;; New implementation in gnus 3.14.3 | 2489 ;; New implementation in gnus 3.14.3 |
2496 | 2490 |
2497 (defun gnus-summary-set-mode-line () | 2491 (defun gnus-summary-set-mode-line () |
2498 "Set Summary mode line string. | 2492 "Set Summary mode line string. |
2499 If you don't like it, define your own gnus-summary-set-mode-line." | 2493 If you don't like it, define your own `gnus-summary-set-mode-line'." |
2500 (let ((unmarked | 2494 (let ((unmarked |
2501 (- (length gnus-newsgroup-unreads) | 2495 (- (length gnus-newsgroup-unreads) |
2502 (length (gnus-intersection | 2496 (length (gnus-intersection |
2503 gnus-newsgroup-unreads gnus-newsgroup-marked)))) | 2497 gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
2504 (unselected | 2498 (unselected |
2584 If 2nd optional argument SUBJECT is non-nil, the article which has | 2578 If 2nd optional argument SUBJECT is non-nil, the article which has |
2585 the same subject will be searched for." | 2579 the same subject will be searched for." |
2586 (gnus-summary-search-subject t unread subject)) | 2580 (gnus-summary-search-subject t unread subject)) |
2587 | 2581 |
2588 (defun gnus-summary-article-number () | 2582 (defun gnus-summary-article-number () |
2589 "Article number around point. If nothing, return current number." | 2583 "Return the Article number around point. |
2584 If none, return current article number." | |
2590 (save-excursion | 2585 (save-excursion |
2591 (beginning-of-line) | 2586 (beginning-of-line) |
2592 (if (looking-at ".[ \t]+\\([0-9]+\\):") | 2587 (if (looking-at ".[ \t]+\\([0-9]+\\):") |
2593 (string-to-int | 2588 (string-to-int |
2594 (buffer-substring (match-beginning 1) (match-end 1))) | 2589 (buffer-substring (match-beginning 1) (match-end 1))) |
2678 (gnus-summary-read-group group nil no-article) | 2673 (gnus-summary-read-group group nil no-article) |
2679 (or (eq (current-buffer) | 2674 (or (eq (current-buffer) |
2680 (get-buffer gnus-summary-buffer)) | 2675 (get-buffer gnus-summary-buffer)) |
2681 (eq gnus-auto-select-next t) | 2676 (eq gnus-auto-select-next t) |
2682 ;; Expected newsgroup has nothing to read since the articles | 2677 ;; Expected newsgroup has nothing to read since the articles |
2683 ;; are marked as read by cross-referencing. So, try next | 2678 ;; are marked as read by cross-referencing. So, try next |
2684 ;; newsgroup. (Make sure we are in Group mode buffer now.) | 2679 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
2685 (and (eq (current-buffer) | 2680 (and (eq (current-buffer) |
2686 (get-buffer gnus-group-buffer)) | 2681 (get-buffer gnus-group-buffer)) |
2687 (gnus-group-group-name) | 2682 (gnus-group-group-name) |
2688 (gnus-summary-read-group | 2683 (gnus-summary-read-group |
2689 (gnus-group-group-name) nil no-article)) | 2684 (gnus-group-group-name) nil no-article)) |
2711 (gnus-summary-read-group group nil no-article) | 2706 (gnus-summary-read-group group nil no-article) |
2712 (or (eq (current-buffer) | 2707 (or (eq (current-buffer) |
2713 (get-buffer gnus-summary-buffer)) | 2708 (get-buffer gnus-summary-buffer)) |
2714 (eq gnus-auto-select-next t) | 2709 (eq gnus-auto-select-next t) |
2715 ;; Expected newsgroup has nothing to read since the articles | 2710 ;; Expected newsgroup has nothing to read since the articles |
2716 ;; are marked as read by cross-referencing. So, try next | 2711 ;; are marked as read by cross-referencing. So, try next |
2717 ;; newsgroup. (Make sure we are in Group mode buffer now.) | 2712 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
2718 (and (eq (current-buffer) | 2713 (and (eq (current-buffer) |
2719 (get-buffer gnus-group-buffer)) | 2714 (get-buffer gnus-group-buffer)) |
2720 (gnus-summary-search-group t) | 2715 (gnus-summary-search-group t) |
2721 (gnus-summary-read-group | 2716 (gnus-summary-read-group |
2722 (gnus-summary-search-group t) nil no-article)) | 2717 (gnus-summary-search-group t) nil no-article)) |
2724 ))) | 2719 ))) |
2725 | 2720 |
2726 ;; Walking around summary lines. | 2721 ;; Walking around summary lines. |
2727 | 2722 |
2728 (defun gnus-summary-next-subject (n &optional unread) | 2723 (defun gnus-summary-next-subject (n &optional unread) |
2729 "Go to next N'th summary line. | 2724 "Go to Nth following summary line. |
2730 If optional argument UNREAD is non-nil, only unread article is selected." | 2725 If optional argument UNREAD is non-nil, only unread article is selected." |
2731 (interactive "p") | 2726 (interactive "p") |
2732 (while (and (> n 1) | 2727 (while (and (> n 1) |
2733 (gnus-summary-search-forward unread)) | 2728 (gnus-summary-search-forward unread)) |
2734 (setq n (1- n))) | 2729 (setq n (1- n))) |
2739 (t | 2734 (t |
2740 (message "No more articles")) | 2735 (message "No more articles")) |
2741 )) | 2736 )) |
2742 | 2737 |
2743 (defun gnus-summary-next-unread-subject (n) | 2738 (defun gnus-summary-next-unread-subject (n) |
2744 "Go to next N'th unread summary line." | 2739 "Go to Nth following unread summary line." |
2745 (interactive "p") | 2740 (interactive "p") |
2746 (gnus-summary-next-subject n t)) | 2741 (gnus-summary-next-subject n t)) |
2747 | 2742 |
2748 (defun gnus-summary-prev-subject (n &optional unread) | 2743 (defun gnus-summary-prev-subject (n &optional unread) |
2749 "Go to previous N'th summary line. | 2744 "Go to Nth previous summary line. |
2750 If optional argument UNREAD is non-nil, only unread article is selected." | 2745 If optional argument UNREAD is non-nil, only unread article is selected." |
2751 (interactive "p") | 2746 (interactive "p") |
2752 (while (and (> n 1) | 2747 (while (and (> n 1) |
2753 (gnus-summary-search-backward unread)) | 2748 (gnus-summary-search-backward unread)) |
2754 (setq n (1- n))) | 2749 (setq n (1- n))) |
2759 (t | 2754 (t |
2760 (message "No more articles")) | 2755 (message "No more articles")) |
2761 )) | 2756 )) |
2762 | 2757 |
2763 (defun gnus-summary-prev-unread-subject (n) | 2758 (defun gnus-summary-prev-unread-subject (n) |
2764 "Go to previous N'th unread summary line." | 2759 "Go to Nth previous unread summary line." |
2765 (interactive "p") | 2760 (interactive "p") |
2766 (gnus-summary-prev-subject n t)) | 2761 (gnus-summary-prev-subject n t)) |
2767 | 2762 |
2768 ;; Walking around summary lines with displaying articles. | 2763 ;; Walking around summary lines with displaying articles. |
2769 | 2764 |
2978 (t | 2973 (t |
2979 (message "No more articles")) | 2974 (message "No more articles")) |
2980 ))) | 2975 ))) |
2981 | 2976 |
2982 (defun gnus-summary-prev-unread-article () | 2977 (defun gnus-summary-prev-unread-article () |
2983 "Select unred article before current one." | 2978 "Select unread article before current one." |
2984 (interactive) | 2979 (interactive) |
2985 (gnus-summary-prev-article t (and gnus-auto-select-same | 2980 (gnus-summary-prev-article t (and gnus-auto-select-same |
2986 (gnus-summary-subject-string)))) | 2981 (gnus-summary-subject-string)))) |
2987 | 2982 |
2988 (defun gnus-summary-next-page (lines) | 2983 (defun gnus-summary-next-page (lines) |
3056 | 3051 |
3057 (defun gnus-summary-refer-parent-article (child) | 3052 (defun gnus-summary-refer-parent-article (child) |
3058 "Refer parent article of current article. | 3053 "Refer parent article of current article. |
3059 If a prefix argument CHILD is non-nil, go back to the child article | 3054 If a prefix argument CHILD is non-nil, go back to the child article |
3060 using internally maintained articles history. | 3055 using internally maintained articles history. |
3061 NOTE: This command may not work with nnspool.el." | 3056 NOTE: This command may not work with `nnspool.el'." |
3062 (interactive "P") | 3057 (interactive "P") |
3063 (gnus-summary-select-article t t) ;Request all headers. | 3058 (gnus-summary-select-article t t) ;Request all headers. |
3064 (let ((referenced-id nil)) ;Message-id of parent or child article. | 3059 (let ((referenced-id nil)) ;Message-id of parent or child article. |
3065 (if child | 3060 (if child |
3066 ;; Go back to child article using history. | 3061 ;; Go back to child article using history. |
3084 | 3079 |
3085 (defun gnus-summary-refer-article (message-id) | 3080 (defun gnus-summary-refer-article (message-id) |
3086 "Refer article specified by MESSAGE-ID. | 3081 "Refer article specified by MESSAGE-ID. |
3087 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from | 3082 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from |
3088 internally maintained articles history. | 3083 internally maintained articles history. |
3089 NOTE: This command may not work with nnspool.el nor mhspool.el." | 3084 NOTE: This command may not work with `nnspool.el' nor `mhspool.el'." |
3090 (interactive "sMessage-ID: ") | 3085 (interactive "sMessage-ID: ") |
3091 ;; Make sure that this command depends on the fact that article | 3086 ;; Make sure that this command depends on the fact that article |
3092 ;; related information is not updated when an article is retrieved | 3087 ;; related information is not updated when an article is retrieved |
3093 ;; by Message-ID. | 3088 ;; by Message-ID. |
3094 (gnus-summary-select-article t t) ;Request all headers. | 3089 (gnus-summary-select-article t t) ;Request all headers. |
3119 ;; nnspool nor mhspool. | 3114 ;; nnspool nor mhspool. |
3120 (gnus-article-prepare message-id t) | 3115 (gnus-article-prepare message-id t) |
3121 (error "No such references")) | 3116 (error "No such references")) |
3122 ) | 3117 ) |
3123 | 3118 |
3124 (defun gnus-summary-next-digest (nth) | 3119 (defun gnus-summary-next-digest (n) |
3125 "Move to head of NTH next digested message." | 3120 "Move to head of Nth next digested message." |
3126 (interactive "p") | 3121 (interactive "p") |
3127 (gnus-summary-select-article) | 3122 (gnus-summary-select-article) |
3128 (gnus-eval-in-buffer-window gnus-article-buffer | 3123 (gnus-eval-in-buffer-window gnus-article-buffer |
3129 (gnus-article-next-digest (or nth 1)) | 3124 (gnus-article-next-digest (or n 1)) |
3130 )) | 3125 )) |
3131 | 3126 |
3132 (defun gnus-summary-prev-digest (nth) | 3127 (defun gnus-summary-prev-digest (n) |
3133 "Move to head of NTH previous digested message." | 3128 "Move to head of Nth previous digested message." |
3134 (interactive "p") | 3129 (interactive "p") |
3135 (gnus-summary-select-article) | 3130 (gnus-summary-select-article) |
3136 (gnus-eval-in-buffer-window gnus-article-buffer | 3131 (gnus-eval-in-buffer-window gnus-article-buffer |
3137 (gnus-article-prev-digest (or nth 1)) | 3132 (gnus-article-prev-digest (or n 1)))) |
3138 )) | |
3139 | 3133 |
3140 (defun gnus-summary-first-unread-article () | 3134 (defun gnus-summary-first-unread-article () |
3141 "Select first unread article. Return non-nil if successfully selected." | 3135 "Select first unread article. Return non-nil if successfully selected." |
3142 (interactive) | 3136 (interactive) |
3143 (let ((begin (point))) | 3137 (let ((begin (point))) |
3144 (goto-char (point-min)) | 3138 (goto-char (point-min)) |
3145 (if (re-search-forward "^ [ \t]+[0-9]+:" nil t) | 3139 (if (re-search-forward "^ [ \t]+[0-9]+:" nil t) |
3146 (gnus-summary-display-article (gnus-summary-article-number)) | 3140 (gnus-summary-display-article (gnus-summary-article-number)) |
3159 (gnus-eval-in-buffer-window gnus-article-buffer | 3153 (gnus-eval-in-buffer-window gnus-article-buffer |
3160 (isearch-forward))) | 3154 (isearch-forward))) |
3161 | 3155 |
3162 (defun gnus-summary-search-article-forward (regexp) | 3156 (defun gnus-summary-search-article-forward (regexp) |
3163 "Search for an article containing REGEXP forward. | 3157 "Search for an article containing REGEXP forward. |
3164 gnus-select-article-hook is not called during the search." | 3158 `gnus-select-article-hook' is not called for articles examined |
3159 by searching search." | |
3165 (interactive | 3160 (interactive |
3166 (list (read-string | 3161 (list (read-string |
3167 (concat "Search forward (regexp): " | 3162 (concat "Search forward (regexp): " |
3168 (if gnus-last-search-regexp | 3163 (if gnus-last-search-regexp |
3169 (concat "(default " gnus-last-search-regexp ") ")))))) | 3164 (concat "(default " gnus-last-search-regexp ") ")))))) |
3178 (error "Search failed: \"%s\"" regexp) | 3173 (error "Search failed: \"%s\"" regexp) |
3179 )) | 3174 )) |
3180 | 3175 |
3181 (defun gnus-summary-search-article-backward (regexp) | 3176 (defun gnus-summary-search-article-backward (regexp) |
3182 "Search for an article containing REGEXP backward. | 3177 "Search for an article containing REGEXP backward. |
3183 gnus-select-article-hook is not called during the search." | 3178 `gnus-select-article-hook' is not called for articles examined |
3179 by searching search." | |
3184 (interactive | 3180 (interactive |
3185 (list (read-string | 3181 (list (read-string |
3186 (concat "Search backward (regexp): " | 3182 (concat "Search backward (regexp): " |
3187 (if gnus-last-search-regexp | 3183 (if gnus-last-search-regexp |
3188 (concat "(default " gnus-last-search-regexp ") ")))))) | 3184 (concat "(default " gnus-last-search-regexp ") ")))))) |
3198 )) | 3194 )) |
3199 | 3195 |
3200 (defun gnus-summary-search-article (regexp &optional backward) | 3196 (defun gnus-summary-search-article (regexp &optional backward) |
3201 "Search for an article containing REGEXP. | 3197 "Search for an article containing REGEXP. |
3202 Optional argument BACKWARD means do search for backward. | 3198 Optional argument BACKWARD means do search for backward. |
3203 gnus-select-article-hook is not called during the search." | 3199 `gnus-select-article-hook' is not called for articles examined |
3200 by searching search." | |
3204 (let ((gnus-select-article-hook nil) ;Disable hook. | 3201 (let ((gnus-select-article-hook nil) ;Disable hook. |
3205 (gnus-mark-article-hook nil) ;Inhibit marking as read. | 3202 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
3206 (re-search | 3203 (re-search |
3207 (if backward | 3204 (if backward |
3208 (function re-search-backward) (function re-search-forward))) | 3205 (function re-search-backward) (function re-search-forward))) |
3263 ;; We'd like to execute COMMAND interactively so as to give arguments. | 3260 ;; We'd like to execute COMMAND interactively so as to give arguments. |
3264 (gnus-execute field regexp | 3261 (gnus-execute field regexp |
3265 (` (lambda () | 3262 (` (lambda () |
3266 (call-interactively '(, (key-binding command))))) | 3263 (call-interactively '(, (key-binding command))))) |
3267 backward) | 3264 backward) |
3268 (message "Executing %s... done" (key-description command))))) | 3265 (message "Executing %s...done" (key-description command))))) |
3269 | 3266 |
3270 (defun gnus-summary-beginning-of-article () | 3267 (defun gnus-summary-beginning-of-article () |
3271 "Go to beginning of article body" | 3268 "Go to beginning of article body." |
3272 (interactive) | 3269 (interactive) |
3273 (gnus-summary-select-article) | 3270 (gnus-summary-select-article) |
3274 (gnus-eval-in-buffer-window gnus-article-buffer | 3271 (gnus-eval-in-buffer-window gnus-article-buffer |
3275 (widen) | 3272 (widen) |
3276 (beginning-of-buffer) | 3273 (beginning-of-buffer) |
3277 (if gnus-break-pages | 3274 (if gnus-break-pages |
3278 (gnus-narrow-to-page)) | 3275 (gnus-narrow-to-page)) |
3279 )) | 3276 )) |
3280 | 3277 |
3281 (defun gnus-summary-end-of-article () | 3278 (defun gnus-summary-end-of-article () |
3282 "Go to end of article body" | 3279 "Go to end of article body." |
3283 (interactive) | 3280 (interactive) |
3284 (gnus-summary-select-article) | 3281 (gnus-summary-select-article) |
3285 (gnus-eval-in-buffer-window gnus-article-buffer | 3282 (gnus-eval-in-buffer-window gnus-article-buffer |
3286 (widen) | 3283 (widen) |
3287 (end-of-buffer) | 3284 (end-of-buffer) |
3288 (if gnus-break-pages | 3285 (if gnus-break-pages |
3289 (gnus-narrow-to-page)) | 3286 (gnus-narrow-to-page)) |
3290 )) | 3287 )) |
3291 | 3288 |
3292 (defun gnus-summary-goto-article (article &optional all-headers) | 3289 (defun gnus-summary-goto-article (article &optional all-headers) |
3293 "Read ARTICLE if exists. | 3290 "Read article number ARTICLE if it exists. |
3294 Optional argument ALL-HEADERS means all headers are shown." | 3291 Optional argument ALL-HEADERS means show the full header." |
3295 (interactive | 3292 (interactive |
3296 (list | 3293 (list |
3297 (string-to-int | 3294 (string-to-int |
3298 (completing-read "Article number: " | 3295 (completing-read "Article number: " |
3299 (mapcar | 3296 (mapcar |
3345 ;; The following is a trick to force to read the current article again. | 3342 ;; The following is a trick to force to read the current article again. |
3346 (setq gnus-have-all-headers (not gnus-have-all-headers)) | 3343 (setq gnus-have-all-headers (not gnus-have-all-headers)) |
3347 (gnus-summary-select-article (not gnus-have-all-headers) t)) | 3344 (gnus-summary-select-article (not gnus-have-all-headers) t)) |
3348 | 3345 |
3349 (defun gnus-summary-stop-page-breaking () | 3346 (defun gnus-summary-stop-page-breaking () |
3350 "Stop page breaking by linefeed temporary (Widen article buffer)." | 3347 "Stop page breaking by linefeed temporary (widen article buffer)." |
3351 (interactive) | 3348 (interactive) |
3352 (gnus-summary-select-article) | 3349 (gnus-summary-select-article) |
3353 (gnus-eval-in-buffer-window gnus-article-buffer | 3350 (gnus-eval-in-buffer-window gnus-article-buffer |
3354 (widen) | 3351 (widen) |
3355 )) | 3352 )) |
3362 (if unmark | 3359 (if unmark |
3363 (setq unmark (prefix-numeric-value unmark))) | 3360 (setq unmark (prefix-numeric-value unmark))) |
3364 (let ((count | 3361 (let ((count |
3365 (gnus-summary-mark-same-subject | 3362 (gnus-summary-mark-same-subject |
3366 (gnus-summary-subject-string) unmark))) | 3363 (gnus-summary-subject-string) unmark))) |
3367 ;; Select next unread article. If auto-select-same mode, should | 3364 ;; Select next unread article. If auto-select-same mode, should |
3368 ;; select the first unread article. | 3365 ;; select the first unread article. |
3369 (gnus-summary-next-article t (and gnus-auto-select-same | 3366 (gnus-summary-next-article t (and gnus-auto-select-same |
3370 (gnus-summary-subject-string))) | 3367 (gnus-summary-subject-string))) |
3371 (message "%d articles are marked as %s" | 3368 (message "%d articles are marked as %s" |
3372 count (if unmark "unread" "read")) | 3369 count (if unmark "unread" "read")) |
3458 (insert (if clear-mark " " "-")))) | 3455 (insert (if clear-mark " " "-")))) |
3459 ))) | 3456 ))) |
3460 | 3457 |
3461 (defun gnus-summary-mark-as-read-forward (count) | 3458 (defun gnus-summary-mark-as-read-forward (count) |
3462 "Mark current article as read, and then go forward. | 3459 "Mark current article as read, and then go forward. |
3463 Argument COUNT specifies number of articles marked as read" | 3460 Argument COUNT specifies number of articles marked as read." |
3464 (interactive "p") | 3461 (interactive "p") |
3465 (while (> count 0) | 3462 (while (> count 0) |
3466 (gnus-summary-mark-as-read) | 3463 (gnus-summary-mark-as-read) |
3467 (gnus-summary-next-subject 1 'unread-only) | 3464 (gnus-summary-next-subject 1 'unread-only) |
3468 (setq count (1- count)))) | 3465 (setq count (1- count)))) |
3469 | 3466 |
3470 (defun gnus-summary-mark-as-read-backward (count) | 3467 (defun gnus-summary-mark-as-read-backward (count) |
3471 "Mark current article as read, and then go backward. | 3468 "Mark current article as read, and then go backward. |
3472 Argument COUNT specifies number of articles marked as read" | 3469 Argument COUNT specifies number of articles marked as read." |
3473 (interactive "p") | 3470 (interactive "p") |
3474 (while (> count 0) | 3471 (while (> count 0) |
3475 (gnus-summary-mark-as-read) | 3472 (gnus-summary-mark-as-read) |
3476 (gnus-summary-prev-subject 1 'unread-only) | 3473 (gnus-summary-prev-subject 1 'unread-only) |
3477 (setq count (1- count)))) | 3474 (setq count (1- count)))) |
3498 (insert mark))) | 3495 (insert mark))) |
3499 ))) | 3496 ))) |
3500 | 3497 |
3501 (defun gnus-summary-clear-mark-forward (count) | 3498 (defun gnus-summary-clear-mark-forward (count) |
3502 "Remove current article's mark, and go forward. | 3499 "Remove current article's mark, and go forward. |
3503 Argument COUNT specifies number of articles unmarked" | 3500 Argument COUNT specifies number of articles unmarked." |
3504 (interactive "p") | 3501 (interactive "p") |
3505 (while (> count 0) | 3502 (while (> count 0) |
3506 (gnus-summary-mark-as-unread nil t) | 3503 (gnus-summary-mark-as-unread nil t) |
3507 (gnus-summary-next-subject 1 nil) | 3504 (gnus-summary-next-subject 1 nil) |
3508 (setq count (1- count)))) | 3505 (setq count (1- count)))) |
3509 | 3506 |
3510 (defun gnus-summary-clear-mark-backward (count) | 3507 (defun gnus-summary-clear-mark-backward (count) |
3511 "Remove current article's mark, and go backward. | 3508 "Remove current article's mark, and go backward. |
3512 Argument COUNT specifies number of articles unmarked" | 3509 Argument COUNT specifies number of articles unmarked." |
3513 (interactive "p") | 3510 (interactive "p") |
3514 (while (> count 0) | 3511 (while (> count 0) |
3515 (gnus-summary-mark-as-unread nil t) | 3512 (gnus-summary-mark-as-unread nil t) |
3516 (gnus-summary-prev-subject 1 nil) | 3513 (gnus-summary-prev-subject 1 nil) |
3517 (setq count (1- count)))) | 3514 (setq count (1- count)))) |
3518 | 3515 |
3519 (defun gnus-summary-delete-marked-as-read () | 3516 (defun gnus-summary-delete-marked-as-read () |
3520 "Delete lines which is marked as read." | 3517 "Delete summary lines for articles that are marked as read." |
3521 (interactive) | 3518 (interactive) |
3522 (if gnus-newsgroup-unreads | 3519 (if gnus-newsgroup-unreads |
3523 (let ((buffer-read-only nil)) | 3520 (let ((buffer-read-only nil)) |
3524 (save-excursion | 3521 (save-excursion |
3525 (goto-char (point-min)) | 3522 (goto-char (point-min)) |
3793 (nntp-header-from a)))) | 3790 (nntp-header-from a)))) |
3794 reverse | 3791 reverse |
3795 )) | 3792 )) |
3796 | 3793 |
3797 (defun gnus-summary-sort-by-subject (reverse) | 3794 (defun gnus-summary-sort-by-subject (reverse) |
3798 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. | 3795 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. |
3799 If case-fold-search is non-nil, case of letters is ignored. | 3796 If case-fold-search is non-nil, case of letters is ignored. |
3800 Argument REVERSE means reverse order." | 3797 Argument REVERSE means reverse order." |
3801 (interactive "P") | 3798 (interactive "P") |
3802 (gnus-summary-keysort-summary | 3799 (gnus-summary-keysort-summary |
3803 (function string-lessp) | 3800 (function string-lessp) |
3873 )) | 3870 )) |
3874 )) | 3871 )) |
3875 | 3872 |
3876 (defun gnus-summary-rmail-digest () | 3873 (defun gnus-summary-rmail-digest () |
3877 "Run RMAIL on current digest article. | 3874 "Run RMAIL on current digest article. |
3878 gnus-select-digest-hook will be called with no arguments, if that | 3875 `gnus-select-digest-hook' will be called with no arguments, if that |
3879 value is non-nil. It is possible to modify the article so that Rmail | 3876 value is non-nil. It is possible to modify the article so that Rmail |
3880 can work with it. | 3877 can work with it. |
3881 gnus-rmail-digest-hook will be called with no arguments, if that value | 3878 `gnus-rmail-digest-hook' will be called with no arguments, if that value |
3882 is non-nil. The hook is intended to customize Rmail mode." | 3879 is non-nil. The hook is intended to customize Rmail mode." |
3883 (interactive) | 3880 (interactive) |
3884 (gnus-summary-select-article) | 3881 (gnus-summary-select-article) |
3885 (require 'rmail) | 3882 (require 'rmail) |
3886 (let ((artbuf gnus-article-buffer) | 3883 (let ((artbuf gnus-article-buffer) |
3887 (digbuf (get-buffer-create gnus-digest-buffer)) | 3884 (digbuf (get-buffer-create gnus-digest-buffer)) |
4214 (substitute-command-keys | 4211 (substitute-command-keys |
4215 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)"))) | 4212 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)"))) |
4216 | 4213 |
4217 (defun gnus-summary-exit (&optional temporary) | 4214 (defun gnus-summary-exit (&optional temporary) |
4218 "Exit reading current newsgroup, and then return to group selection mode. | 4215 "Exit reading current newsgroup, and then return to group selection mode. |
4219 gnus-exit-group-hook is called with no arguments if that value is non-nil." | 4216 `gnus-exit-group-hook' is called with no arguments if that value is non-nil." |
4220 (interactive) | 4217 (interactive) |
4221 (let ((updated nil) | 4218 (let ((updated nil) |
4222 (gnus-newsgroup-headers gnus-newsgroup-headers) | 4219 (gnus-newsgroup-headers gnus-newsgroup-headers) |
4223 (gnus-newsgroup-unreads gnus-newsgroup-unreads) | 4220 (gnus-newsgroup-unreads gnus-newsgroup-unreads) |
4224 (gnus-newsgroup-unselected gnus-newsgroup-unselected) | 4221 (gnus-newsgroup-unselected gnus-newsgroup-unselected) |
4358 )) | 4355 )) |
4359 | 4356 |
4360 (defun gnus-article-prepare (article &optional all-headers) | 4357 (defun gnus-article-prepare (article &optional all-headers) |
4361 "Prepare ARTICLE in Article mode buffer. | 4358 "Prepare ARTICLE in Article mode buffer. |
4362 ARTICLE can be either a article number or Message-ID. | 4359 ARTICLE can be either a article number or Message-ID. |
4363 If optional argument ALL-HEADERS is non-nil, all headers are inserted." | 4360 If optional argument ALL-HEADERS is non-nil, |
4361 include the article's whole original header." | |
4364 ;; Make sure a connection to NNTP server is alive. | 4362 ;; Make sure a connection to NNTP server is alive. |
4365 (if (not (gnus-server-opened)) | 4363 (if (not (gnus-server-opened)) |
4366 (progn | 4364 (progn |
4367 (gnus-start-news-server) | 4365 (gnus-start-news-server) |
4368 (gnus-request-group gnus-newsgroup-name))) | 4366 (gnus-request-group gnus-newsgroup-name))) |
4476 | 4474 |
4477 ;; New implementation in gnus 3.14.3 | 4475 ;; New implementation in gnus 3.14.3 |
4478 | 4476 |
4479 (defun gnus-article-set-mode-line () | 4477 (defun gnus-article-set-mode-line () |
4480 "Set Article mode line string. | 4478 "Set Article mode line string. |
4481 If you don't like it, define your own gnus-article-set-mode-line." | 4479 If you don't like it, define your own `gnus-article-set-mode-line'." |
4482 (let ((maxlen 15) ;Maximum subject length | 4480 (let ((maxlen 15) ;Maximum subject length |
4483 (subject | 4481 (subject |
4484 (if gnus-current-headers | 4482 (if gnus-current-headers |
4485 (nntp-header-subject gnus-current-headers) ""))) | 4483 (nntp-header-subject gnus-current-headers) ""))) |
4486 ;; The value must be a string to escape %-constructs because of subject. | 4484 ;; The value must be a string to escape %-constructs because of subject. |
4514 | 4512 |
4515 ;; Working on article's buffer | 4513 ;; Working on article's buffer |
4516 | 4514 |
4517 (defun gnus-article-next-page (lines) | 4515 (defun gnus-article-next-page (lines) |
4518 "Show next page of current article. | 4516 "Show next page of current article. |
4519 If end of article, return non-nil. Otherwise return nil. | 4517 If end of article, return non-nil. Otherwise return nil. |
4520 Argument LINES specifies lines to be scrolled up." | 4518 Argument LINES specifies lines to be scrolled up." |
4521 (interactive "P") | 4519 (interactive "P") |
4522 (move-to-window-line -1) | 4520 (move-to-window-line -1) |
4523 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) | 4521 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) |
4524 (if (save-excursion | 4522 (if (save-excursion |
4585 ;; Show From: and Subject: fields. | 4583 ;; Show From: and Subject: fields. |
4586 (recenter 1)) | 4584 (recenter 1)) |
4587 (message "End of message") | 4585 (message "End of message") |
4588 )) | 4586 )) |
4589 | 4587 |
4590 (defun gnus-article-prev-digest (nth) | 4588 (defun gnus-article-prev-digest (n) |
4591 "Move to head of NTH previous digested message." | 4589 "Move to head of Nth previous digested message." |
4592 ;; Stop page breaking in digest mode. | 4590 ;; Stop page breaking in digest mode. |
4593 (widen) | 4591 (widen) |
4594 (beginning-of-line) | 4592 (beginning-of-line) |
4595 ;; Skip NTH - 1 digest. | 4593 ;; Skip N - 1 digest. |
4596 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | 4594 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. |
4597 ;; Digest separator is customizable. | 4595 ;; Digest separator is customizable. |
4598 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | 4596 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. |
4599 (while (and (> nth 1) | 4597 (while (and (> n 1) |
4600 (re-search-backward gnus-digest-separator nil 'move)) | 4598 (re-search-backward gnus-digest-separator nil 'move)) |
4601 (setq nth (1- nth))) | 4599 (setq n (1- n))) |
4602 (if (re-search-backward gnus-digest-separator nil t) | 4600 (if (re-search-backward gnus-digest-separator nil t) |
4603 (let ((begin (point))) | 4601 (let ((begin (point))) |
4604 ;; Search for end of this message. | 4602 ;; Search for end of this message. |
4605 (end-of-line) | 4603 (end-of-line) |
4606 (if (re-search-forward gnus-digest-separator nil t) | 4604 (if (re-search-forward gnus-digest-separator nil t) |
4695 purpose is not so easy because the internal working of GNUS must be | 4693 purpose is not so easy because the internal working of GNUS must be |
4696 well-known. For this reason, GNUS provides a general function which | 4694 well-known. For this reason, GNUS provides a general function which |
4697 does this easily for non-Lisp programmers. | 4695 does this easily for non-Lisp programmers. |
4698 | 4696 |
4699 The `gnus-kill' function executes commands available in Summary Mode | 4697 The `gnus-kill' function executes commands available in Summary Mode |
4700 by their key sequences. `gnus-kill' should be called with FIELD, | 4698 by their key sequences. `gnus-kill' should be called with FIELD, |
4701 REGEXP and optional COMMAND and ALL. FIELD is a string representing | 4699 REGEXP and optional COMMAND and ALL. FIELD is a string representing |
4702 the header field or an empty string. If FIELD is an empty string, the | 4700 the header field or an empty string. If FIELD is an empty string, the |
4703 entire article body is searched for. REGEXP is a string which is | 4701 entire article body is searched for. REGEXP is a string which is |
4704 compared with FIELD value. COMMAND is a string representing a valid | 4702 compared with FIELD value. COMMAND is a string representing a valid |
4705 key sequence in Summary mode or Lisp expression. COMMAND defaults to | 4703 key sequence in Summary mode or Lisp expression. COMMAND defaults to |
4706 '(gnus-summary-mark-as-read nil \"X\"). Make sure that COMMAND is | 4704 \(gnus-summary-mark-as-read nil \"X\"). Make sure that COMMAND is |
4707 executed in the Summary buffer. If the second optional argument ALL | 4705 executed in the Summary buffer. If the second optional argument ALL |
4708 is non-nil, the COMMAND is applied to articles which are already | 4706 is non-nil, the COMMAND is applied to articles which are already |
4709 marked as read or unread. Articles which are marked are skipped over | 4707 marked as read or unread. Articles which are marked are skipped over |
4710 by default. | 4708 by default. |
4711 | 4709 |
4717 If you want to mark articles with `D' instead of `X', you can use | 4715 If you want to mark articles with `D' instead of `X', you can use |
4718 the following expression: | 4716 the following expression: |
4719 | 4717 |
4720 (gnus-kill \"Subject\" \"AI\" \"d\") | 4718 (gnus-kill \"Subject\" \"AI\" \"d\") |
4721 | 4719 |
4722 In this example it is assumed that the command | 4720 \(Here we assume the command `gnus-summary-mark-as-read-forward' is |
4723 `gnus-summary-mark-as-read-forward' is assigned to `d' in Summary Mode. | 4721 assigned to `d' in Summary Mode.) |
4724 | 4722 |
4725 It is possible to delete unnecessary headers which are marked with | 4723 It is possible to delete unnecessary headers which are marked with |
4726 `X' in a KILL file as follows: | 4724 `X' in a KILL file as follows: |
4727 | 4725 |
4728 (gnus-expunge \"X\") | 4726 (gnus-expunge \"X\") |
4731 exit the selected newsgroup normally. If headers which are marked | 4729 exit the selected newsgroup normally. If headers which are marked |
4732 with `D' are deleted in a KILL file, it is impossible to read articles | 4730 with `D' are deleted in a KILL file, it is impossible to read articles |
4733 which are marked as read in the previous GNUS sessions. Marks other | 4731 which are marked as read in the previous GNUS sessions. Marks other |
4734 than `D' should be used for articles which should really be deleted. | 4732 than `D' should be used for articles which should really be deleted. |
4735 | 4733 |
4736 Entry to this mode calls emacs-lisp-mode-hook and | 4734 Entry to this mode calls `emacs-lisp-mode-hook' and |
4737 gnus-kill-file-mode-hook with no arguments, if that value is non-nil." | 4735 `gnus-kill-file-mode-hook' with no arguments, if that value is non-nil." |
4738 (interactive) | 4736 (interactive) |
4739 (kill-all-local-variables) | 4737 (kill-all-local-variables) |
4740 (use-local-map gnus-kill-file-mode-map) | 4738 (use-local-map gnus-kill-file-mode-map) |
4741 (set-syntax-table emacs-lisp-mode-syntax-table) | 4739 (set-syntax-table emacs-lisp-mode-syntax-table) |
4742 (setq major-mode 'gnus-kill-file-mode) | 4740 (setq major-mode 'gnus-kill-file-mode) |
5125 (gnus-make-directory-1 head (substring tail end)))) | 5123 (gnus-make-directory-1 head (substring tail end)))) |
5126 ((string-equal tail "") t) | 5124 ((string-equal tail "") t) |
5127 )) | 5125 )) |
5128 | 5126 |
5129 (defun gnus-capitalize-newsgroup (newsgroup) | 5127 (defun gnus-capitalize-newsgroup (newsgroup) |
5130 "Capitalize NEWSGROUP name with treating '.' and '-' as part of words." | 5128 "Capitalize NEWSGROUP name with treating `.' and `-' as part of words." |
5131 ;; Suggested by "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>. | 5129 ;; Suggested by "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>. |
5132 (let ((current-syntax-table (syntax-table))) | 5130 (let ((current-syntax-table (syntax-table))) |
5133 (unwind-protect | 5131 (unwind-protect |
5134 (progn | 5132 (progn |
5135 (set-syntax-table (copy-syntax-table current-syntax-table)) | 5133 (set-syntax-table (copy-syntax-table current-syntax-table)) |
5211 ;; entry is added to nor deleted from the variable. | 5209 ;; entry is added to nor deleted from the variable. |
5212 )) | 5210 )) |
5213 | 5211 |
5214 (defun gnus-string-lessp (a b) | 5212 (defun gnus-string-lessp (a b) |
5215 "Return T if first arg string is less than second in lexicographic order. | 5213 "Return T if first arg string is less than second in lexicographic order. |
5216 If case-fold-search is non-nil, case of letters is ignored." | 5214 If `case-fold-search' is non-nil, case of letters is ignored." |
5217 (if case-fold-search | 5215 (if case-fold-search |
5218 (string-lessp (downcase a) (downcase b)) | 5216 (string-lessp (downcase a) (downcase b)) |
5219 (string-lessp a b))) | 5217 (string-lessp a b))) |
5220 | 5218 |
5221 (defun gnus-date-lessp (date1 date2) | 5219 (defun gnus-date-lessp (date1 date2) |
5222 "Return T if DATE1 is earlyer than DATE2." | 5220 "Return T if DATE1 is earlyer than DATE2." |
5223 (string-lessp (gnus-sortable-date date1) | 5221 (string-lessp (gnus-sortable-date date1) |
5224 (gnus-sortable-date date2))) | 5222 (gnus-sortable-date date2))) |
5225 | 5223 |
5226 (defun gnus-sortable-date (date) | 5224 (defun gnus-sortable-date (date) |
5227 "Make sortable string by string-lessp from DATE. | 5225 "Convert DATE into a string that can be sorted with `string-lessp'. |
5228 Timezone package is used." | 5226 Timezone package is used." |
5229 (let* ((date (timezone-fix-time date nil nil)) ;[Y M D H M S] | 5227 (let* ((date (timezone-fix-time date nil nil)) ;[Y M D H M S] |
5230 (year (aref date 0)) | 5228 (year (aref date 0)) |
5231 (month (aref date 1)) | 5229 (month (aref date 1)) |
5232 (day (aref date 2))) | 5230 (day (aref date 2))) |
5281 "If FIELD of an article matches REGEXP, execute COMMAND. | 5279 "If FIELD of an article matches REGEXP, execute COMMAND. |
5282 Optional 1st argument COMMAND is default to | 5280 Optional 1st argument COMMAND is default to |
5283 (gnus-summary-mark-as-read nil \"X\"). | 5281 (gnus-summary-mark-as-read nil \"X\"). |
5284 If optional 2nd argument ALL is non-nil, articles marked are also applied to. | 5282 If optional 2nd argument ALL is non-nil, articles marked are also applied to. |
5285 If FIELD is an empty string (or nil), entire article body is searched for. | 5283 If FIELD is an empty string (or nil), entire article body is searched for. |
5286 COMMAND must be a lisp expression or a string representing a key sequence." | 5284 COMMAND must be a Lisp expression or a string representing a key sequence." |
5287 ;; We don't want to change current point nor window configuration. | 5285 ;; We don't want to change current point nor window configuration. |
5288 (save-excursion | 5286 (save-excursion |
5289 (save-window-excursion | 5287 (save-window-excursion |
5290 ;; Selected window must be Summary buffer to execute keyboard | 5288 ;; Selected window must be Summary buffer to execute keyboard |
5291 ;; macros correctly. See command_loop_1. | 5289 ;; macros correctly. See command_loop_1. |
5292 (switch-to-buffer gnus-summary-buffer 'norecord) | 5290 (switch-to-buffer gnus-summary-buffer 'norecord) |
5293 (goto-char (point-min)) ;From the beginning. | 5291 (goto-char (point-min)) ;From the beginning. |
5294 (if (null command) | 5292 (if (null command) |
5295 (setq command '(gnus-summary-mark-as-read nil "X"))) | 5293 (setq command '(gnus-summary-mark-as-read nil "X"))) |
5296 (gnus-execute field regexp command nil (not all)) | 5294 (gnus-execute field regexp command nil (not all)) |
5298 | 5296 |
5299 (defun gnus-execute (field regexp form &optional backward ignore-marked) | 5297 (defun gnus-execute (field regexp form &optional backward ignore-marked) |
5300 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). | 5298 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). |
5301 If FIELD is an empty string (or nil), entire article body is searched for. | 5299 If FIELD is an empty string (or nil), entire article body is searched for. |
5302 If optional 1st argument BACKWARD is non-nil, do backward instead. | 5300 If optional 1st argument BACKWARD is non-nil, do backward instead. |
5303 If optional 2nd argument IGNORE-MARKED is non-nil, articles which are | 5301 If optional 2nd argument IGNORE-MARKED is non-nil, ignore articles |
5304 marked as read or unread are ignored." | 5302 marked as read or unread." |
5305 (let ((function nil) | 5303 (let ((function nil) |
5306 (header nil) | 5304 (header nil) |
5307 (article nil)) | 5305 (article nil)) |
5308 (if (string-equal field "") | 5306 (if (string-equal field "") |
5309 (setq field nil)) | 5307 (setq field nil)) |
5408 (aset caesar-translate-table i | 5406 (aset caesar-translate-table i |
5409 (let ((v (aref caesar-translate-table i))) | 5407 (let ((v (aref caesar-translate-table i))) |
5410 (if (<= v t1) (if (< v t2) v (+ v 47)) | 5408 (if (<= v t1) (if (< v t2) v (+ v 47)) |
5411 (if (<= v t3) (- v 47) v)))) | 5409 (if (<= v t3) (- v 47) v)))) |
5412 (setq i (1+ i)))) | 5410 (setq i (1+ i)))) |
5413 (message "Building caesar-translate-table... done"))) | 5411 (message "Building caesar-translate-table...done"))) |
5414 (let ((from (region-beginning)) | 5412 (let ((from (region-beginning)) |
5415 (to (region-end)) | 5413 (to (region-end)) |
5416 (i 0) str len) | 5414 (i 0) str len) |
5417 (setq str (buffer-substring from to)) | 5415 (setq str (buffer-substring from to)) |
5418 (setq len (length str)) | 5416 (setq len (length str)) |
5571 | 5569 |
5572 (defun gnus-start-news-server (&optional confirm) | 5570 (defun gnus-start-news-server (&optional confirm) |
5573 "Open network stream to remote NNTP server. | 5571 "Open network stream to remote NNTP server. |
5574 If optional argument CONFIRM is non-nil, ask you host that NNTP server | 5572 If optional argument CONFIRM is non-nil, ask you host that NNTP server |
5575 is running even if it is defined. | 5573 is running even if it is defined. |
5576 Run gnus-open-server-hook just before opening news server." | 5574 Run `gnus-open-server-hook' just before opening news server." |
5577 (if (gnus-server-opened) | 5575 (if (gnus-server-opened) |
5578 ;; Stream is already opened. | 5576 ;; Stream is already opened. |
5579 nil | 5577 nil |
5580 ;; Open NNTP server. | 5578 ;; Open NNTP server. |
5581 (if (or confirm | 5579 (if (or confirm |
5622 (error "%s" | 5620 (error "%s" |
5623 (gnus-nntp-message | 5621 (gnus-nntp-message |
5624 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) | 5622 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) |
5625 )) | 5623 )) |
5626 | 5624 |
5627 ;; Dummy functions used only once. Should return nil. | 5625 ;; Dummy functions used only once. Should return nil. |
5628 (defun gnus-server-opened () nil) | 5626 (defun gnus-server-opened () nil) |
5629 (defun gnus-close-server () nil) | 5627 (defun gnus-close-server () nil) |
5630 | 5628 |
5631 (defun gnus-nntp-message (&optional message) | 5629 (defun gnus-nntp-message (&optional message) |
5632 "Return a message returned from NNTP server. | 5630 "Return a message returned from NNTP server. |
5638 status message))) | 5636 status message))) |
5639 | 5637 |
5640 (defun gnus-define-access-method (method &optional access-methods) | 5638 (defun gnus-define-access-method (method &optional access-methods) |
5641 "Define access functions for the access METHOD. | 5639 "Define access functions for the access METHOD. |
5642 Methods definition is taken from optional argument ACCESS-METHODS or | 5640 Methods definition is taken from optional argument ACCESS-METHODS or |
5643 the variable gnus-access-methods." | 5641 the variable `gnus-access-methods'." |
5644 (let ((bindings | 5642 (let ((bindings |
5645 (cdr (assoc method (or access-methods gnus-access-methods))))) | 5643 (cdr (assoc method (or access-methods gnus-access-methods))))) |
5646 (if (null bindings) | 5644 (if (null bindings) |
5647 (error "Unknown access method: %s" method) | 5645 (error "Unknown access method: %s" method) |
5648 ;; Should not use symbol-function here since overload does not work. | 5646 ;; Should not use symbol-function here since overload does not work. |
5759 | 5757 |
5760 ;; Hacking for making header search much faster. | 5758 ;; Hacking for making header search much faster. |
5761 | 5759 |
5762 (defun gnus-get-header-by-number (number) | 5760 (defun gnus-get-header-by-number (number) |
5763 "Return a header specified by a NUMBER. | 5761 "Return a header specified by a NUMBER. |
5764 If the variable gnus-newsgroup-headers is updated, the hashed table | 5762 If you update the variable `gnus-newsgroup-headers', you must set the |
5765 gnus-newsgroup-headers-hashtb-by-number must be set to nil to indicate | 5763 hash table `gnus-newsgroup-headers-hashtb-by-number' to nil to indicate |
5766 rehash is necessary." | 5764 rehash is necessary." |
5767 (or gnus-newsgroup-headers-hashtb-by-number | 5765 (or gnus-newsgroup-headers-hashtb-by-number |
5768 (gnus-make-headers-hashtable-by-number)) | 5766 (gnus-make-headers-hashtable-by-number)) |
5769 (gnus-gethash (int-to-string number) | 5767 (gnus-gethash (int-to-string number) |
5770 gnus-newsgroup-headers-hashtb-by-number)) | 5768 gnus-newsgroup-headers-hashtb-by-number)) |
5771 | 5769 |
5772 (defun gnus-get-header-by-id (id) | 5770 (defun gnus-get-header-by-id (id) |
5773 "Return a header specified by an ID. | 5771 "Return a header specified by an ID. |
5774 If the variable gnus-newsgroup-headers is updated, the hashed table | 5772 If you update the variable `gnus-newsgroup-headers', you must set the |
5775 gnus-newsgroup-headers-hashtb-by-id must be set to nil to indicate | 5773 hash table `gnus-newsgroup-headers-hashtb-by-id' to nil to indicate |
5776 rehash is necessary." | 5774 rehash is necessary." |
5777 (or gnus-newsgroup-headers-hashtb-by-id | 5775 (or gnus-newsgroup-headers-hashtb-by-id |
5778 (gnus-make-headers-hashtable-by-id)) | 5776 (gnus-make-headers-hashtable-by-id)) |
5779 (and (stringp id) | 5777 (and (stringp id) |
5780 (gnus-gethash id gnus-newsgroup-headers-hashtb-by-id))) | 5778 (gnus-gethash id gnus-newsgroup-headers-hashtb-by-id))) |
5781 | 5779 |
5782 (defun gnus-make-headers-hashtable-by-number () | 5780 (defun gnus-make-headers-hashtable-by-number () |
5783 "Make hashtable for the variable gnus-newsgroup-headers by number." | 5781 "Make hashtable for the variable `gnus-newsgroup-headers' by number." |
5784 (let ((header nil) | 5782 (let ((header nil) |
5785 (headers gnus-newsgroup-headers)) | 5783 (headers gnus-newsgroup-headers)) |
5786 (setq gnus-newsgroup-headers-hashtb-by-number | 5784 (setq gnus-newsgroup-headers-hashtb-by-number |
5787 (gnus-make-hashtable (length headers))) | 5785 (gnus-make-hashtable (length headers))) |
5788 (while headers | 5786 (while headers |
5791 header gnus-newsgroup-headers-hashtb-by-number) | 5789 header gnus-newsgroup-headers-hashtb-by-number) |
5792 (setq headers (cdr headers)) | 5790 (setq headers (cdr headers)) |
5793 ))) | 5791 ))) |
5794 | 5792 |
5795 (defun gnus-make-headers-hashtable-by-id () | 5793 (defun gnus-make-headers-hashtable-by-id () |
5796 "Make hashtable for the variable gnus-newsgroup-headers by id." | 5794 "Make hashtable for the variable `gnus-newsgroup-headers' by id." |
5797 (let ((header nil) | 5795 (let ((header nil) |
5798 (headers gnus-newsgroup-headers)) | 5796 (headers gnus-newsgroup-headers)) |
5799 (setq gnus-newsgroup-headers-hashtb-by-id | 5797 (setq gnus-newsgroup-headers-hashtb-by-id |
5800 (gnus-make-hashtable (length headers))) | 5798 (gnus-make-hashtable (length headers))) |
5801 (while headers | 5799 (while headers |
5804 header gnus-newsgroup-headers-hashtb-by-id) | 5802 header gnus-newsgroup-headers-hashtb-by-id) |
5805 (setq headers (cdr headers)) | 5803 (setq headers (cdr headers)) |
5806 ))) | 5804 ))) |
5807 | 5805 |
5808 (defun gnus-clear-hashtables-for-newsgroup-headers () | 5806 (defun gnus-clear-hashtables-for-newsgroup-headers () |
5809 "Clear hash tables created for the variable gnus-newsgroup-headers." | 5807 "Clear hash tables created for the variable `gnus-newsgroup-headers'." |
5810 (setq gnus-newsgroup-headers-hashtb-by-id nil) | 5808 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
5811 (setq gnus-newsgroup-headers-hashtb-by-number nil)) | 5809 (setq gnus-newsgroup-headers-hashtb-by-number nil)) |
5812 | 5810 |
5813 (defun gnus-more-header-backward () | 5811 (defun gnus-more-header-backward () |
5814 "Find new header backward." | 5812 "Find new header backward." |
5915 | 5913 |
5916 (defun gnus-configure-windows (action) | 5914 (defun gnus-configure-windows (action) |
5917 "Configure GNUS windows according to the next ACTION. | 5915 "Configure GNUS windows according to the next ACTION. |
5918 The ACTION is either a symbol, such as `summary', or a | 5916 The ACTION is either a symbol, such as `summary', or a |
5919 configuration list such as `(1 1 2)'. If ACTION is not a list, | 5917 configuration list such as `(1 1 2)'. If ACTION is not a list, |
5920 configuration list is got from the variable gnus-window-configuration." | 5918 configuration list is got from the variable `gnus-window-configuration'." |
5921 (let* ((windows | 5919 (let* ((windows |
5922 (if (listp action) | 5920 (if (listp action) |
5923 action (car (cdr (assq action gnus-window-configuration))))) | 5921 action (car (cdr (assq action gnus-window-configuration))))) |
5924 (grpwin (get-buffer-window gnus-group-buffer)) | 5922 (grpwin (get-buffer-window gnus-group-buffer)) |
5925 (subwin (get-buffer-window gnus-summary-buffer)) | 5923 (subwin (get-buffer-window gnus-summary-buffer)) |
5948 (setq height (window-height (selected-window)))) | 5946 (setq height (window-height (selected-window)))) |
5949 (t | 5947 (t |
5950 (setq height (+ (if grpwin (window-height grpwin) 0) | 5948 (setq height (+ (if grpwin (window-height grpwin) 0) |
5951 (if subwin (window-height subwin) 0) | 5949 (if subwin (window-height subwin) 0) |
5952 (if artwin (window-height artwin) 0))))) | 5950 (if artwin (window-height artwin) 0))))) |
5953 ;; The Newsgroup buffer exits always. So, use it to extend the | 5951 ;; The Newsgroup buffer exits always. So, use it to extend the |
5954 ;; Group window so as to get enough window space. | 5952 ;; Group window so as to get enough window space. |
5955 (switch-to-buffer gnus-group-buffer 'norecord) | 5953 (switch-to-buffer gnus-group-buffer 'norecord) |
5956 (and (get-buffer gnus-summary-buffer) | 5954 (and (get-buffer gnus-summary-buffer) |
5957 (delete-windows-on gnus-summary-buffer)) | 5955 (delete-windows-on gnus-summary-buffer)) |
5958 (and (get-buffer gnus-article-buffer) | 5956 (and (get-buffer gnus-article-buffer) |
6045 (pop-to-buffer gnus-summary-buffer))) | 6043 (pop-to-buffer gnus-summary-buffer))) |
6046 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) | 6044 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) |
6047 | 6045 |
6048 (defun gnus-overload-functions (&optional overloads) | 6046 (defun gnus-overload-functions (&optional overloads) |
6049 "Overload functions specified by optional argument OVERLOADS. | 6047 "Overload functions specified by optional argument OVERLOADS. |
6050 If nothing is specified, use the variable gnus-overload-functions." | 6048 If nothing is specified, use the variable `gnus-overload-functions'." |
6051 (let ((defs nil) | 6049 (let ((defs nil) |
6052 (overloads (or overloads gnus-overload-functions))) | 6050 (overloads (or overloads gnus-overload-functions))) |
6053 (while overloads | 6051 (while overloads |
6054 (setq defs (car overloads)) | 6052 (setq defs (car overloads)) |
6055 (setq overloads (cdr overloads)) | 6053 (setq overloads (cdr overloads)) |
6280 (list newsgroup t)) | 6278 (list newsgroup t)) |
6281 (car (car gnus-newsrc-assoc))))) | 6279 (car (car gnus-newsrc-assoc))))) |
6282 | 6280 |
6283 (defun gnus-find-new-newsgroups () | 6281 (defun gnus-find-new-newsgroups () |
6284 "Looking for new newsgroups and return names. | 6282 "Looking for new newsgroups and return names. |
6285 `-n' option of options line in .newsrc file is recognized." | 6283 `-n' option of options line in `.newsrc' file is recognized." |
6286 (let ((group nil) | 6284 (let ((group nil) |
6287 (new-newsgroups nil)) | 6285 (new-newsgroups nil)) |
6288 (mapatoms | 6286 (mapatoms |
6289 (function | 6287 (function |
6290 (lambda (sym) | 6288 (lambda (sym) |
6304 ;; Return new newsgroups. | 6302 ;; Return new newsgroups. |
6305 new-newsgroups | 6303 new-newsgroups |
6306 )) | 6304 )) |
6307 | 6305 |
6308 (defun gnus-kill-newsgroup (group) | 6306 (defun gnus-kill-newsgroup (group) |
6309 "Kill GROUP from gnus-newsrc-assoc, .newsrc and gnus-unread-hashtb." | 6307 "Kill GROUP from `gnus-newsrc-assoc', `.newsrc' and `gnus-unread-hashtb'." |
6310 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) | 6308 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) |
6311 (if (null info) | 6309 (if (null info) |
6312 nil | 6310 nil |
6313 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. | 6311 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. |
6314 (setq gnus-newsrc-assoc (delq info gnus-newsrc-assoc)) | 6312 (setq gnus-newsrc-assoc (delq info gnus-newsrc-assoc)) |
6374 (cons (gnus-number-of-articles range) range)) | 6372 (cons (gnus-number-of-articles range) range)) |
6375 gnus-unread-hashtb) | 6373 gnus-unread-hashtb) |
6376 )) | 6374 )) |
6377 | 6375 |
6378 (defun gnus-check-killed-newsgroups () | 6376 (defun gnus-check-killed-newsgroups () |
6379 "Check consistency between gnus-newsrc-assoc and gnus-killed-assoc. | 6377 "Update `gnus-killed-assoc' based on `gnus-newsrc-assoc'. |
6380 gnus-killed-hashtb is also updated." | 6378 Update `gnus-killed-hashtb' also." |
6381 (let ((group nil) | 6379 (let ((group nil) |
6382 (new-killed nil) | 6380 (new-killed nil) |
6383 (old-killed gnus-killed-assoc)) | 6381 (old-killed gnus-killed-assoc)) |
6384 (while old-killed | 6382 (while old-killed |
6385 (setq group (car (car old-killed))) | 6383 (setq group (car (car old-killed))) |
6451 (setq new-marked (cons (car old-marked) new-marked))) | 6449 (setq new-marked (cons (car old-marked) new-marked))) |
6452 (setq old-marked (cdr old-marked))) | 6450 (setq old-marked (cdr old-marked))) |
6453 (setq gnus-marked-assoc new-marked) | 6451 (setq gnus-marked-assoc new-marked) |
6454 (setq gnus-marked-hashtb | 6452 (setq gnus-marked-hashtb |
6455 (gnus-make-hashtable-from-alist gnus-marked-assoc)) | 6453 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
6456 (message "Checking bogus newsgroups... done") | 6454 (message "Checking bogus newsgroups...done") |
6457 )) | 6455 )) |
6458 | 6456 |
6459 (defun gnus-get-unread-articles () | 6457 (defun gnus-get-unread-articles () |
6460 "Compute diffs between active and read articles." | 6458 "Compute diffs between active and read articles." |
6461 (let ((read gnus-newsrc-assoc) | 6459 (let ((read gnus-newsrc-assoc) |
6486 range)) ;Range of unread articles | 6484 range)) ;Range of unread articles |
6487 gnus-unread-hashtb) | 6485 gnus-unread-hashtb) |
6488 ) | 6486 ) |
6489 (setq read (cdr read)) | 6487 (setq read (cdr read)) |
6490 ) | 6488 ) |
6491 (message "Checking new news... done") | 6489 (message "Checking new news...done") |
6492 )) | 6490 )) |
6493 | 6491 |
6494 (defun gnus-expire-marked-articles () | 6492 (defun gnus-expire-marked-articles () |
6495 "Check expired article which is marked as unread." | 6493 "Check expired article which is marked as unread." |
6496 (let ((marked-assoc gnus-marked-assoc) | 6494 (let ((marked-assoc gnus-marked-assoc) |
6655 (message "Reading active file...") | 6653 (message "Reading active file...") |
6656 (if (gnus-request-list) ;Get active file from server | 6654 (if (gnus-request-list) ;Get active file from server |
6657 (save-excursion | 6655 (save-excursion |
6658 (set-buffer nntp-server-buffer) | 6656 (set-buffer nntp-server-buffer) |
6659 (gnus-active-to-gnus-format) | 6657 (gnus-active-to-gnus-format) |
6660 (message "Reading active file... done")) | 6658 (message "Reading active file...done")) |
6661 (error "Cannot read active file from NNTP server."))) | 6659 (error "Cannot read active file from NNTP server."))) |
6662 | 6660 |
6663 (defun gnus-active-to-gnus-format () | 6661 (defun gnus-active-to-gnus-format () |
6664 "Convert active file format to internal format. | 6662 "Convert active file format to internal format. |
6665 Lines matching gnus-ignored-newsgroups are ignored." | 6663 Lines matching `gnus-ignored-newsgroups' are ignored." |
6666 ;; Delete unnecessary lines. | 6664 ;; Delete unnecessary lines. |
6667 (goto-char (point-min)) | 6665 (goto-char (point-min)) |
6668 ;;(delete-matching-lines "^to\\..*$") | 6666 ;;(delete-matching-lines "^to\\..*$") |
6669 (delete-matching-lines gnus-ignored-newsgroups) | 6667 (delete-matching-lines gnus-ignored-newsgroups) |
6670 ;; Save OLD active info. | 6668 ;; Save OLD active info. |
6735 (t | 6733 (t |
6736 ;; Since .newsrc file is newer than quick file, read it. | 6734 ;; Since .newsrc file is newer than quick file, read it. |
6737 (message "Reading %s..." newsrc-file) | 6735 (message "Reading %s..." newsrc-file) |
6738 (gnus-newsrc-to-gnus-format) | 6736 (gnus-newsrc-to-gnus-format) |
6739 (gnus-check-killed-newsgroups) | 6737 (gnus-check-killed-newsgroups) |
6740 (message "Reading %s... Done" newsrc-file))) | 6738 (message "Reading %s...done" newsrc-file))) |
6741 ))) | 6739 ))) |
6742 | 6740 |
6743 (defun gnus-make-newsrc-file (file) | 6741 (defun gnus-make-newsrc-file (file) |
6744 "Make server dependent file name by catenating FILE and server host name." | 6742 "Make server dependent file name by catenating FILE and server host name." |
6745 (let* ((file (expand-file-name file nil)) | 6743 (let* ((file (expand-file-name file nil)) |
6747 (if (file-exists-p real-file) | 6745 (if (file-exists-p real-file) |
6748 real-file file) | 6746 real-file file) |
6749 )) | 6747 )) |
6750 | 6748 |
6751 (defun gnus-newsrc-to-gnus-format () | 6749 (defun gnus-newsrc-to-gnus-format () |
6752 "Parse current buffer as .newsrc file." | 6750 "Parse current buffer as `.newsrc' file." |
6753 (let ((newsgroup nil) | 6751 (let ((newsgroup nil) |
6754 (subscribe nil) | 6752 (subscribe nil) |
6755 (ranges nil) | 6753 (ranges nil) |
6756 (subrange nil) | 6754 (subrange nil) |
6757 (read-list nil)) | 6755 (read-list nil)) |
6900 (cdr no))) | 6898 (cdr no))) |
6901 (car no) "\\)\\(\\.\\|$\\)"))) | 6899 (car no) "\\)\\(\\.\\|$\\)"))) |
6902 )) | 6900 )) |
6903 | 6901 |
6904 (defun gnus-save-newsrc-file () | 6902 (defun gnus-save-newsrc-file () |
6905 "Save to .newsrc FILE." | 6903 "Save current status in the `.newsrc' file." |
6906 ;; Note: We cannot save .newsrc file if all newsgroups are removed | 6904 ;; Note: We cannot save .newsrc file if all newsgroups are removed |
6907 ;; from the variable gnus-newsrc-assoc. | 6905 ;; from the variable gnus-newsrc-assoc. |
6908 (and (or gnus-newsrc-assoc gnus-killed-assoc) | 6906 (and (or gnus-newsrc-assoc gnus-killed-assoc) |
6909 gnus-current-startup-file | 6907 gnus-current-startup-file |
6910 (save-excursion | 6908 (save-excursion |
6929 (let ((make-backup-files nil) | 6927 (let ((make-backup-files nil) |
6930 (version-control nil) | 6928 (version-control nil) |
6931 (require-final-newline t)) ;Don't ask even if requested. | 6929 (require-final-newline t)) ;Don't ask even if requested. |
6932 (write-file (concat gnus-current-startup-file ".el"))) | 6930 (write-file (concat gnus-current-startup-file ".el"))) |
6933 (kill-buffer (current-buffer)) | 6931 (kill-buffer (current-buffer)) |
6934 (message "Saving %s... Done" gnus-current-startup-file) | 6932 (message "Saving %s...done" gnus-current-startup-file) |
6935 )) | 6933 )) |
6936 )) | 6934 )) |
6937 | 6935 |
6938 (defun gnus-update-newsrc-buffer (group &optional delete next) | 6936 (defun gnus-update-newsrc-buffer (group &optional delete next) |
6939 "Incrementally update .newsrc buffer about GROUP. | 6937 "Incrementally update `.newsrc' buffer about GROUP. |
6940 If optional 1st argument DELETE is non-nil, delete the group. | 6938 If optional 1st argument DELETE is non-nil, delete the group. |
6941 If optional 2nd argument NEXT is non-nil, inserted before it." | 6939 If optional 2nd argument NEXT is non-nil, inserted before it." |
6942 (save-excursion | 6940 (save-excursion |
6943 ;; Taking account of the killed startup file. | 6941 ;; Taking account of the killed startup file. |
6944 ;; Suggested by tale@pawl.rpi.edu. | 6942 ;; Suggested by tale@pawl.rpi.edu. |
6990 (insert "\n") | 6988 (insert "\n") |
6991 ))) | 6989 ))) |
6992 ))) | 6990 ))) |
6993 | 6991 |
6994 (defun gnus-gnus-to-quick-newsrc-format () | 6992 (defun gnus-gnus-to-quick-newsrc-format () |
6995 "Insert GNUS variables such as gnus-newsrc-assoc in lisp format." | 6993 "Insert GNUS variables such as `gnus-newsrc-assoc' in Lisp format." |
6996 (insert ";; GNUS internal format of .newsrc.\n") | 6994 (insert ";; GNUS internal format of .newsrc.\n") |
6997 (insert ";; Touch .newsrc instead if you think to remove this file.\n") | 6995 (insert ";; Touch .newsrc instead if you think to remove this file.\n") |
6998 (let ((variable nil) | 6996 (let ((variable nil) |
6999 (variables gnus-variable-list) | 6997 (variables gnus-variable-list) |
7000 ;; Temporary rebind to make changes | 6998 ;; Temporary rebind to make changes |
7075 (defun gnus-number-of-articles (range) | 7073 (defun gnus-number-of-articles (range) |
7076 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." | 7074 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." |
7077 (let ((count 0)) | 7075 (let ((count 0)) |
7078 (while range | 7076 (while range |
7079 (if (/= (cdr (car range)) 0) | 7077 (if (/= (cdr (car range)) 0) |
7080 ;; If end1 is 0, it must be skipped. Usually no articles in | 7078 ;; If end1 is 0, it must be skipped. Usually no articles in |
7081 ;; this group. | 7079 ;; this group. |
7082 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) | 7080 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) |
7083 (setq range (cdr range)) | 7081 (setq range (cdr range)) |
7084 ) | 7082 ) |
7085 count ;Result | 7083 count ;Result |
7123 (setq gnus-distribution-list nil) | 7121 (setq gnus-distribution-list nil) |
7124 (if (gnus-request-list-distributions) | 7122 (if (gnus-request-list-distributions) |
7125 (save-excursion | 7123 (save-excursion |
7126 (set-buffer nntp-server-buffer) | 7124 (set-buffer nntp-server-buffer) |
7127 (gnus-distributions-to-gnus-format) | 7125 (gnus-distributions-to-gnus-format) |
7128 (message "Reading distributions file... done")) | 7126 (message "Reading distributions file...done")) |
7129 ;; It's not a fatal error. | 7127 ;; It's not a fatal error. |
7130 ;;(error "Cannot read distributions file from NNTP server.") | 7128 ;;(error "Cannot read distributions file from NNTP server.") |
7131 ) | 7129 ) |
7132 ;; Merge with user supplied default distributions. | 7130 ;; Merge with user supplied default distributions. |
7133 (let ((defaults (reverse gnus-local-distributions)) | 7131 (let ((defaults (reverse gnus-local-distributions)) |
7150 (setq gnus-distribution-list | 7148 (setq gnus-distribution-list |
7151 (cons (list (buffer-substring (match-beginning 1) (match-end 1))) | 7149 (cons (list (buffer-substring (match-beginning 1) (match-end 1))) |
7152 gnus-distribution-list))) | 7150 gnus-distribution-list))) |
7153 (setq gnus-distribution-list | 7151 (setq gnus-distribution-list |
7154 (nreverse gnus-distribution-list))) | 7152 (nreverse gnus-distribution-list))) |
7155 | |
7156 ;; Some older version of GNU Emacs does not support function | |
7157 ;; `file-newer-than-file-p'. | |
7158 | |
7159 (or (fboundp 'file-newer-than-file-p) | |
7160 (defun file-newer-than-file-p (file1 file2) | |
7161 "Return t if file FILE1 is newer than file FILE2. | |
7162 If FILE1 does not exist, the answer is nil; | |
7163 otherwise, if FILE2 does not exist, the answer is t." | |
7164 (let ((mod1 (nth 5 (file-attributes file1))) | |
7165 (mod2 (nth 5 (file-attributes file2)))) | |
7166 (cond ((not (file-exists-p file1)) nil) | |
7167 ((not (file-exists-p file2)) t) | |
7168 ((and mod2 mod1) | |
7169 (or (< (car mod2) (car mod1)) | |
7170 (and (= (car mod2) (car mod1)) | |
7171 (<= (nth 1 mod2) (nth 1 mod1))))) | |
7172 )))) | |
7173 | |
7174 | 7153 |
7175 (provide 'gnus) | 7154 (provide 'gnus) |
7176 | 7155 |
7177 ;;Local variables: | 7156 ;;Local variables: |
7178 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) | 7157 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |