From: yamaoka Date: Mon, 21 Jan 2002 05:45:32 +0000 (+0000) Subject: Feedback from t-gnus-6_15-quimby branch. X-Git-Tag: t-gnus-6_15_5-02 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1c6a5227c4099c582702a87d278cd107d389e6a2;p=elisp%2Fgnus.git- Feedback from t-gnus-6_15-quimby branch. --- diff --git a/ChangeLog b/ChangeLog index 4b3d7c2..9a6817c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,27 @@ +2002-01-21 Katsumi Yamaoka + + * lisp/gnus-vers.el: T-gnus 6.15.5 revision 02 (merged + t-gnus-6_15-quimby branch). + +2002-01-16 Katsumi Yamaoka + + * lisp/dgnushack.el: Advise `byte-compile-inline-expand' for Mule + to ignore built-in functions as Emacs 20+ does. + 2002-01-15 Katsumi Yamaoka * lisp/gnus-sum.el (gnus-adjust-marked-articles): Fix the record for `seen' if it looks like (seen NUM1 . NUM2). It should be (seen (NUM1 . NUM2)). +2002-01-15 Katsumi Yamaoka + + * lisp/nntp.el (nntp-send-buffer): Bind `mc-flag' to nil. + + * lisp/nnheader.el (mm-with-unibyte-buffer): Alias to + `nnheader-with-unibyte-buffer'. + (nnheader-with-unibyte-buffer): New macro. + 2002-01-12 Katsuhiro Hermit Endo * texi/gnus-ja.texi (Article Date): Update Japanese translation. @@ -27,7 +45,11 @@ * lisp/gnus-vers.el (gnus-revision-number): Increment to 11 in order to force update cached format specs. - * lisp/gnus-spec.el (gnus-spec-tab): Deal with wide characters. + * lisp/gnus-spec.el (gnus-use-correct-string-widths): Default to t. + +2002-01-10 TSUCHIYA Masatoshi + + * lisp/nnshimbun.el: Adopt for old Gnusae. 2002-01-10 Katsumi Yamaoka @@ -37,14 +59,15 @@ * lisp/gnus-xmas.el (gnus-xmas-group-startup-message): Position point to the top. -2002-01-09 Katsumi Yamaoka +2002-01-05 Lars Magne Ingebrigtsen - * lisp/canlock.el (canlock-string-as-unibyte): New macro. - (canlock-sha1-with-openssl): Return a unibyte string. - (canlock-make-cancel-key): Treat Message-ID as a unibyte string. + * etc/gnus/oort.xface (X-Face): Oort X-Face from + Raymond Scholz . 2002-01-09 Katsumi Yamaoka + * lisp/lpath.el: Fbind `coding-system-to-mime-charset' for Mule 2. + * lisp/nnheader.el (std11-fold-region): New function copied from `rfc2047-fold-region'. (std11-fold-field): Use it. @@ -53,17 +76,28 @@ * lisp/gnus.el: Don't autoload "gnus-bitmap". - * lisp/gnus-sum.el (gnus-summary-toggle-smiley): Replace - `gnus-smiley-display' with `gnus-article-smiley-display'. + * lisp/gnus-ems.el: Autoload "smiley-mule" if running Emacs + version is less than 21. - * lisp/gnus-art.el (gnus-article-smiley-display): Re-implement to - integrate smiley functions for various Emacsen. - (gnus-treatment-function-alist): Always use - `gnus-article-smiley-display' for `gnus-treat-display-smileys'. + * lisp/gnus-art.el (gnus-article-smiley-display): Remove. + (gnus-treat-smiley): Reload "smiley-ems" or "smiley-mule" if + needed. (gnus-treat-display-smileys): Use `gnus-image-type-available-p'. (gnus-article-smiley-mule-loaded-p): New internal variable. (gnus-article-should-use-smiley-mule): New user option. +2002-01-09 TSUCHIYA Masatoshi + + * lisp/nneething.el (nneething-mime-extensions): New variable. + (nneething-request-article): Refer it. + + * lisp/nnheader.el (mm-detect-coding-region): Alias to + `nnheader-detect-coding-region'. + (nnheader-detect-coding-region): New function. + (mm-detect-mime-charset-region): Alias to + `nnheader-detect-mime-charset-region'. + (nnheader-detect-mime-charset-region) New function. + 2002-01-08 TSUCHIYA Masatoshi * texi/gnus-ja.texi (Web Newspaper): Update the document of @@ -74,6 +108,12 @@ * lisp/gnus-art.el (article-toggle-headers): Expose headers even if there is a boundary line. + * lisp/nntp.el (nntp-send-buffer): Don't use + `mm-with-unibyte-current-buffer'. Use expanded form instead. + + * lisp/gnus-art.el (gnus-treatment-function-alist): Move X-Face + stuff down after unfolding stuff. + 2002-01-08 TSUCHIYA Masatoshi * lisp/gnus-namazu.el (gnus-namazu/highlight-words): Reimplemented. @@ -110,6 +150,15 @@ 2002-01-07 Katsumi Yamaoka + * lisp/gnus-vers.el: T-gnus 6.15.5 revision 00. + +2002-01-02 ShengHuo ZHU + + * etc/gnus/describe-group.xpm: Set pixels of first line to + background color. A bug in Emacs? + +2002-01-07 Katsumi Yamaoka + * lisp/gnus-vers.el (gnus-revision-number): Increment to 10. * lisp/gnus-picon.el: Require `mail-parse'. diff --git a/GNUS-NEWS b/GNUS-NEWS index 4b8d5b5..4026b65 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -8,9 +8,41 @@ For older news, see Gnus info node "New Features". * Changes in Oort Gnus +** message-ignored-news-headers and message-ignored-mail-headers + +X-Draft-From and X-Gnus-Agent-Meta-Information have been added into +these two variables. If you customized those, perhaps you need add +those two headers too. + +** Gnus reads the NOV and articles in the Agent if plugged. + +If one reads an article while plugged, and the article already exists +in the Agent, it won't get downloaded once more. (setq +gnus-agent-cache nil) reverts to the old behavior. + +** Gnus supports the "format=flowed" (RFC 2646) parameter. + +On composing messages, it is enabled by `use-hard-newlines'. Decoding +format=flowed was present but not documented in earlier versions. + +** Gnus supports the generation of RFC 2298 Disposition Notification requests. + +This is invoked with the C-c M-n key binding from message mode. + +** Gnus supports Maildir groups. + +Gnus includes a new backend nnmaildir.el. + +** Printing capabilities are enhanced. + +Gnus supports Muttprint natively with O P from the Summary and Article +buffers. Also, each individual MIME part can be printed using p on +the MIME button. + ** Message supports the Importance: header. -In the message buffer, C-c C-p cycles through the valid values. +In the message buffer, C-c C-f C-i or C-c C-u cycles through the valid +values. ** Gnus supports Cancel Locks in News. diff --git a/README.T-gnus b/README.T-gnus index 61adfd4..30637ea 100644 --- a/README.T-gnus +++ b/README.T-gnus @@ -33,6 +33,6 @@ NEWS: * T-gnus 6.15 - this is based on Oort Gnus. - The latest T-gnus is T-gnus 6.15.4 (based on Oort Gnus 0.04). It + The latest T-gnus is T-gnus 6.15.5 (based on Oort Gnus 0.05). It requires SEMI/WEMI (1.13.5 or later), FLIM (1.13.1 or later), and APEL (10.0 or later). diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 2868fdb..9f58afd 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2002-01-01 Lars Magne Ingebrigtsen + + * gnus-mdrtn.el (gnus-moderation-cancel-article): Insert an extra + newline. + 2001-12-26 Florian Weimer * gpg.el (gpg-command-default-alist): Using gpg-2comp is no longer diff --git a/etc/gnus/describe-group.xpm b/etc/gnus/describe-group.xpm index 7f7ad67..b4a6f42 100644 --- a/etc/gnus/describe-group.xpm +++ b/etc/gnus/describe-group.xpm @@ -6,7 +6,7 @@ static char * describe_group_xpm[] = { "o c #FFFFF5F5ACAC", "+ c #E1E1E0E0E0E0", "@ c #C7C7C6C6C6C6", -" .. .. .. .. .. .. .. ..", +"........................", "........................", ".................oooo...", " .. .. .. .. .. oo oo o.", diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0694404..17646c7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,705 @@ +2002-01-20 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-completing-read): Remove + inherit-input-method. + +2002-01-20 05:33:30 Lars Magne Ingebrigtsen + + * gnus.el: Oort Gnus v0.05 is released. + +2002-01-20 Lars Magne Ingebrigtsen + + * nnkiboze.el (nnkiboze-generate-group): Make sure the directory + exists. + + * gnus-spec.el (gnus-string-width-function): New function. + (gnus-tilde-cut-form): Use it. + (gnus-tilde-max-form): Ditto. + (gnus-use-correct-string-widths): Default to (featurep 'xemacs). + (gnus-substring-function): Use it. + (gnus-tilde-cut-form): Ditto. + (gnus-substring-function): New function. + + * message.el (message-check-news-header-syntax): New message. + + * gnus.el (gnus-slave-no-server): Doc fix. + + * gnus-spec.el (gnus-use-correct-string-widths): Default to t. + +2002-01-15 Katsumi Yamaoka + + * gnus-sum.el (gnus-adjust-marked-articles): Fix the record for + `seen' if it looks like (seen NUM1 . NUM2). It should be + (seen (NUM1 . NUM2)). + +2002-01-20 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-catchup-articles): Update article + number in closed topics. + +2002-01-19 Daniel Pittman + + * gnus-sum.el (gnus-summary-first-unseen-or-unread-subject): New + functions. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.el (gnus-group-find-parameter): Clean up. + + * gnus-sum.el (gnus-summary-goto-subject): Error on non-numerical + articles. + + * gnus-util.el (gnus-completing-read-with-default): Renamed. + + * nnmail.el (nnmail-article-group): Clean up. + +2002-01-19 Paul Stodghill + + * gnus-agent.el (gnus-category-name): Intern the category name. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-move-group): Use gnus-topic-history. + + * gnus-util.el (gnus-completing-read): New function. + +2002-01-19 ShengHuo ZHU + + * gnus-art.el (gnus-add-wash-type): Use add-to-list. + + * smiley-ems.el (smiley-region): Register smiley. + (smiley-toggle-buffer): Rewrite the function. + (smiley-active): Removed. + +2002-01-19 Simon Josefsson + + * gnus-util.el (gnus-parent-id): Optimize null n case. From + Jesper Harder . + +2002-01-18 TSUCHIYA Masatoshi + + * gnus-art.el (gnus-request-article-this-buffer): Call + `nneething-get-file-name' to extract the file name from the + message id. + + * nneething.el (nneething-encode-file-name): New function. + (nneething-decode-file-name): Ditto. + (nneething-get-file-name): Ditto. + (nneething-make-head): Encode the file name and encapsulate it + into the field of the message id. + +2002-01-18 Simon Josefsson + + * nnml.el (nnml-request-update-info): Don't erase flags that isn't + stored in .marks. + + * nnfolder.el (nnfolder-request-update-info): Ditto. + +2002-01-18 ShengHuo ZHU + + * gnus-art.el (gnus-url-parse-query-string): Allow new line in value. + +2002-01-18 Simon Josefsson + + * imap.el (imap-starttls-p): Don't check for binary. + (imap-gssapi-auth-p): Ditto. + (imap-kerberos4-auth-p): Ditto. + (imap-open): Change logic. Iterate through all possible streams, + instead of bailing out after first failure. Move authenticator + decision to `imap-authenticate'. + (imap-authenticate): Change logic, now finds the authenticator to + use, was previously in `imap-open'. + (imap-open): Return nil on failure. + (imap-open): Setup temp buffer correctly. + (imap-open): Return buffer only on success. + (imap-interactive-login, imap-interactive-login): Tell the user + which stream/authenticator is used for the queried + username/password. + (imap-open, imap-authenticate): Set variables. + (imap-gssapi-auth-p, imap-kerberos4-auth-p): Fix typo. + (imap-open): Don't assume how `with-temp-buffer' is implemented. + +2002-01-17 Lars Magne Ingebrigtsen + + * gnus-fun.el (gnus-grab-cam-x-face): New function. + +2002-01-16 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-emphasis-alist): Allow matching "*this*.)". + +2002-01-17 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-toggle-group-plugged): New function. + (gnus-agent-group-mode-map): Bind it to "Jo". + (gnus-agent-group-make-menu-bar): Add it into menu bar. + +2002-01-17 Karl Kleinpaste + + * gnus-xmas.el (gnus-group-toolbar): Add .newsrc save button. + (gnus-summary-mail-toolbar): Add mail article deletion button. + + * smiley.el (smiley-deformed-regexp-alist): Eliminate noseless + false positives for lines of "^^^^". + + * gnus-picon.el (gnus-picon-find-face): faces database is all + lowercase. + +2002-01-17 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-retrieve-headers): Use correct buffer. + (gnus-agent-braid-nov): Switch back to nntp-server-buffer. Remove + duplications. + (gnus-agent-batch): Bind gnus-agent-confirmation-function. + +2002-01-16 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-initial-limit): Inline + gnus-summary-limit-children. + (gnus-summary-initial-limit): Don't limit if + gnus-newsgroup-display is nil. + (gnus-summary-initial-limit): No, don't. + + * gnus-util.el + (gnus-put-text-property-excluding-characters-with-faces): Inline + gnus-put-text-property. + + * gnus-spec.el (gnus-default-format-specs): New variable. + + * gnus-start.el (gnus-read-newsrc-file): Don't clear + gnus-format-specs. + (gnus-read-newsrc-el-file): Default to gnus-default-format-specs. + + * gnus-spec.el (gnus-update-format-specifications): Really check + the Gnus version of the .newsrc.eld file. + (gnus-format-specs): Save the new default summary format. + + * gnus-util.el (gnus-parent-id): Check whether references is empty + before splitting. + + * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Inline some + functions. + (gnus-gather-threads-by-references): Inline + `gnus-split-references'. + + * gnus-spec.el (gnus-summary-line-format-spec): New, optimized + default value of gnus-summary-line-format-spec. + +2002-01-15 ShengHuo ZHU + + * nnslashdot.el (nnslashdot-retrieve-headers-1): A better error + message. + (nnslashdot-request-list): Ditto. + (nnslashdot-sid-strip): Removed. + +2002-01-15 Simon Josefsson + + * nnimap.el (nnimap-close-asynchronous): Enable. + (nnimap-close-group): Expunge. + +2002-01-15 ShengHuo ZHU + + * gnus-util.el (gnus-user-date-format-alist): Typo. + From: Frank Schmitt + +2002-01-15 TSUCHIYA Masatoshi + + * nneething.el (nneething-request-article): Set + `nnmail-file-coding-system' to `binary' locally, in order to read + files without any conversion. + +2002-01-15 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-retrieve-headers): Use + nnheader-file-coding-system and nnmail-active-file-coding-system. + (gnus-agent-regenerate-group): Ditto. + (gnus-agent-regenerate): Ditto. + (gnus-agent-write-active): Ditto. + Suggested by Katsumi Yamaoka + +2002-01-14 ShengHuo ZHU + + * gnus-art.el (gnus-button-alist): Don't highlight + +2002-01-14 ShengHuo ZHU + + * gnus.el: We don't need gnus-article-show-all-headers. + + * gnus-art.el (article-show-all, gnus-article-show-all-header): + Ditto. + + * gnus-sum.el (gnus-summary-select-article): Don't call + show-all-headers, because hidden headers are not hidden text any + more. + +2002-01-13 Simon Josefsson + + * message.el (message-newline-and-reformat): Use `newline' instead + of inserting \n, so that the newline is marked as hard. + + * gnus-spec.el (gnus-pad-form): Don't evaluate EL multiple times. + From Jesper Harder . + +2002-01-12 ShengHuo ZHU + + * imap.el (imap-close): Keep going if quit. + + * gnus-agent.el (gnus-agent-retrieve-headers): Erase + nntp-server-buffer. + +2002-01-12 Lars Magne Ingebrigtsen + + * mm-view.el (mm-display-inline-fontify): Require font-lock to + avoid unbinding shadowed variables. + + * gnus-art.el (gnus-picon-databases): Moved here. + (gnus-picons-installed-p): Moved here. + (gnus-article-reply-with-original): Use `mark'. + + * gnus.el (gnus-picon): Moved here and renamed. + + * gnus-art.el (gnus-treat-from-picon): Only be on if picons are + installed. + (gnus-treat-mail-picon): Ditto. + (gnus-treat-newsgroups-picon): Ditto. + + * gnus-picon.el (gnus-picons-installed-p): New function. + +2002-01-12 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-go-online): Fix doc. + +2002-01-12 Simon Josefsson + + * nnimap.el (nnimap-need-unselect-to-notice-new-mail) + (nnimap-before-find-minmax-bugworkaround): Use it. + (nnimap-find-minmax-uid): Don't reselect current mailbox. + (nnimap-dont-close): New variable. + (nnimap-close-group): Use it. + +2002-01-12 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-reply-with-original): Use + `mark-active'. + + * gnus-msg.el (gnus-summary-reply): Don't bug out on regions. + + * gnus-logic.el (gnus-advanced-score-rule): Thinko fix. + (gnus-score-advanced): Clean up. + (gnus-score-advanced): Accept a multiple of the score. + +2002-01-12 Simon Josefsson + + * flow-fill.el (fill-flowed-display-column) + (fill-flowed-encode-columnq): New variables. Suggested by + Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro,A_(Bjohann). + (fill-flowed-encode, fill-flowed): Use them. + + * message.el (message-send-news, message-send-mail): Use + m-b-s-n-p-e-h-n. + + * mml.el (autoload): Autoload fill-flowed-encode. + (mml-buffer-substring-no-properties-except-hard-newlines): New + function. + (mml-read-part): Use it. + (mml-generate-mime-1): Encode format=flowed if appropriate. + (mml-insert-mime-headers): Insert format=flowed. + + * flow-fill.el (fill-flowed-encode): New function. + (fill-flowed): Bind fill-column to window width. + +2002-01-12 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-buffer-name): Return the dead name if + it exists. + (gnus-summary-setup-buffer): Wake up dead summary buffers. + (gnus-summary-buffer-name): Don't return the dead name after all. + (gnus-summary-setup-buffer): Kill the dead buffer. + + * gnus-art.el (gnus-article-followup-with-original): Store the + value of the mark before deactivating it. + +2002-01-11 ShengHuo ZHU + + * gnus-fun.el (gnus-display-x-face-in-from): Fake it. + From: Karl Kleinpaste + + * gnus-art.el (article-display-x-face): Ditto. + (gnus-article-reply-with-original): Use gnus-region-active-p. + (gnus-article-followup-with-original): Ditto. + + * gnus-sum.el (gnus-summary-read-group-1): Don't select + downloadable article either. + +2002-01-11 ShengHuo ZHU + + * gnus-art.el (article-display-x-face): Insert From:. + + * gnus-sum.el (gnus-summary-move-article): Don't draw the + article. Bind gnus-display-mime-function and + gnus-article-prepare-hook. + + * gnus-agent.el (gnus-agent-retrieve-headers): Load agentview. + (gnus-agent-toggle-plugged): Use gnus-agent-go-online. Move + gnus-agent-possibly-synchronize-flags to the last. + (gnus-agent-go-online): New function. New variable. + +2002-01-11 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-regenerate-group): Add clean option. + (gnus-agent-regenerate): Ditto. + +2002-01-11 ShengHuo ZHU + + * message.el (message-ignored-news-headers) + (message-ignored-mail-headers): Add X-Gnus-Agent-Meta-Information:. + Suggested by ARISAWA Akihiro + + * gnus.el (gnus-gethash-safe): New macro. + + * gnus-agent.el (gnus-agent-regenerate-history): New function. + (gnus-agent-regenerate): Show messages. + +2002-01-11 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-regenerate-group): New function. + (gnus-agent-regenerate): New function. + (gnus-agent-save-alist): Sort. + (gnus-agent-copy-nov-line): Test eobp. + (gnus-agent-retrieve-headers): Erase buffer. + +2002-01-10 ShengHuo ZHU + + * mm-util.el (mm-charset-to-coding-system): Change charset to cs. + From: Torsten Hilbrich + + * gnus.el (gnus-agent-covered-methods): Move here. + (gnus-online): New function. + (gnus-agent-method-p): Move here. + + * nnagent.el (nnagent-retrieve-headers): Check whether arts is + nil. Remove articles-alist. + + * gnus-start.el (gnus-get-unread-articles): Check online. + (gnus-groups-to-gnus-format): Ditto. + (gnus-active-to-gnus-format): Ditto. + + * gnus-agent.el (gnus-agent-get-function): Use it. + (gnus-agent-get-undownloaded-list): Ditto. + (gnus-agent-fetch-session): Only fetch online methods. + + * gnus-srvr.el (gnus-server-make-menu-bar): Add offline. + (gnus-server-mode-map): Ditto. + (gnus-server-offline-face): New face. + (gnus-server-offline-face): New variable. + (gnus-server-font-lock-keywords): Add offline. + (gnus-server-insert-server-line): Ditto. + (gnus-server-offline-server): New function. + + * gnus-int.el (gnus-open-server): Turn to offline. + (gnus-server-unopen-status): New variable. + +2002-01-10 ShengHuo ZHU + + * nnkiboze.el (nnkiboze-request-article): Use + gnus-agent-request-article. + + * nnagent.el (nnagent-retrieve-headers): Don't use nnml + function. Insert undownloaded NOV. + + * gnus-agent.el (gnus-agent-retrieve-headers): New function. + (gnus-agent-request-article): New function. + + * gnus.el (gnus-agent-cache): New variable. + + * gnus-int.el (gnus-retrieve-headers): Use + gnus-agent-retrieve-headers. + (gnus-request-head): Use gnus-agent-request-article. + (gnus-request-body): Ditto. + + * gnus-art.el (gnus-request-article-this-buffer): Use + gnus-agent-request-article. + + * gnus-sum.el (gnus-summary-read-group-1): Don't show the first + article if it is undownloaded. + +2002-01-10 Katsumi Yamaoka + + * gnus-spec.el (gnus-spec-tab): Deal with wide characters. + +2002-01-09 Katsumi Yamaoka + + * canlock.el (canlock-string-as-unibyte): New macro. + (canlock-sha1-with-openssl): Return a unibyte string. + (canlock-make-cancel-key): Treat Message-ID as a unibyte string. + +2002-01-09 ShengHuo ZHU + + * gnus.el (gnus-expand-group-parameters): Match \N or \& only. + +2002-01-08 ShengHuo ZHU + + * mm-encode.el (mm-content-transfer-encoding-defaults): Add + application/x-emacs-lisp. + + * gnus-msg.el (gnus-bug): Use application/emacs-lisp. + + * nntp.el (nntp-request-article): Add group parameter. + (nntp-request-head): Ditto. + (nntp-find-group-and-number): Add parameter group. Figure out + number if the status line doesn't give (e.g. quimby.gnus.org). + +2002-01-08 Simon Josefsson + + * mml.el (mml-generate-mime-1): Set recipient correctly. + +2002-01-08 ShengHuo ZHU + + * message.el (message-read-from-minibuffer): Add parameter + initial-contents. + * gnus-msg.el (gnus-summary-resend-message): Use it. + + * gnus-group.el (gnus-group-read-ephemeral-group): Restore the old + behavior of quit-config. + + * message.el (message-make-from): Don't quote fullname. + From: Bj,Ax(Brn Mork + + * gnus-group.el (gnus-group-suspend): Don't kill message buffers. + From: + +2002-01-07 ShengHuo ZHU + + * gnus-group.el (gnus-group-mark-article-read): Typo. Increase n. + + * gnus-art.el (gnus-header-button-alist): Handle mailto. + + * mml.el (mml-preview): Bind gnus-original-article-buffer because + article-decode-group-name uses it. Bind gnus-article-prepare-hook + because bbdb may use it. + +2002-01-07 TSUCHIYA Masatoshi + + * nneething.el (nneething-request-article): When a non-text file + is converted to an article, its data is encoded in base64. Call + `nneething-make-head' with options to specify MIME types. + (nneething-make-head): Add optional arguments to specify MIME + types. + +2002-01-06 ShengHuo ZHU + + * gnus-fun.el (gnus-display-x-face-in-from): Fake a "From: " + header if there is not. + + * gnus-xmas.el (gnus-xmas-put-image): Insert " " if bobp. + + * gnus-msg.el (gnus-gcc-mark-as-read): New variable. + (gnus-inews-mark-gcc-as-read): Obsolete variable. + (gnus-inews-do-gcc): Use them. + + * gnus-group.el (gnus-group-mark-article-read): Put holes into + gnus-newsgroup-unselected. + +2002-01-06 Simon Josefsson + + * imap.el (imap-ssl-open, imap-ssl-open, imap-parse-fetch): Use + condition-case, not ignore-errors. + +2002-01-06 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-insert-old-articles): Bind + gnus-fetch-old-headers. + + * gnus-art.el (article-display-x-face): Use the current buffer + unless `W f'. Otherwise, X-Face may be shown in the header of a + forwarded part. + (gnus-treatment-function-alist): Treat xface before hiding + headers. + +2002-01-06 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-read-ephemeral-group): Fix + parameters. + +2002-01-06 ShengHuo ZHU + + * mm-util.el (mm-multibyte-p): Define conditionally when load. + (mm-guess-charset): New function. + (mm-charset-after): Use it. + (mm-detect-coding-region): New function. + (mm-detect-mime-charset-region): New function. + + * gnus-sum.el (gnus-summary-show-article): Use + mm-detect-coding-region. + +2002-01-06 Lars Magne Ingebrigtsen + + * message.el (message-make-fqdn): Be less violent. + + * gnus.el (gnus-logo-color-style): Compute custom form + automatically. + + * gnus-sum.el (gnus-summary-enter-digest-group): Feed the adaptive + score file of the parent to the document group. + + * gnus-group.el (gnus-group-read-ephemeral-group): Add an optional + parameters parameter. + + * gnus-score.el (gnus-score-load-file): Clean up. + +2002-01-06 ShengHuo ZHU + + * gnus-sum.el (gnus-thread-sort-by-most-recent-number): Fix typo. + From: Damien Wyart + + * gnus-util.el (gnus-local-map-property): In Emacs 21, use keymap. + +2002-01-05 ShengHuo ZHU + + * gnus-sum.el (gnus-select-group-hook): Typo. + + * rfc2047.el (rfc2047-decode-string): Return immediately if there + is no quoted-printable-encoded STRING. + From: Jesper Harder + + (rfc2047-decode-string): Decode it. + +2002-01-05 Lars Magne Ingebrigtsen + + * gnus.el (gnus-logo-color-alist): Added more colors from Luis. + +2002-01-05 Keiichi Suzuki + + * nntp.el (nntp-possibly-change-group): Erase contents of nntp + buffer to get rid of junk line. + +2002-01-05 Simon Josefsson + + * message.el (message-mode-map): Bind message-goto-from to C-c C-f + C-o. + (message-mode-map): Bind message-insert-or-toggle-importance to + C-c C-u. + (message-mode-map): Bind message-disposition-notification-to to + C-c M-n. + (message-mode-menu): Add m-d-n-t. + (message-mode-field-menu): Add m-goto-from. + (message-mode): Doc fix. + (message-goto-from): New function. + (message-insert-disposition-notification-to): New function. + (message-tool-bar-map): Add receipt button. + +2002-01-05 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-thread-latest-date): New function. + (gnus-thread-sort-by-most-recent-number): Renamed. + (gnus-thread-sort-functions): Doc fix. + (gnus-select-group-hook): Don't use setq on a hook. + (gnus-thread-latest-date): Use date, not number + + * gnus-agent.el (gnus-agent-expire-days): Doc fix. + (gnus-agent-expire): Allow regexp of expire-days. + + * gnus-art.el (gnus-article-reply-with-original): Deactivate + region. + (gnus-article-followup-with-original): Ditto. + + * gnus-sum.el (gnus-thread-highest-number): Doc fix. + + * gnus-art.el (gnus-mime-display-alternative): Use + gnus-local-map-property. + (gnus-mime-display-alternative): Ditto. + (gnus-insert-mime-security-button): Ditto. + (gnus-insert-next-page-button): Ditto. + (gnus-button-prev-page): Take optional args. + (gnus-insert-prev-page-button): widget-convert. + + * gnus-util.el (gnus-local-map-property): New function. + + * gnus-art.el (gnus-prev-page-map): Use parent map. + (gnus-next-page-map): Ditto. + + * gnus-spec.el (gnus-parse-format): Clean up. + (gnus-parse-format): Do complex formatting for %=. + + * gnus-fun.el (gnus-display-x-face-in-from): Add the string + "X-Face: " to the data in the built-in scenario. + + * gnus-spec.el (gnus-parse-simple-format): Use gnus-pad-form. + (gnus-correct-pad-form): Renamed. + (gnus-tilde-max-form): Clean up. + (gnus-pad-form): Use gnus-use-correct-string-widths. + + * gnus-fun.el (gnus-display-x-face-in-from): Use native xface + support if that is available. + + * gnus-sum.el (gnus-thread-highest-number): New function. + (gnus-thread-sort-by-most-recent-thread): New function. + (gnus-thread-sort-functions): Doc fix. + +2002-01-04 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-select-article): Disable multibyte in + all cases. + (gnus-summary-mode): Enable it in all cases. + (gnus-summary-display-article): Ditto. + (gnus-summary-edit-article): Ditto. + + * gnus-ems.el (gnus-put-image): Really return glyph. + + * gnus-art.el (gnus-article-x-face-command): Fix :type. + (gnus-treat-smiley): Don't take "P" in the interactive form. + 2002-01-04 Lars Magne Ingebrigtsen + * compface.el (uncompface): XEmacs and Emacs have differing + capabilities. + + * gnus-fun.el (gnus-display-x-face-in-from): Use face. + + * gnus-ems.el (gnus-article-xface-ring-internal): Removed. + (gnus-article-xface-ring-size): Removed. + (gnus-article-display-xface): Removed. + (gnus-remove-image): Cleaned up. + * gnus-xmas.el (gnus-xmas-create-image): Convert pbm to xbm. (gnus-xmas-create-image): Take pbm files. + (gnus-x-face): Removed. + (gnus-xmas-article-display-xface): Removed. + + * gnus-fun.el (gnus-display-x-face-in-from): Bind + default-enable-multibyte-characters. + + * compface.el (uncompface): Doc fix. + + * gnus-art.el (gnus-article-x-face-command): Use + gnus-display-x-face-in-from. + + * gnus-xmas.el (gnus-xmas-put-image): Return the image. + + * gnus-ems.el (gnus-put-image): Return the image. + + * gnus-fun.el (gnus-display-x-face-in-from): New function. + (gnus-x-face): Moved here. + +2002-01-04 ShengHuo ZHU + + * gnus-xmas.el (gnus-xmas-put-image): Don't insert SPC or make + invisible if string is nil. + (gnus-xmas-article-display-xface): Use it. + + * gnus-ems.el (gnus-put-image): Explicitly use SPC, and add text + property when string is nil. + (gnus-article-display-xface): Use it. + +2002-01-04 Lars Magne Ingebrigtsen + + * gnus-art.el (article-display-x-face): Check whether valid grey + face was returned. + (article-display-x-face): Place image in the right spot. + + * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Get rid of + stderr. + (gnus-convert-gray-x-face-to-xpm): Check whether output is valid. 2002-01-03 Lars Magne Ingebrigtsen @@ -9,8 +707,142 @@ parameters. (gnus-xmas-put-image): Allow non-strings to be passed. + * gnus-art.el (article-display-x-face): Use optional parameters. + * gnus-ems.el (gnus-create-image): Take optional parameters. + * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Use uncompface. + + * compface.el (compface-xbm-p): Removed. + + * gnus-ems.el (gnus-article-compface-xbm): Removed. + (gnus-article-display-xface): Use compface. + + * compface.el: New file. + + * gnus-fun.el (gnus-convert-pbm-to-x-face-command): Remove quotes. + (gnus-convert-image-to-x-face-command): Ditto. + (gnus-random-x-face): Quote argument. + (gnus-x-face-from-file): Ditto. + +2002-01-03 Paul Jarc + + * nnmaildir.el (nnmaildir-request-expire-articles): evaluate + the expire-group parameter once per article rather than once + per group; bind `nnmaildir-article-file-name' and `article' + for convenience. Leave article alone when expire-group + specifies the current group. + (nnmaildir--update-nov): be more concurrency-friendly with + temp file names. + +2002-01-03 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-read-init-file): Cleaned up. + +2002-01-03 Dave Love + + * gnus-start.el (gnus-startup-file-coding-system): Removed. + (gnus-read-init-file): Don't use it. + +2002-01-03 Lars Magne Ingebrigtsen + + * gnus-agent.el (gnus-agent-fetch-session): Run hook. + +2002-01-03 Kai Gro,A_(Bjohann + + * gnus-start.el (gnus-read-init-file): Don't force coding system + for ~/.gnus. From Dave Love . + +2002-01-03 ShengHuo ZHU + + * nntp.el (nntp-send-buffer): Use mm-with-unibyte-current-buffer. + * nnspool.el (nnspool-request-post): Ditto. + + * mm-util.el (mm-use-find-coding-systems-region): New variable. + (mm-find-mime-charset-region): Use it. + +2002-01-03 Per Abrahamsen + + * gnus.el (gnus-summary-line-format): Added :link. + * gnus-topic.el (gnus-topic-line-format): Ditto. + * gnus-sum.el (gnus-summary-dummy-line-format): Ditto. + * gnus-srvr.el (gnus-server-line-format): Ditto. + * gnus-group.el (gnus-group-line-format): Ditto. + + * gnus-sum.el (gnus-summary-make-menu-bar): Use correct syntax for + :keys, it works on both Emacsen. + +2002-01-03 ShengHuo ZHU + + * mm-util.el (mm-charset-to-coding-system): Don't setq charset. + +2002-01-03 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-summary-send-map): Fix binding for very-wide. + +2002-01-03 Reiner Steib + + * gnus-sum.el (gnus-summary-make-menu-bar): Menu bar entries for + very wide reply. + +2002-01-03 Lars Magne Ingebrigtsen + + * gnus-picon.el (gnus-picon-transform-address): Cache stuff. + (gnus-picon-cache): New variable. + (gnus-picon-transform-newsgroups): Cache stuff. + + * gnus-art.el (gnus-article-reply-with-original): New command. + (gnus-article-followup-with-original): New command. + + * gnus-msg.el (gnus-copy-article-buffer): Take optional BEG and + END parameters. + (gnus-summary-followup): Take a list of list of articles. + (gnus-inews-yank-articles): Allow lists of article/regions. + + * gnus-art.el (gnus-article-read-summary-keys): `R' and `F' are no + longer the usual commands. + + * gnus-fun.el (gnus-convert-image-to-gray-x-face): Use pnmnoraw. + (gnus-convert-gray-x-face-to-xpm): Don't use six parameters to + shell-command-on-region. + +2002-01-02 ShengHuo ZHU + + * gnus-picon.el (gnus-picon-transform-newsgroups): Fix for the case + "Newsgroups: rec.music.beatles.moderated, rec.music.beatles". + +2002-01-03 Steve Youngs + + * gnus-sum.el (gnus-summary-make-menu-bar): XEmacs doesn't + understand ':keys', wrap it in an featurep 'xemacs. + +2002-01-02 ShengHuo ZHU + + * gnus-ems.el (gnus-article-display-xface): Show xface in the + order of headers (Actually, it is called in a reversed order). Add + 'gnus-image-text-deletable property. + (gnus-remove-image): Remove text with such a property. + + * gnus-xmas.el (gnus-xmas-article-display-xface): Don't use + gnus-put-image. + + * gnus-art.el (gnus-article-treat-fold-newsgroups): Replace ", *" + with ", " + +2002-01-02 Lars Magne Ingebrigtsen + + * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Renamed. + + * gnus-art.el (gnus-ignored-headers): Hide all X-Faces. + (article-display-x-face): Display grey X-Faces. + + * gnus-fun.el (gnus-convert-gray-x-face-region): New function. + (gnus-convert-gray-x-face-to-ppm): Ditto. + (gnus-convert-image-to-gray-x-face): Ditto. + + * gnus-sum.el (gnus-summary-make-menu-bar): Add a :keys to + gnus-summary0show-raw-article. + 2002-01-02 ShengHuo ZHU Display picons in XEmacs without showing text. @@ -21,6 +853,170 @@ (gnus-xmas-put-image): Use end-glyph. Make text invisible. (gnus-xmas-remove-image): Make text visible, remove glyph. + * gnus-picon.el (gnus-picon-transform-newsgroups) + (gnus-picon-transform-address): Insert spec backward, due to the + incompatibility of gnus-xmas-put-image. + +2002-01-02 Pavel Jan,Bm(Bk + + * gnus-fun.el (gnus-convert-pbm-to-x-face-command): Doc fix. + +2002-01-02 Lars Magne Ingebrigtsen + + * gnus.el: Doc fix. + + * gnus-art.el: Doc fix. + + * gnus-agent.el: Doc fix. + +2002-01-01 ShengHuo ZHU + + * gnus-diary.el, gnus-delay.el: Fix copyright lines. + +2002-01-01 Paul Jarc + + * nnmaildir.el (nnmaildir--update-nov): automatically parse + NOV data out of the message again if nnmail-extra-headers has + changed. + +2002-01-02 Lars Magne Ingebrigtsen + + * gnus-fun.el: New file. + (gnus-convert-image-to-x-face-command): New variable. + (gnus-insert-x-face): New function. + (gnus-random-x-face): Renamed. + (gnus-x-face-from-file): Renamed. + + * gnus-art.el (gnus-body-boundary-delimiter): Changed default to + "_". + (gnus-body-boundary-delimiter): Typo fix. + +2002-01-02 Simon Josefsson + + * gnus-art.el (gnus-article-treat-body-boundary): Handle nil. + (gnus-body-boundary-delimiter): Fix type. + +2002-01-01 Simon Josefsson + + * gnus-art.el (gnus-treat-buttonize, gnus-treat-buttonize-head) + (gnus-treat-emphasize, gnus-treat-strip-cr) + (gnus-treat-leading-whitespace, gnus-treat-hide-headers) + (gnus-treat-hide-boring-headers, gnus-treat-hide-signature) + (gnus-treat-fill-article, gnus-treat-hide-citation) + (gnus-treat-hide-citation-maybe) + (gnus-treat-strip-list-identifiers, gnus-treat-strip-pgp) + (gnus-treat-strip-pem, gnus-treat-strip-banner) + (gnus-treat-highlight-headers, gnus-treat-highlight-citation) + (gnus-treat-date-ut, gnus-treat-date-local) + (gnus-treat-date-english, gnus-treat-date-lapsed) + (gnus-treat-date-original, gnus-treat-date-iso8601) + (gnus-treat-date-user-defined, gnus-treat-strip-headers-in-body) + (gnus-treat-strip-trailing-blank-lines) + (gnus-treat-strip-leading-blank-lines) + (gnus-treat-strip-multiple-blank-lines) + (gnus-treat-unfold-headers, gnus-treat-fold-headers) + (gnus-treat-fold-newsgroups, gnus-treat-overstrike) + (gnus-treat-display-xface, gnus-treat-display-smileys) + (gnus-treat-from-picon, gnus-treat-mail-picon) + (gnus-treat-newsgroups-picon, gnus-treat-body-boundary) + (gnus-treat-capitalize-sentences, gnus-treat-fill-long-lines) + (gnus-treat-play-sounds, gnus-treat-translate) + (gnus-treat-x-pgp-sig): Doc fix, add link to manual. + + * gnus-art.el (gnus-body-boundary-delimiter): New variable. + (gnus-article-treat-body-boundary): Use it. + + * message.el (message-mode): Fix doc. + (message-mode-menu): Fix names. + +2002-01-01 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-first-subject): Really go to unseen + articles. + + * gnus-picon.el (gnus-picon-find-face): Search MISC for all types. + (gnus-picon-transform-address): Search for unknown faces as well. + (gnus-picon-find-face): Don't search "news" for MISC. + (gnus-picon-user-directories): Changed default back to exclude + "unknown". + + * gnus-sum.el (gnus-summary-hide-all-threads): Reversed logic. + + * gnus-picon.el (gnus-picon-find-face): Search through all + databases. + (gnus-picon-find-face): New implementation. + + * gnus-topic.el (gnus-topic-goto-previous-topic): New command and + keystroke. + (gnus-topic-goto-next-topic): Ditto. + + * gnus.el (gnus-summary-line-format): Changed default. + + * nnmail.el (nnmail-extra-headers): Change default. + + * gnus-sum.el (gnus-extra-headers): Change default. + + * message.el (message-news-other-window): Changed "news" to + "posting". + (message-news-other-frame): Ditto. + (message-do-send-housekeeping): Ditto. + + * gnus-sum.el (gnus-summary-maybe-hide-threads): Use predicate + function. + (gnus-article-unread-p): New function. + (gnus-article-unseen-p): New function. + (gnus-dead-summary-mode-map): Typo. + + * gnus-util.el (gnus-make-predicate): New function. + (gnus-make-predicate-1): New function. + + * gnus-sum.el: New function. + (gnus-map-articles): New function. + + * gnus-art.el (gnus-treat-fold-headers): New variable. + (gnus-article-treat-fold-headers): New command and keystroke. + + * gnus-sum.el (gnus-dead-summary-mode-map): Clean up. + (gnus-dead-summary-mode-map): Bind q to bury-buffer. + +2002-01-01 ShengHuo ZHU + + * message.el (message-fcc-externalize-attachments): New variable. + (message-do-fcc): Use it. + + * gnus-msg.el (gnus-gcc-externalize-attachments): New variable. + (gnus-inews-do-gcc): Use it. + + * mml.el (mml-tweak-sexp-alist): New variable. + (mml-externalize-attachments): New variable. + (mml-tweak-part): Use mml-tweak-sexp-alist. + (mml-tweak-externalize-attachments): New function. + +2002-01-01 Steve Youngs + + * gnus-xmas.el (gnus-xmas-article-display-xface): Uncomment + 'set-glyph-face' so x-face back/foreground can be set. + +2001-12-31 ShengHuo ZHU + + * message.el (message-fix-before-sending): Fix a typo. + +2002-01-01 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-treat-smiley): Renamed command. + (gnus-article-remove-images): New command and keystroke. + + * gnus-sum.el (gnus-summary-toggle-smiley): Removed. + + * smiley-ems.el (gnus-smiley-display): Removed. + + * gnus.el (gnus-version-number): Update version. + + * message.el (message-text-with-property): Renamed and moved + here. + (message-fix-before-sending): Highlight invisible text and place + point there. + 2002-01-01 02:32:53 Lars Magne Ingebrigtsen * gnus.el: Oort Gnus v0.04 is released. @@ -32,30 +1028,30 @@ * gnus-art.el (gnus-ignored-headers): More headers, * ietf-drums.el (ietf-drums-parse-addresses): Use `error' instead - of `scan-error', since XEmacs doesn't seem to support that. + of `scan-error', since XEmacs doesn't seem to support that. 2001-12-31 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-summary-best-unread-article): Take a prefix - arg. + arg. (gnus-summary-best-unread-subject): Ditto. (gnus-summary-best-unread-subject): No, don't. (gnus-summary-better-unread-subject): New command. - * gnus-xmas.el (gnus-xmas-put-image): Insert the string itself. + * gnus-xmas.el (gnus-xmas-put-image): Insert the string itself. * lpath.el ((featurep 'xemacs)): fbind url function. * gnus-xmas.el (gnus-xmas-article-display-xface): Use data, not - buffer. - (gnus-xmas-remove-image): Implementation that does something. + buffer. + (gnus-xmas-remove-image): Implementation that does something. (gnus-xmas-article-display-xface): Mark images properly. - * gnus-art.el (gnus-mime-print-part): Use mm-temp-directory. + * gnus-art.el (gnus-mime-print-part): Use mm-temp-directory. 2001-12-31 Florian Weimer - * gnus.el (gnus): Warn if trying to run Gnus un-byte-compiled. + * gnus.el (gnus): Warn if trying to run Gnus un-byte-compiled. 2001-12-31 Lars Magne Ingebrigtsen @@ -63,7 +1059,7 @@ value. * gnus-util.el (gnus-text-with-property): The smallest point is - point-min. + point-min. * smiley-ems.el (smiley-region): Return images. (gnus-smiley-display): Allow toggling. @@ -90,7 +1086,7 @@ * gnus-art.el (gnus-delete-images): New function. - * gnus-ems.el (gnus-article-display-xface): Mark and store image. + * gnus-ems.el (gnus-article-display-xface): Mark and store image. * gnus-art.el (gnus-article-wash-status-entry): Renamed. (gnus-article-wash-status): Use it. @@ -103,7 +1099,7 @@ * gnus-ems.el (gnus-article-display-xface): Use new interface. * gnus-xmas.el (gnus-xmas-article-display-xface): Use new - interface. + interface. * gnus-art.el (article-display-x-face): Cleaned up. @@ -125,7 +1121,7 @@ looked for when REQUEST is a string. * gnus-art.el (gnus-mime-button-commands): Add printing - keystroke. + keystroke. (gnus-mime-copy-part): Doc fix. (gnus-mime-print-part): New command. @@ -146,7 +1142,7 @@ 2001-12-30 Lars Magne Ingebrigtsen * gnus-art.el (gnus-article-treat-fold-newsgroups): Don't - infloop. + infloop. * gnus-sum.el (t): New `W D' map. @@ -163,7 +1159,7 @@ * rfc2047.el (rfc2047-fold-line): New function. (rfc2047-unfold-line): Ditto. - (rfc2047-fold-region): Don't fold just after the header name. + (rfc2047-fold-region): Don't fold just after the header name. * mail-parse.el (mail-header-fold-line): New alias. (mail-header-unfold-line): Ditto. @@ -190,16 +1186,16 @@ 2001-12-30 Lars Magne Ingebrigtsen * gnus-art.el (gnus-body-separator-face): New variable. - (gnus-article-treat-body-boundary): Use a blank, colored line. + (gnus-article-treat-body-boundary): Use a blank, colored line. * gnus-picon.el (gnus-picon-find-face): Look into misc/MISC as - well. + well. * gnus-art.el (gnus-treat-body-boundary): New variable. (gnus-article-treat-unfold-headers): Use helper macro. (gnus-article-treat-body-boundary): New command. - * gnus.el (gnus-logo-color-style): Change the default color. + * gnus.el (gnus-logo-color-style): Change the default color. (gnus-splash-face): Gray, gray. * gnus-xmas.el (gnus-xmas-group-startup-message): Use general @@ -211,13 +1207,13 @@ * gnus-picon.el (gnus-picon-create-glyph): Cache glyphs. - * gnus-art.el (gnus-treat-newsgroups-picon): New variable. + * gnus-art.el (gnus-treat-newsgroups-picon): New variable. * gnus-picon.el (gnus-treat-newsgroups-picon): New function. (gnus-picon-transform-newsgroups): New function. * ietf-drums.el (ietf-drums-parse-addresses): Accept a nil - string. + string. * gnus-picon.el (gnus-treat-mail-picon): Renamed. @@ -234,7 +1230,7 @@ (gnus-treat-cc-picon): New command. * mm-decode.el (mm-create-image-xemacs): Separated out into - function. + function. (mm-get-image): Use it. * gnus-art.el (gnus-treat-display-picons): Simplify. @@ -266,11 +1262,11 @@ * gnus-art.el (gnus-treat-unfold-lines): New variable. (gnus-treat-unfold-headers): Remamed. - (gnus-article-treat-unfold-headers): New command and keystroke. + (gnus-article-treat-unfold-headers): New command and keystroke. * rfc2047.el (rfc2047-encode-message-header): Clean up. - * gnus-int.el (gnus-open-server): Mark quit-ed server as denied. + * gnus-int.el (gnus-open-server): Mark quit-ed server as denied. 2001-12-29 ShengHuo ZHU @@ -284,7 +1280,7 @@ 2001-12-29 Lars Magne Ingebrigtsen * gnus-picon.el (gnus-picons-news-directories): Removed obsolete - alias. + alias. (gnus-picons-database): Default to list. (gnus-picons-lookup-internal): Use it. @@ -295,56 +1291,56 @@ 2001-12-29 Sascha L,A|(Bdecke - * gnus-win.el (gnus-configure-windows): Minimize tree buffer. + * gnus-win.el (gnus-configure-windows): Minimize tree buffer. 2001-12-29 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-update-marks): Don't uncompress the seen - lists. + lists. (gnus-select-newsgroup): Don't append; push. (gnus-adjust-marked-articles): Remove obsolete ranges from - `seen'. + `seen'. (gnus-update-marks): Clean up. (gnus-select-newsgroup): Don't stomp gnus-newsgroup-seen. 2001-12-29 Frank Schmitt - * gnus-sum.el (gnus-summary-limit-to-age): Allow negative days. + * gnus-sum.el (gnus-summary-limit-to-age): Allow negative days. 2001-12-29 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-auto-select-subject): New variable. (gnus-summary-best-unread-subject): New function. (gnus-summary-best-unread-article): Use it. - (gnus-summary-first-unseen-subject): New function and command. + (gnus-summary-first-unseen-subject): New function and command. * gnus-art.el (gnus-treatment-function-alist): Emphasize after other treatments. * gnus-util.el (gnus-put-overlay-excluding-newlines): New - function. + function. * gnus-art.el (gnus-article-show-hidden-text): Remove the type - from the list of hidden types. + from the list of hidden types. * mm-view.el (mm-inline-text): Ditto. (mm-inline-text): Ditto. (mm-w3-prepare-buffer): Ditto. - * gnus-art.el (article-wash-html): Inhibit more remote fetching. + * gnus-art.el (article-wash-html): Inhibit more remote fetching. 2001-12-29 Lars Magne Ingebrigtsen - * gnus-art.el (gnus-ignored-headers): Added more headers. + * gnus-art.el (gnus-ignored-headers): Added more headers. 2001-12-29 Jesper Harder * gnus-srvr.el (gnus-browse-foreign-server): Compute the prefix - once. + once. 2001-12-29 Lars Magne Ingebrigtsen - * gnus-srvr.el (gnus-server-browse-in-group-buffer): Doc fix. + * gnus-srvr.el (gnus-server-browse-in-group-buffer): Doc fix. 2001-12-28 Simon Josefsson @@ -367,7 +1363,7 @@ From Jesper Harder 2001-12-26 Paul Jarc - + * nnmaildir.el (nnmaildir-save-mail): create the destination groups if they do not exist. @@ -387,17 +1383,17 @@ return it. 2001-12-21 Paul Jarc - + * gnus.el (gnus-valid-select-methods): Include nnmaildir. * nnmaildir.el (top-level): Add commentary. (nnmaildir-version): Indicate that nnmaildir is now a standard - part of Gnus, not separately released. - + part of Gnus, not separately released. + 2001-12-21 08:00:00 ShengHuo ZHU * gnus-art.el, gnus-picon.el, gnus-sieve.el, gnus-sum.el: * gnus-xmas.el, imap.el, mailcap.el, mm-util.el, nnfolder.el: - * nnheader.el, nnmail.el: Nil/NIL vs. nil. + * nnheader.el, nnmail.el: Nil/NIL vs. nil. From Pavel Jan,Bm(Bk 2001-12-20 15:00:00 ShengHuo ZHU @@ -413,7 +1409,7 @@ 2001-12-19 17:00:00 ShengHuo ZHU - * nnmaildir.el: New. + * nnmaildir.el: New file. From Paul Jarc . 2001-12-19 16:00:00 ShengHuo ZHU @@ -427,7 +1423,7 @@ 2001-12-19 01:00:00 ShengHuo ZHU - * gnus-win.el (gnus-frames-on-display-list): New. + * gnus-win.el (gnus-frames-on-display-list): New function. (gnus-get-buffer-window): Use it. 2001-12-19 00:00:00 ShengHuo ZHU @@ -437,15 +1433,15 @@ 2001-12-18 11:00:00 ShengHuo ZHU * gnus-win.el (gnus-get-buffer-window): Use gnus-delete-if. - + 2001-12-18 11:00:00 ShengHuo ZHU From Harald Meland * gnus-win.el (gnus-get-buffer-window): New function. (gnus-all-windows-visible-p): Use it. - * gnus-util.el (gnus-horizontal-recenter) - (gnus-horizontal-recenter, gnus-horizontal-recenter) + * gnus-util.el (gnus-horizontal-recenter) + (gnus-horizontal-recenter, gnus-horizontal-recenter) (gnus-horizontal-recenter, gnus-set-window-start): Use it. * gnus-score.el (gnus-score-insert-help): Use it. @@ -525,26 +1521,26 @@ 2001-12-13 20:00:00 ShengHuo ZHU - * uudecode.el (uudecode-use-external): New. + * uudecode.el (uudecode-use-external): New variable. (uudecode-decode-region): Automatically detect external program. - * binhex.el (binhex-use-external): New. - (binhex-decode-region-internal): New. + * binhex.el (binhex-use-external): New variable. + (binhex-decode-region-internal): New function. (binhex-decode-region): Automatically detect external program. - - * mm-uu.el (mm-uu-decode-function): - (mm-uu-binhex-decode-function): Use them. + + * mm-uu.el (mm-uu-decode-function,mm-uu-binhex-decode-function): + Use them. 2001-12-12 Simon Josefsson - * nnvirtual.el (nnvirtual-always-rescan) + * nnvirtual.el (nnvirtual-always-rescan) (nnvirtual-component-regexp): Fix doc. * nnoo.el (defvoo): Add doc to defvoo variables. - * nnml.el (nnml-directory, nnml-active-file) - (nnml-newsgroups-file, nnml-get-new-mail, nnml-nov-is-evil) - (nnml-marks-is-evil, nnml-filenames-are-evil) + * nnml.el (nnml-directory, nnml-active-file) + (nnml-newsgroups-file, nnml-get-new-mail, nnml-nov-is-evil) + (nnml-marks-is-evil, nnml-filenames-are-evil) (nnml-prepare-save-mail-hook, nnml-inhibit-expiry): Fix doc. * nnmh.el (nnmh-directory, nnmh-get-new-mail) @@ -552,15 +1548,15 @@ (nnmh-possibly-change-directory): Use `nnheader-report' instead of `error'. - * nnmbox.el (nnmbox-mbox-file, nnmbox-active-file) - (nnmbox-get-new-mail, nnmbox-prepare-save-mail-hook): + * nnmbox.el (nnmbox-mbox-file, nnmbox-active-file) + (nnmbox-get-new-mail, nnmbox-prepare-save-mail-hook): - * nnfolder.el (nnfolder-directory, nnfolder-active-file) - (nnfolder-newsgroups-file, nnfolder-get-new-mail) - (nnfolder-save-buffer-hook, nnfolder-inhibit-expiry) + * nnfolder.el (nnfolder-directory, nnfolder-active-file) + (nnfolder-newsgroups-file, nnfolder-get-new-mail) + (nnfolder-save-buffer-hook, nnfolder-inhibit-expiry) (nnfolder-nov-is-evil, nnfolder-marks-is-evil): Fix doc. - * nnbabyl.el (nnbabyl-mbox-file, nnbabyl-active-file) + * nnbabyl.el (nnbabyl-mbox-file, nnbabyl-active-file) (nnbabyl-get-new-mail, nnbabyl-prepare-save-mail-hook): Fix doc. * imap.el, nnimap.el: Fix indentation. @@ -632,7 +1628,7 @@ 2001-12-07 01:00:00 ShengHuo ZHU - * gnus-sum.el (gnus-summary-print-truncate-and-quote): New. + * gnus-sum.el (gnus-summary-print-truncate-and-quote): New function. (gnus-summary-print-article): Use it. * gnus-util.el (gnus-replace-in-string): Typo. @@ -686,7 +1682,7 @@ 2001-12-03 09:00:00 ShengHuo ZHU - * mm-url.el: New. + * mm-url.el: New file. * nnslashdot.el: Use it. * mm-extern.el (mm-extern-url): Use it. @@ -848,8 +1844,8 @@ 2001-11-20 09:00:00 ShengHuo ZHU - * mm-util.el (mm-coding-system-priorities): New. - (mm-sort-coding-systems-predicate): New. + * mm-util.el (mm-coding-system-priorities): New variable. + (mm-sort-coding-systems-predicate): New function. (mm-find-mime-charset-region): Resort coding systems if needed. Suggested by Katsumi Yamaoka . @@ -1189,7 +2185,7 @@ not-subscribed -> subscribed. 2001-10-31 08:00:00 ShengHuo ZHU - From: Josh Huber + From: Josh Huber * message.el (message-subscribed-address-functions): New variable. (message-subscribed-addresses): New variable. @@ -1198,7 +2194,7 @@ (message-send-mail): Add Mail-Followup-To. (message-make-mft): New function. - * gnus.el (gnus-find-subscribed-addresses): New. + * gnus.el (gnus-find-subscribed-addresses): New function. 2001-10-31 07:00:00 ShengHuo ZHU @@ -1218,7 +2214,7 @@ mm-coding-system-p. Don't correct it only in XEmacs. (mm-charset-to-coding-system): Use mm-coding-system-p and mm-get-coding-system-list. - (mm-emacs-mule, mm-mule4-p): New. + (mm-emacs-mule, mm-mule4-p): New variables. (mm-enable-multibyte, mm-disable-multibyte, mm-enable-multibyte-mule4, mm-disable-multibyte-mule4, mm-with-unibyte-current-buffer, @@ -1285,8 +2281,8 @@ message-news-p, which widens the buffer. (message-forward-make-body): New function. (message-forward): Use it. - (message-insinuate-rmail): New. - (message-forward-rmail-make-body): New. + (message-insinuate-rmail): New function. + (message-forward-rmail-make-body): New function. 2001-10-30 02:00:00 ShengHuo ZHU @@ -2280,7 +3276,7 @@ * nnslashdot.el (nnslashdot-retrieve-headers-1): Replace nnslashdot-*-retrieve-headers. (nnslashdot-request-article): Fix for slashcode 2.2. - (nnslashdot-make-tuple): New. + (nnslashdot-make-tuple): New function. (nnslashdot-read-groups): Use it. 2001-08-20 01:34:03 Lars Magne Ingebrigtsen @@ -2385,7 +3381,7 @@ * gnus.el (gnus-expand-group-parameters): Fix. - * gnus-spec.el (gnus-char-width): New. + * gnus-spec.el (gnus-char-width): New function. (gnus-correct-substring, gnus-correct-length): Use it. * message.el (message-required-mail-headers): Fix doc. @@ -2435,7 +3431,7 @@ * gnus.el (gnus-info-find-node): Take an argument. - * gnus-art.el (gnus-button-handle-info): New. + * gnus-art.el (gnus-button-handle-info): New function. (gnus-url-unhex-string): Replace "+" with " ". 2001-08-17 21:00:00 ShengHuo ZHU @@ -2474,7 +3470,7 @@ 2001-08-17 14:00:00 ShengHuo ZHU * smime.el (smime-point-at-eol): eval-and-compile. - (smime-make-temp-file): New. + (smime-make-temp-file): New function. (smime-sign-region, smime-encrypt-region, smime-decrypt-region): Use it. @@ -2585,12 +3581,12 @@ 2001-08-10 21:00:00 ShengHuo ZHU * nndoc.el (nndoc-article-type): Fix doc. - (nndoc-generate-article-function): New. - (nndoc-dissection-function): New. + (nndoc-generate-article-function): New variable. + (nndoc-dissection-function): New variable. (nndoc-type-alist): Add oe-dbx. - (nndoc-oe-dbx-type-p): New. - (nndoc-oe-dbx-dissection): New. - (nndoc-oe-dbx-generate-article): New. + (nndoc-oe-dbx-type-p): New function. + (nndoc-oe-dbx-dissection): New function. + (nndoc-oe-dbx-generate-article): New function. 2001-08-11 Kai Gro,A_(Bjohann @@ -2609,7 +3605,7 @@ 2001-08-10 01:00:00 ShengHuo ZHU - * message.el (message-bogus-system-names): New. + * message.el (message-bogus-system-names): New variable. (message-make-fqdn): Use it. 2001-08-09 15:00:00 ShengHuo ZHU @@ -2822,7 +3818,7 @@ 2001-07-31 17:00:00 ShengHuo ZHU Originally from Pavel Jan,Bm(Bk - * gnus-agent.el (gnus-agent-make-mode-line-string): New. + * gnus-agent.el (gnus-agent-make-mode-line-string): New function. (gnus-agent-toggle-plugged): Use it. 2001-07-31 ShengHuo ZHU @@ -2840,8 +3836,8 @@ 2001-07-30 15:00:00 ShengHuo ZHU Originally from Andreas Fuchs - * mml2015.el (mml2015-trust-boundaries-alist) - (mml2015-gpg-pretty-print-fpr): New. + * mml2015.el (mml2015-trust-boundaries-alist): New variable. + (mml2015-gpg-pretty-print-fpr): New function. (mml2015-gpg-extract-signature-details): More details, rename from `m-g-e-from'. (mml2015-gpg-verify): Use them. @@ -2948,12 +3944,12 @@ 2001-07-27 23:00:00 ShengHuo ZHU - * mm-decode.el (mm-image-type-from-buffer): New. + * mm-decode.el (mm-image-type-from-buffer): New function. (mm-get-image): Use it. 2001-07-27 18:00:00 ShengHuo ZHU - * gnus.el (gnus-large-newsgroup): If it is nil, ... + * gnus.el (gnus-large-newsgroup): Add doc, "If it is nil, ..." * gnus-art.el (gnus-mime-view-all-parts): buffer-read-only covers mm-display-parts too. @@ -2974,9 +3970,9 @@ 2001-07-27 07:00:00 ShengHuo ZHU - * mml.el (mml-tweak-type-alist): New. - (mml-tweak-function-alist): New. - (mml-tweak-part): New. + * mml.el (mml-tweak-type-alist): New variable. + (mml-tweak-function-alist): New variable. + (mml-tweak-part): New function. (mml-generate-mime-1): Use it. 2001-07-26 22:00:00 ShengHuo ZHU @@ -3007,7 +4003,7 @@ 2001-07-26 14:00:00 ShengHuo ZHU - * mm-decode.el (mm-readable-p): New. + * mm-decode.el (mm-readable-p): New function. (mm-inline-media-tests): Fix the default testers. 2001-07-26 Simon Josefsson @@ -3050,8 +4046,8 @@ 2001-07-25 11:00:00 ShengHuo ZHU - * gnus-util.el (gnus-byte-compile): New. - (gnus-use-byte-compile): New. + * gnus-util.el (gnus-byte-compile): New function. + (gnus-use-byte-compile): New variable. (gnus-make-sort-function): Use it. * nnmail.el (nnmail-get-new-mail): Use it. @@ -3089,7 +4085,7 @@ * message.el (message-bounce): If no Return-Path, the whole content is considered as the original message. - * nnml.el (nnml-check-directory-twice): New. + * nnml.el (nnml-check-directory-twice): New variable. (nnml-article-to-file): Use it. (nnml-retrieve-headers): Hack it. @@ -3120,13 +4116,13 @@ * gnus-sum.el (gnus-articles-to-read): Use gnus-group-decoded-name. - * mm-util.el (mm-string-as-multibyte): New. + * mm-util.el (mm-string-as-multibyte): New function. * nnmh.el (nnmh-request-list-1): Encode, not decode! 2001-07-23 18:00:00 ShengHuo ZHU - * mm-util.el (mm-universal-coding-system): New. + * mm-util.el (mm-universal-coding-system): New variable. * gnus-start.el (gnus-startup-file-coding-system): Use it. @@ -3218,8 +4214,8 @@ 2001-07-18 11:00:00 ShengHuo ZHU - * mml.el (mml-content-type-parameters): New. - (mml-content-disposition-parameters): New. + * mml.el (mml-content-type-parameters): New variable. + (mml-content-disposition-parameters): New variable. (mml-insert-mime-headers): Use them. (mml-parse-1): Accept charset. @@ -3297,8 +4293,8 @@ * gnus-msg.el (gnus-msg-treat-broken-reply-to): Add force. (gnus-summary-reply): Use it. - (gnus-summary-reply-broken-reply-to): New. - (gnus-msg-force-broken-reply-to): New. + (gnus-summary-reply-broken-reply-to): New function. + (gnus-msg-force-broken-reply-to): New function. * mm-view.el (mm-inline-text): Showing as text/plain when error. @@ -3696,7 +4692,7 @@ 2001-06-03 Dale Hagglund * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split - restrict clauses. + restrict clauses. 2001-06-07 16:00:00 ShengHuo ZHU @@ -3840,7 +4836,7 @@ * nnrss.el (nnrss-request-expire-articles): Correct the return value. * nnslashdot.el (nnslashdot-request-list): Add time. - (nnslashdot-request-expire-articles): New. + (nnslashdot-request-expire-articles): New function. * gnus-start.el (gnus-check-bogus-newsgroups): Remove bogus secondary methods too. @@ -4159,11 +5155,9 @@ 2001-03-21 Didier Verna - * gnus-start.el: * gnus-start.el (gnus-subscribe-newsgroup-hooks): New. * gnus-start.el (gnus-subscribe-newsgroup): use it. - 2001-03-15 09:47:23 Lars Magne Ingebrigtsen * nnultimate.el (nnultimate-retrieve-headers): Understand @@ -4347,7 +5341,7 @@ 2001-02-23 23:00:00 ShengHuo ZHU - * nnslashdot.el (nnslashdot-backslash-url): New. + * nnslashdot.el (nnslashdot-backslash-url): New variable. (nnslashdot-request-list): Use it. 2001-02-23 22:00:00 ShengHuo ZHU @@ -4356,9 +5350,9 @@ no file. * gnus-sum.el (gnus-summary-import-article): Display it. Enable edit. - (gnus-summary-create-article): New. + (gnus-summary-create-article): New function. - * gnus-group.el (gnus-group-mark-article-read): New. + * gnus-group.el (gnus-group-mark-article-read): New function. * gnus-msg.el (gnus-inews-do-gcc): Use it. @@ -4370,9 +5364,9 @@ gnus-article-edit-exit. (gnus-article-edit-exit): Confirm and insert original-article-buffer. - * gnus.el (gnus-parameters): New. + * gnus.el (gnus-parameters): New variable. Suggested by NAGY Andras . - (gnus-parameters-get-parameter): New. + (gnus-parameters-get-parameter): New function. (gnus-group-find-parameter): Use it. 2001-02-23 Simon Josefsson @@ -4392,11 +5386,11 @@ 2001-02-22 22:00:00 ShengHuo ZHU - * gnus-sum.el (gnus-fetch-headers): New. + * gnus-sum.el (gnus-fetch-headers): New function. (gnus-select-newsgroup): Use it. - (gnus-summary-insert-articles): New. - (gnus-summary-insert-old-articles): New. - (gnus-summary-insert-new-articles): New. + (gnus-summary-insert-articles): New function. + (gnus-summary-insert-old-articles): New function. + (gnus-summary-insert-new-articles): New function. * gnus-group.el (gnus-group-prepare-flat-list-dead): Use decoded-name. (gnus-group-list-active): Ditto. @@ -4418,8 +5412,8 @@ * gnus-msg.el (gnus-inews-do-gcc): Activate group anyway. * gnus-art.el (gnus-mime-display-multipart-alternative-as-mixed): - New. - (gnus-mime-display-multipart-related-as-mixed): New. + New variable. + (gnus-mime-display-multipart-related-as-mixed): New variable. (gnus-mime-display-part): Use them. 2001-02-20 16:00:00 ShengHuo ZHU @@ -4487,9 +5481,9 @@ * gnus-srvr.el (gnus-server-regenerate-server): Use gnus-get-function. - * nnagent.el (nnagent-request-regenerate): New. + * nnagent.el (nnagent-request-regenerate): New function. - * nnfolder.el (nnfolder-request-regenerate): Deffoo. + * nnfolder.el (nnfolder-request-regenerate): New deffoo. * nnml.el (nnml-generate-nov-databases): Accept argument server. Don't open server if it is opened. @@ -4532,9 +5526,9 @@ 2001-02-13 19:00:00 ShengHuo ZHU - * gnus-draft.el (gnus-draft-reminder): New. + * gnus-draft.el (gnus-draft-reminder): New function. - * gnus-art.el (gnus-sender-save-name): New. + * gnus-art.el (gnus-sender-save-name): New function. 2001-02-13 18:00:00 ShengHuo ZHU @@ -4549,7 +5543,7 @@ * gnus-topic.el (gnus-subscribe-topics): Return nil if not subscribe. - * gnus-start.el (gnus-call-subscribe-functions): New. + * gnus-start.el (gnus-call-subscribe-functions): New function. (gnus-find-new-newsgroups): Use it. (gnus-ask-server-for-new-groups): Use it. (gnus-check-first-time-used): Use it. @@ -4574,9 +5568,9 @@ * gnus-group.el (gnus-group-suspend): Offer save summaries. - * gnus-art.el (gnus-treat-leading-whitespace): New. + * gnus-art.el (gnus-treat-leading-whitespace): New variable. (gnus-treatment-function-alist): Use it. - (article-remove-leading-whitespace): New. + (article-remove-leading-whitespace): New function. (gnus-article-make-menu-bar): Use it. * gnus-sum.el (gnus-summary-wash-empty-map): Add @@ -4661,7 +5655,7 @@ 2001-02-06 21:00:00 ShengHuo ZHU - * gnus-group.el (gnus-group-listing-limit): New. + * gnus-group.el (gnus-group-listing-limit): New variable. (gnus-group-prepare-flat-list-dead): Use old trick to speed up. * gnus-topic.el (gnus-group-prepare-topics): Use gnus-killed-hashtb. @@ -4870,7 +5864,7 @@ 2001-01-20 09:00:00 ShengHuo ZHU - * mm-util.el (mm-string-as-unibyte): New. + * mm-util.el (mm-string-as-unibyte): New function. * message.el (message-forward): Use it. @@ -5356,7 +6350,7 @@ * message.el (message-tool-bar-map): Use it. - * Makefile.in (install-el): New. + * Makefile.in (install-el): New rule. 2000-12-21 Katsumi Yamaoka @@ -6765,7 +7759,7 @@ * mml2015.el (mml2015-function-alist): Clear verify and decrypt. * mm-uu.el: Reorganized. Add gnatsweb, pgp-signed, pgp-encrypted. - * mm-decode.el (mm-snarf-option): New. + * mm-decode.el (mm-snarf-option): New variable. 2000-11-04 13:08:02 ShengHuo ZHU diff --git a/lisp/Makefile.in b/lisp/Makefile.in index e6112f8..ca38edb 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -33,7 +33,7 @@ warn: clean-some gnus-load.el # The "clever" rule is unsafe, since redefined macros are loaded from # .elc files, and not the .el file. -clever some: gnus-load.el +clever some l: gnus-load.el @if test -f $(srcdir)/gnus.elc; then \ echo \ "checking whether the all elc files should be recompiled..."; \ diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 5ae684b..a8fa065 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -364,17 +364,16 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (byte-compile 'dgnushack-bind-colon-keywords) (dgnushack-bind-colon-keywords))) -(if (boundp 'MULE) - (progn - (setq :version ':version - :set-after ':set-after) - (require 'custom) - (defadvice custom-handle-keyword - (around dont-signal-an-error-even-if-unsupported-keyword-is-given - activate) - "Don't signal an error even if unsupported keyword is given." - (if (not (memq (ad-get-arg 1) '(:version :set-after))) - ad-do-it)))) +(when (boundp 'MULE) + (setq :version ':version + :set-after ':set-after) + (require 'custom) + (defadvice custom-handle-keyword + (around dont-signal-an-error-even-if-unsupported-keyword-is-given + activate) + "Don't signal an error even if unsupported keyword is given." + (if (not (memq (ad-get-arg 1) '(:version :set-after))) + ad-do-it))) (when (boundp 'MULE) (put 'custom-declare-face 'byte-optimizer @@ -419,7 +418,18 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (car (cdr args)))))) (setq args (cdr (cdr args)))) newform) - form)))) + form))) + + (defadvice byte-compile-inline-expand (around ignore-built-in-functions + (form) activate) + "Ignore built-in functions." + (let* ((name (car form)) + (fn (and (fboundp name) + (symbol-function name)))) + (if (subrp fn) + ;; Give up on inlining. + (setq ad-return-value form) + ad-do-it)))) ;; Unknown variables and functions. (unless (boundp 'buffer-file-coding-system) diff --git a/lisp/flow-fill.el b/lisp/flow-fill.el index bf9839d..dfe09c2 100644 --- a/lisp/flow-fill.el +++ b/lisp/flow-fill.el @@ -1,6 +1,6 @@ ;;; flow-fill.el --- interprete RFC2646 "flowed" text -;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: mail @@ -35,7 +35,7 @@ ;; paragraph and we let `fill-region' fill the long line into several ;; lines with the quote prefix as `fill-prefix'. -;; Todo: encoding, implement basic `fill-region' (Emacs and XEmacs +;; Todo: implement basic `fill-region' (Emacs and XEmacs ;; implementations differ..) ;;; History: @@ -46,11 +46,29 @@ ;; 2000-03-26 commited to gnus cvs ;; 2000-10-23 don't flow "-- " lines, make "quote-depth wins" rule ;; work when first line is at level 0. +;; 2002-01-12 probably incomplete encoding support ;;; Code: (eval-when-compile (require 'cl)) +(defcustom fill-flowed-display-column 'fill-column + "Column beyond which format=flowed lines are wrapped, when displayed. +This can be a lisp expression or an integer." + :type '(choice (const :tag "Standard `fill-column'" fill-column) + (const :tag "Fit Window" (- (window-width) 5)) + (sexp) + (integer))) + +(defcustom fill-flowed-encode-column 66 + "Column beyond which format=flowed lines are wrapped, in outgoing messages. +This can be a lisp expression or an integer. +RFC 2646 suggests 66 characters for readability." + :type '(choice (const :tag "Standard fill-column" fill-column) + (const :tag "RFC 2646 default (66)" 66) + (sexp) + (integer))) + (eval-and-compile (defalias 'fill-flowed-point-at-bol (if (fboundp 'point-at-bol) @@ -62,6 +80,27 @@ 'point-at-eol 'line-end-position))) +(defun fill-flowed-encode (&optional buffer) + (with-current-buffer (or buffer (current-buffer)) + ;; No point in doing this unless hard newlines is used. + (when use-hard-newlines + (let ((start (point-min)) end) + ;; Go through each paragraph, filling it and adding SPC + ;; as the last character on each line. + (while (setq end (text-property-any start (point-max) 'hard 't)) + (let ((fill-column (eval fill-flowed-encode-column))) + (fill-region start end t 'nosqueeze 'to-eop)) + (goto-char start) + ;; `fill-region' probably distorted end. + (setq end (text-property-any start (point-max) 'hard 't)) + (while (and (< (point) end) + (re-search-forward "$" (1- end) t)) + (insert " ") + (setq end (1+ end)) + (forward-char)) + (goto-char (setq start (1+ end))))) + t))) + (defun fill-flowed (&optional buffer) (save-excursion (set-buffer (or (current-buffer) buffer)) @@ -79,6 +118,7 @@ (beginning-of-line) (when (> (skip-chars-forward ">") 0) (insert " ")))) + ;; XXX slightly buggy handling of "-- " (while (and (save-excursion (ignore-errors (backward-char 3)) (setq sig (looking-at "-- ")) @@ -94,7 +134,8 @@ (backward-delete-char -1) (end-of-line)) (unless sig - (let ((fill-prefix (when quote (concat quote " ")))) + (let ((fill-prefix (when quote (concat quote " "))) + (fill-column (eval fill-flowed-display-column))) (fill-region (fill-flowed-point-at-bol) (min (1+ (fill-flowed-point-at-eol)) (point-max)) 'left 'nosqueeze)))))))) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index bdab1d6..eacc400 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -33,6 +33,7 @@ (require 'nnvirtual) (require 'gnus-sum) (require 'gnus-score) +(require 'gnus-srvr) (eval-when-compile (if (featurep 'xemacs) (require 'itimer) @@ -57,13 +58,20 @@ :group 'gnus-agent :type 'hook) +(defcustom gnus-agent-fetched-hook nil + "Hook run after finishing fetching articles." + :group 'gnus-agent + :type 'hook) + (defcustom gnus-agent-handle-level gnus-level-subscribed "Groups on levels higher than this variable will be ignored by the Agent." :group 'gnus-agent :type 'integer) (defcustom gnus-agent-expire-days 7 - "Read articles older than this will be expired." + "Read articles older than this will be expired. +This can also be a list of regexp/day pairs. The regexps will +be matched against group names." :group 'gnus-agent :type 'integer) @@ -123,13 +131,21 @@ If this is `ask' the hook will query the user." (const :tag "Ask" ask)) :group 'gnus-agent) +(defcustom gnus-agent-go-online 'ask + "Indicate if offline servers go online when you plug in. +If this is `ask' the hook will query the user." + :version "21.1" + :type '(choice (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "Ask" ask)) + :group 'gnus-agent) + ;;; Internal variables (defvar gnus-agent-history-buffers nil) (defvar gnus-agent-buffer-alist nil) (defvar gnus-agent-article-alist nil) (defvar gnus-agent-group-alist nil) -(defvar gnus-agent-covered-methods nil) (defvar gnus-category-alist nil) (defvar gnus-agent-current-history nil) (defvar gnus-agent-overview-buffer nil) @@ -274,7 +290,8 @@ If this is `ask' the hook will query the user." "JY" gnus-agent-synchronize-flags "JS" gnus-group-send-queue "Ja" gnus-agent-add-group - "Jr" gnus-agent-remove-group) + "Jr" gnus-agent-remove-group + "Jo" gnus-agent-toggle-group-plugged) (defun gnus-agent-group-make-menu-bar () (unless (boundp 'gnus-agent-group-menu) @@ -282,6 +299,7 @@ If this is `ask' the hook will query the user." gnus-agent-group-menu gnus-agent-group-mode-map "" '("Agent" ["Toggle plugged" gnus-agent-toggle-plugged t] + ["Toggle group plugged" gnus-agent-toggle-group-plugged t] ["List categories" gnus-enter-category-buffer t] ["Send queue" gnus-group-send-queue gnus-plugged] ("Fetch" @@ -337,12 +355,13 @@ If this is `ask' the hook will query the user." (if plugged (progn (setq gnus-plugged plugged) - (gnus-agent-possibly-synchronize-flags) (gnus-run-hooks 'gnus-agent-plugged-hook) (setcar (cdr gnus-agent-mode-status) (gnus-agent-make-mode-line-string " Plugged" 'mouse-2 - 'gnus-agent-toggle-plugged))) + 'gnus-agent-toggle-plugged)) + (gnus-agent-go-online gnus-agent-go-online) + (gnus-agent-possibly-synchronize-flags)) (gnus-agent-close-connections) (setq gnus-plugged plugged) (gnus-run-hooks 'gnus-agent-unplugged-hook) @@ -673,7 +692,7 @@ the actual number of articles toggled is returned." (defun gnus-agent-get-undownloaded-list () "Mark all unfetched articles as read." (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))) - (when (and (not gnus-plugged) + (when (and (not (gnus-online gnus-command-method)) (gnus-agent-method-p gnus-command-method)) (gnus-agent-load-alist gnus-newsgroup-name) ;; First mark all undownloaded articles as undownloaded. @@ -763,9 +782,10 @@ the actual number of articles toggled is returned." (set (intern (symbol-name sym) orig) (symbol-value sym))))) new)) (gnus-make-directory (file-name-directory file)) - ;; The hashtable contains real names of groups, no more prefix - ;; removing, so set `full' to `t'. - (gnus-write-active-file file orig t))) + (let ((nnmail-active-file-coding-system gnus-agent-file-coding-system)) + ;; The hashtable contains real names of groups, no more prefix + ;; removing, so set `full' to `t'. + (gnus-write-active-file file orig t)))) (defun gnus-agent-save-groups (method) (gnus-agent-save-active-1 method 'gnus-groups-to-gnus-format)) @@ -812,17 +832,11 @@ the actual number of articles toggled is returned." -(defun gnus-agent-method-p (method) - "Say whether METHOD is covered by the agent." - (member method gnus-agent-covered-methods)) - (defun gnus-agent-get-function (method) - (if (and (not gnus-plugged) - (gnus-agent-method-p method)) - (progn - (require 'nnagent) - 'nnagent) - (car method))) + (if (gnus-online method) + (car method) + (require 'nnagent) + 'nnagent)) ;;; History functions @@ -1014,7 +1028,7 @@ the actual number of articles toggled is returned." (len (length articles)) (gnus-decode-encoded-word-function 'identity) (file (gnus-agent-article-name ".overview" group)) - i) + i gnus-agent-cache) ;; Check the number of articles is not too large. (when (and (integerp gnus-agent-large-newsgroup) (< 0 gnus-agent-large-newsgroup)) @@ -1057,14 +1071,15 @@ the actual number of articles toggled is returned." (defsubst gnus-agent-copy-nov-line (article) (let (b e) (set-buffer gnus-agent-overview-buffer) - (setq b (point)) - (if (eq article (read (current-buffer))) - (setq e (progn (forward-line 1) (point))) - (progn - (beginning-of-line) - (setq e b))) - (set-buffer nntp-server-buffer) - (insert-buffer-substring gnus-agent-overview-buffer b e))) + (unless (eobp) + (setq b (point)) + (if (eq article (read (current-buffer))) + (setq e (progn (forward-line 1) (point))) + (progn + (beginning-of-line) + (setq e b))) + (set-buffer nntp-server-buffer) + (insert-buffer-substring gnus-agent-overview-buffer b e)))) (defun gnus-agent-braid-nov (group articles file) (set-buffer gnus-agent-overview-buffer) @@ -1095,11 +1110,16 @@ the actual number of articles toggled is returned." (unless (eobp) (gnus-agent-copy-nov-line (car articles)) (setq articles (cdr articles)))) + (set-buffer nntp-server-buffer) (when articles (let (b e) (set-buffer gnus-agent-overview-buffer) (setq b (point) e (point-max)) + (while (and (not (eobp)) + (<= (read (current-buffer)) (car articles))) + (forward-line 1) + (setq b (point))) (set-buffer nntp-server-buffer) (insert-buffer-substring gnus-agent-overview-buffer b e))))) @@ -1115,15 +1135,17 @@ the actual number of articles toggled is returned." "Save the article-state alist for GROUP." (let ((file-name-coding-system nnmail-pathname-coding-system) (pathname-coding-system nnmail-pathname-coding-system) - print-level print-length) + print-level print-length item) + (dolist (art articles) + (if (setq item (memq art gnus-agent-article-alist)) + (setcdr item state) + (push (cons art state) gnus-agent-article-alist))) + (setq gnus-agent-article-alist + (sort gnus-agent-article-alist 'car-less-than-car)) (with-temp-file (if dir (expand-file-name ".agentview" dir) (gnus-agent-article-name ".agentview" group)) - (princ (setq gnus-agent-article-alist - (nconc gnus-agent-article-alist - (mapcar (lambda (article) (cons article state)) - articles))) - (current-buffer)) + (princ gnus-agent-article-alist (current-buffer)) (insert "\n")))) (defun gnus-agent-article-name (article group) @@ -1155,8 +1177,9 @@ the actual number of articles toggled is returned." (condition-case err (progn (setq gnus-command-method (car methods)) - (when (or (gnus-server-opened gnus-command-method) - (gnus-open-server gnus-command-method)) + (when (and (or (gnus-server-opened gnus-command-method) + (gnus-open-server gnus-command-method)) + (gnus-online gnus-command-method)) (setq groups (gnus-groups-from-server (car methods))) (gnus-agent-with-fetch (while (setq group (pop groups)) @@ -1172,6 +1195,7 @@ the actual number of articles toggled is returned." err)) (signal 'quit "Cannot fetch articles into the Gnus agent")))) (pop methods)) + (run-hooks 'gnus-agent-fetch-hook) (gnus-message 6 "Finished fetching articles into the Gnus agent")))) (defun gnus-agent-fetch-group-1 (group method) @@ -1259,7 +1283,14 @@ the actual number of articles toggled is returned." "Hook run in `gnus-category-mode' buffers.") (defvar gnus-category-line-format " %(%20c%): %g\n" - "Format of category lines.") + "Format of category lines. + +Valid specifiers include: +%c Topic name (string) +%g The number of groups in the topic (integer) + +General format specifiers can also be used. See +(gnus)Formatting Variables.") (defvar gnus-category-mode-line-format "Gnus: %%b" "The format specification for the category mode line.") @@ -1394,7 +1425,7 @@ The following commands are available: (gnus-category-position-point))) (defun gnus-category-name () - (or (get-text-property (gnus-point-at-bol) 'gnus-category) + (or (intern (get-text-property (gnus-point-at-bol) 'gnus-category)) (error "No category on the current line"))) (defun gnus-category-read () @@ -1587,10 +1618,13 @@ The following commands are available: "Expire all old articles." (interactive) (let ((methods gnus-agent-covered-methods) - (day (- (time-to-days (current-time)) gnus-agent-expire-days)) + (day (if (numberp gnus-agent-expire-days) + (- (time-to-days (current-time)) gnus-agent-expire-days) + nil)) + (current-day (time-to-days (current-time))) gnus-command-method sym group articles history overview file histories elem art nov-file low info - unreads marked article orig lowest highest) + unreads marked article orig lowest highest found days) (save-excursion (setq overview (gnus-get-buffer-create " *expire overview*")) (while (setq gnus-command-method (pop methods)) @@ -1614,7 +1648,19 @@ The following commands are available: (skip-chars-forward "^\t") (if (let ((fetch-date (read (current-buffer)))) (if (numberp fetch-date) - (> fetch-date day) + ;; We now have the arrival day, so we see + ;; whether it's old enough to be expired. + (if (numberp day) + (> fetch-date day) + (skip-chars-forward "\t") + (setq found nil + days gnus-agent-expire-days) + (while (and (not found) + days) + (when (looking-at (caar days)) + (setq found (cadar days))) + (pop days)) + (> fetch-date (- current-day found))) ;; History file is corrupted. (gnus-message 5 @@ -1733,9 +1779,10 @@ The following commands are available: (gnus-range-add (nth 2 info) (cons 1 (- (caar gnus-agent-article-alist) 1))))) - ;; Maybe everything has been expired from `gnus-article-alist' - ;; and so the above marking as read could not be conducted, - ;; or there are expired article within the range of the alist. + ;; Maybe everything has been expired from + ;; `gnus-article-alist' and so the above marking as + ;; read could not be conducted, or there are + ;; expired article within the range of the alist. (when (and info expired (or (not (caar gnus-agent-article-alist)) @@ -1770,8 +1817,309 @@ The following commands are available: (let ((init-file-user "") (gnus-always-read-dribble-file t)) (gnus)) - (gnus-group-send-queue) - (gnus-agent-fetch-session)) + (let ((gnus-agent-confirmation-function 'gnus-agent-batch-confirmation)) + (gnus-group-send-queue) + (gnus-agent-fetch-session))) + +(defun gnus-agent-retrieve-headers (articles group &optional fetch-old) + (save-excursion + (gnus-agent-create-buffer) + (let ((gnus-decode-encoded-word-function 'identity) + (file (gnus-agent-article-name ".overview" group)) + cached-articles uncached-articles) + (gnus-make-directory (nnheader-translate-file-chars + (file-name-directory file) t)) + (when (file-exists-p file) + (with-current-buffer gnus-agent-overview-buffer + (erase-buffer) + (let ((nnheader-file-coding-system + gnus-agent-file-coding-system)) + (nnheader-insert-file-contents file)) + (goto-char (point-min)) + (while (not (eobp)) + (when (looking-at "[0-9]") + (push (read (current-buffer)) cached-articles)) + (forward-line 1)) + (setq cached-articles (sort cached-articles '<)))) + (if (setq uncached-articles + (gnus-set-difference articles cached-articles)) + (progn + (set-buffer nntp-server-buffer) + (erase-buffer) + (let (gnus-agent-cache) + (unless (eq 'nov + (gnus-retrieve-headers + uncached-articles group fetch-old)) + (nnvirtual-convert-headers))) + (set-buffer gnus-agent-overview-buffer) + (erase-buffer) + (set-buffer nntp-server-buffer) + (copy-to-buffer gnus-agent-overview-buffer (point-min) (point-max)) + (when (and uncached-articles (file-exists-p file)) + (gnus-agent-braid-nov group uncached-articles file)) + (set-buffer nntp-server-buffer) + (write-region-as-coding-system gnus-agent-file-coding-system + (point-min) (point-max) + file nil 'silent) + (gnus-agent-load-alist group) + (gnus-agent-save-alist group uncached-articles nil) + (gnus-agent-open-history) + (setq gnus-agent-current-history (gnus-agent-history-buffer)) + (gnus-agent-enter-history + "last-header-fetched-for-session" + (list (cons group (nth (- (length articles) 1) articles))) + (time-to-days (current-time))) + (gnus-agent-save-history)) + (set-buffer nntp-server-buffer) + (erase-buffer) + (insert-buffer-substring gnus-agent-overview-buffer))) + (if (and fetch-old + (not (numberp fetch-old))) + t ; Don't remove anything. + (nnheader-nov-delete-outside-range + (if fetch-old (max 1 (- (car articles) fetch-old)) + (car articles)) + (car (last articles))) + t) + 'nov)) + +(defun gnus-agent-request-article (article group) + "Retrieve ARTICLE in GROUP from the agent cache." + (let* ((gnus-command-method (gnus-find-method-for-group group)) + (file (concat + (gnus-agent-directory) + (gnus-agent-group-path group) "/" + (number-to-string article))) + (buffer-read-only nil)) + (when (file-exists-p file) + (erase-buffer) + (gnus-kill-all-overlays) + (insert-file-contents-as-coding-system gnus-cache-coding-system file) + t))) + +(defun gnus-agent-regenerate-group (group &optional clean) + "Regenerate GROUP." + (let ((dir (concat (gnus-agent-directory) + (gnus-agent-group-path group) "/")) + (file (gnus-agent-article-name ".overview" group)) + n point arts alist header new-alist changed) + (when (file-exists-p dir) + (setq arts + (sort (mapcar (lambda (name) (string-to-int name)) + (directory-files dir nil "^[0-9]+$" t)) + '<))) + (gnus-make-directory (nnheader-translate-file-chars + (file-name-directory file) t)) + (mm-with-unibyte-buffer + (if (file-exists-p file) + (let ((nnheader-file-coding-system + gnus-agent-file-coding-system)) + (nnheader-insert-file-contents file))) + (goto-char (point-min)) + (while (not (eobp)) + (while (not (or (eobp) (looking-at "[0-9]"))) + (setq point (point)) + (forward-line 1) + (delete-region point (point))) + (unless (eobp) + (setq n (read (current-buffer))) + (when (and arts (> n (car arts))) + (beginning-of-line) + (while (and arts (> n (car arts))) + (message "Regenerating NOV %s %d..." group (car arts)) + (mm-with-unibyte-buffer + (nnheader-insert-file-contents + (concat dir (number-to-string (car arts)))) + (goto-char (point-min)) + (if (search-forward "\n\n" nil t) + (delete-region (point) (point-max)) + (goto-char (point-max))) + (setq header (nnheader-parse-head t))) + (mail-header-set-number header (car arts)) + (nnheader-insert-nov header) + (setq changed t) + (push (cons (car arts) t) alist) + (pop arts))) + (if (and arts (= n (car arts))) + (progn + (push (cons n t) alist) + (pop arts)) + (push (cons n nil) alist)) + (forward-line 1))) + (if changed + (write-region-as-coding-system gnus-agent-file-coding-system + (point-min) (point-max) + file nil 'silent))) + (setq gnus-agent-article-alist nil) + (unless clean + (gnus-agent-load-alist group)) + (setq alist (sort alist 'car-less-than-car)) + (setq gnus-agent-article-alist (sort gnus-agent-article-alist + 'car-less-than-car)) + (while (and alist gnus-agent-article-alist) + (cond + ((< (caar alist) (caar gnus-agent-article-alist)) + (push (pop alist) new-alist)) + ((> (caar alist) (caar gnus-agent-article-alist)) + (push (list (car (pop gnus-agent-article-alist))) new-alist)) + (t + (pop gnus-agent-article-alist) + (while (and gnus-agent-article-alist + (= (caar alist) (caar gnus-agent-article-alist))) + (pop gnus-agent-article-alist)) + (push (pop alist) new-alist)))) + (while alist + (push (pop alist) new-alist)) + (while gnus-agent-article-alist + (push (list (car (pop gnus-agent-article-alist))) new-alist)) + (setq gnus-agent-article-alist (nreverse new-alist)) + (gnus-agent-save-alist group))) + +(defun gnus-agent-regenerate-history (group article) + (let ((file (concat (gnus-agent-directory) + (gnus-agent-group-path group) "/" + (number-to-string article))) id) + (mm-with-unibyte-buffer + (nnheader-insert-file-contents file) + (message-narrow-to-head) + (goto-char (point-min)) + (if (not (re-search-forward "^Message-ID: *<\\([^>\n]+\\)>" nil t)) + (setq id "No-Message-ID-in-article") + (setq id (buffer-substring (match-beginning 1) (match-end 1)))) + (gnus-agent-enter-history + id (list (cons group article)) + (time-to-days (nth 5 (file-attributes file))))))) + +;;;###autoload +(defun gnus-agent-regenerate (&optional clean) + "Regenerate all agent covered files. +If CLEAN, don't read existing active and agentview files." + (interactive "P") + (message "Regenerating Gnus agent files...") + (dolist (gnus-command-method gnus-agent-covered-methods) + (let ((active-file (gnus-agent-lib-file "active")) + history-hashtb active-hashtb active-changed + history-changed point) + (gnus-make-directory (file-name-directory active-file)) + (if clean + (setq active-hashtb (gnus-make-hashtable 1000)) + (mm-with-unibyte-buffer + (if (file-exists-p active-file) + (let ((nnheader-file-coding-system + gnus-agent-file-coding-system)) + (nnheader-insert-file-contents active-file)) + (setq active-changed t)) + (gnus-active-to-gnus-format + nil (setq active-hashtb + (gnus-make-hashtable + (count-lines (point-min) (point-max))))))) + (gnus-agent-open-history) + (setq history-hashtb (gnus-make-hashtable 1000)) + (with-current-buffer + (setq gnus-agent-current-history (gnus-agent-history-buffer)) + (goto-char (point-min)) + (forward-line 1) + (while (not (eobp)) + (if (looking-at + "\\([^\t\n]+\\)\t[0-9]+\t\\([^ \n]+\\) \\([0-9]+\\)") + (progn + (unless (string= (match-string 1) + "last-header-fetched-for-session") + (gnus-sethash (match-string 2) + (cons (string-to-number (match-string 3)) + (gnus-gethash-safe (match-string 2) + history-hashtb)) + history-hashtb)) + (forward-line 1)) + (setq point (point)) + (forward-line 1) + (delete-region point (point)) + (setq history-changed t)))) + (dolist (group (gnus-groups-from-server gnus-command-method)) + (gnus-agent-regenerate-group group clean) + (let ((min (or (caar gnus-agent-article-alist) 1)) + (max (or (caar (last gnus-agent-article-alist)) 0)) + (active (gnus-gethash-safe (gnus-group-real-name group) + active-hashtb))) + (if (not active) + (progn + (setq active (cons min max) + active-changed t) + (gnus-sethash group active active-hashtb)) + (when (> (car active) min) + (setcar active min) + (setq active-changed t)) + (when (< (cdr active) max) + (setcdr active max) + (setq active-changed t)))) + (let ((arts (sort (gnus-gethash-safe group history-hashtb) '<)) + n) + (gnus-sethash group arts history-hashtb) + (while (and arts gnus-agent-article-alist) + (cond + ((> (car arts) (caar gnus-agent-article-alist)) + (when (cdar gnus-agent-article-alist) + (gnus-agent-regenerate-history + group (caar gnus-agent-article-alist)) + (setq history-changed t)) + (setq n (car (pop gnus-agent-article-alist))) + (while (and gnus-agent-article-alist + (= n (caar gnus-agent-article-alist))) + (pop gnus-agent-article-alist))) + ((< (car arts) (caar gnus-agent-article-alist)) + (setq n (pop arts)) + (while (and arts (= n (car arts))) + (pop arts))) + (t + (setq n (car (pop gnus-agent-article-alist))) + (while (and gnus-agent-article-alist + (= n (caar gnus-agent-article-alist))) + (pop gnus-agent-article-alist)) + (setq n (pop arts)) + (while (and arts (= n (car arts))) + (pop arts))))) + (while gnus-agent-article-alist + (when (cdar gnus-agent-article-alist) + (gnus-agent-regenerate-history + group (caar gnus-agent-article-alist)) + (setq history-changed t)) + (pop gnus-agent-article-alist)))) + (when history-changed + (message "Regenerate the history file of %s:%s" + (car gnus-command-method) + (cadr gnus-command-method)) + (gnus-agent-save-history)) + (gnus-agent-close-history) + (when active-changed + (message "Regenerate %s" active-file) + (let ((nnmail-active-file-coding-system gnus-agent-file-coding-system)) + (gnus-write-active-file active-file active-hashtb))))) + (message "Regenerating Gnus agent files...done")) + +(defun gnus-agent-go-online (&optional force) + "Switch servers into online status." + (interactive (list t)) + (dolist (server gnus-opened-servers) + (when (eq (nth 1 server) 'offline) + (if (if (eq force 'ask) + (gnus-y-or-n-p + (format "Switch %s:%s into online status? " + (caar server) (cadar server))) + force) + (setcar (nthcdr 1 server) 'close))))) + +(defun gnus-agent-toggle-group-plugged (group) + "Toggle the status of the server of the current group." + (interactive (list (gnus-group-group-name))) + (let* ((method (gnus-find-method-for-group group)) + (status (cadr (assoc method gnus-opened-servers)))) + (if (eq status 'offline) + (gnus-server-set-status method 'closed) + (gnus-close-server method) + (gnus-server-set-status method 'offline)) + (message "Turn %s:%s from %s to %s." (car method) (cadr method) + (if (eq status 'offline) 'offline 'online) + (if (eq status 'offline) 'online 'offline)))) (provide 'gnus-agent) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 93e20ad..b5ca7d8 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -121,7 +121,7 @@ "^X-UIDL:" "^MIME-Version:" "^Return-Path:" "^In-Reply-To:" "^Content-Type:" "^Content-Transfer-Encoding:" "^X-WebTV-Signature:" "^X-MimeOLE:" "^X-MSMail-Priority:" "^X-Priority:" "^X-Loop:" - "^X-Authentication-Warning:" "^X-MIME-Autoconverted:" "^X-Face:" + "^X-Authentication-Warning:" "^X-MIME-Autoconverted:" "^X-Face" "^X-Attribution:" "^X-Originating-IP:" "^Delivered-To:" "^NNTP-[-A-Za-z]+:" "^Distribution:" "^X-no-archive:" "^X-Trace:" "^X-Complaints-To:" "^X-NNTP-Posting-Host:" "^X-Orig.*:" @@ -151,7 +151,8 @@ "^X-Content-length:" "^X-Posting-Agent:" "^Original-Received:" "^X-Request-PGP:" "^X-Fingerprint:" "^X-WRIEnvto:" "^X-WRIEnvfrom:" "^X-Virus-Scanned:" "^X-Delivery-Agent:" "^Posted-Date:" "^X-Gateway:" - "^X-Local-Origin:" "^X-Local-Destination:" "^X-UserInfo1:") + "^X-Local-Origin:" "^X-Local-Destination:" "^X-UserInfo1:" + "^X-Received-Date:") "*All headers that start with this regexp will be hidden. This variable can also be a list of regexps of headers to be ignored. If `gnus-visible-headers' is non-nil, this variable will be ignored." @@ -238,19 +239,17 @@ regexp. If it matches, the text in question is not a signature." (cond ((featurep 'xemacs) (if (or (gnus-image-type-available-p 'xface) - (gnus-image-type-available-p 'xpm)) - 'gnus-xmas-article-display-xface + (gnus-image-type-available-p 'pbm)) + 'gnus-display-x-face-in-from "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | ee -")) ((and (fboundp 'image-type-available-p) (module-installed-p 'x-face-e21)) 'x-face-decode-message-header) - ((gnus-image-type-available-p 'xbm) - 'gnus-article-display-xface) + ((gnus-image-type-available-p 'pbm) + 'gnus-display-x-face-in-from) ((and window-system (module-installed-p 'x-face-mule)) 'x-face-mule-gnus-article-display-x-face) - (gnus-article-compface-xbm - "{ echo '/* Width=48, Height=48 */'; uncompface; } | display -") (t "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | \ display -")) @@ -266,10 +265,9 @@ asynchronously. The compressed face will be piped to this command." (delq nil (list 'string - (if (and (featurep 'xemacs) - (or (featurep 'xface) - (featurep 'xpm))) - '(function-item gnus-xmas-article-display-xface)) + (if (or (gnus-image-type-available-p 'xface) + (gnus-image-type-available-p 'pbm)) + '(function-item gnus-display-x-face-in-from)) (if (and x-face-e21 (fboundp 'image-type-available-p)) '(function-item @@ -318,23 +316,23 @@ directly.") (defcustom gnus-emphasis-alist (let ((format - "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)") + "\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\([-,.;:\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)") (types - '(("_" "_" underline) + '(("\\*" "\\*" bold) + ("_" "_" underline) ("/" "/" italic) - ("\\*" "\\*" bold) ("_/" "/_" underline-italic) ("_\\*" "\\*_" underline-bold) ("\\*/" "/\\*" bold-italic) ("_\\*/" "/\\*_" underline-bold-italic)))) - `(("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" - 2 3 gnus-emphasis-underline) - ,@(mapcar + `(,@(mapcar (lambda (spec) (list (format format (car spec) (car (cdr spec))) 2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) - types))) + types) + ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" + 2 3 gnus-emphasis-underline))) "*Alist that says how to fontify certain phrases. Each item looks like this: @@ -747,6 +745,29 @@ To see e.g. security buttons you could set this to :group 'gnus-article-mime :type '(repeat regexp)) +(defcustom gnus-body-boundary-delimiter "_" + "String used to delimit header and body. +This variable is used by `gnus-article-treat-body-boundary' which can +be controlled by `gnus-treat-body-boundary'." + :group 'gnus-article-various + :type '(choice (item :tag "None" :value nil) + string)) + +(defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces") + "*Defines the location of the faces database. +For information on obtaining this database of pretty pictures, please +see http://www.cs.indiana.edu/picons/ftp/index.html" + :type 'directory + :group 'gnus-picon) + +(defun gnus-picons-installed-p () + "Say whether picons are installed on your machine." + (let ((installed nil)) + (dolist (database gnus-picon-databases) + (when (file-exists-p database) + (setq installed t))) + installed)) + (defcustom gnus-article-mime-part-function nil "Function called with a MIME handle as the argument. This is meant for people who want to do something automatic based @@ -855,7 +876,7 @@ See Info node `(gnus)Customizing Articles'." (defcustom gnus-treat-buttonize 100000 "Add buttons. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles'." :group 'gnus-article-treat :type gnus-article-treat-custom) (put 'gnus-treat-buttonize 'highlight t) @@ -863,7 +884,7 @@ See the manual for details." (defcustom gnus-treat-buttonize-head 'head "Add buttons to the head. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (put 'gnus-treat-buttonize-head 'highlight t) @@ -875,7 +896,7 @@ See the manual for details." 50000) "Emphasize text. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (put 'gnus-treat-emphasize 'highlight t) @@ -883,63 +904,63 @@ See the manual for details." (defcustom gnus-treat-strip-cr nil "Remove carriage returns. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-leading-whitespace nil "Remove leading whitespace in headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-hide-headers 'head "Hide headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-hide-boring-headers nil "Hide boring headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-hide-signature nil "Hide the signature. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-fill-article nil "Fill the article. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-hide-citation nil "Hide cited text. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-hide-citation-maybe nil "Hide cited text. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-strip-list-identifiers 'head "Strip list identifiers from `gnus-list-identifiers`. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -947,14 +968,14 @@ See the manual for details." (defcustom gnus-treat-strip-pgp t "Strip PGP signatures. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-strip-pem nil "Strip PEM signatures. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -962,14 +983,14 @@ See the manual for details." "Strip banners from articles. The banner to be stripped is specified in the `banner' group parameter. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-highlight-headers 'head "Highlight the headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (put 'gnus-treat-highlight-headers 'highlight t) @@ -977,7 +998,7 @@ See the manual for details." (defcustom gnus-treat-highlight-citation t "Highlight cited text. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (put 'gnus-treat-highlight-citation 'highlight t) @@ -985,42 +1006,42 @@ See the manual for details." (defcustom gnus-treat-date-ut nil "Display the Date in UT (GMT). Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-date-local nil "Display the Date in the local timezone. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-date-english nil "Display the Date in a format that can be read aloud in English. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-date-lapsed nil "Display the Date header in a way that says how much time has elapsed. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-date-original nil "Display the date in the original timezone. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-date-iso8601 nil "Display the date in the ISO8601 format. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-head-custom) @@ -1029,14 +1050,14 @@ See the manual for details." "Display the date in a user-defined format. The format is defined by the `gnus-article-time-format' variable. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (defcustom gnus-treat-strip-headers-in-body t "Strip the X-No-Archive header line from the beginning of the body. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -1044,42 +1065,49 @@ See the manual for details." (defcustom gnus-treat-strip-trailing-blank-lines nil "Strip trailing blank lines. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-strip-leading-blank-lines nil "Strip leading blank lines. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-strip-multiple-blank-lines nil "Strip multiple blank lines. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-unfold-headers 'head "Unfold folded header lines. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." + :group 'gnus-article-treat + :type gnus-article-treat-custom) + +(defcustom gnus-treat-fold-headers nil + "Fold headers. +Valid values are nil, t, `head', `last', an integer or a predicate. +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-fold-newsgroups 'head "Fold the Newsgroups and Followup-To headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-overstrike t "Treat overstrike highlighting. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (put 'gnus-treat-overstrike 'highlight t) @@ -1095,7 +1123,8 @@ See the manual for details." 'head) "Display X-Face headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' and Info node +`(gnus)X-Face' for details." :group 'gnus-article-treat ;;:version "21.1" :type gnus-article-treat-head-custom) @@ -1138,38 +1167,45 @@ smiley functions are not overridden by `smiley-ems').") nil) "Display smileys. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' and Info node +`(gnus)Smileys' for details." :group 'gnus-article-treat ;;:version "21.1" :type gnus-article-treat-custom) (put 'gnus-treat-display-smileys 'highlight t) (defcustom gnus-treat-from-picon - (if (gnus-image-type-available-p 'xpm) + (if (and (gnus-image-type-available-p 'xpm) + (gnus-picons-installed-p)) 'head nil) "Display picons in the From header. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' and Info node +`(gnus)Picons' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (put 'gnus-treat-from-picon 'highlight t) (defcustom gnus-treat-mail-picon - (if (gnus-image-type-available-p 'xpm) + (if (and (gnus-image-type-available-p 'xpm) + (gnus-picons-installed-p)) 'head nil) "Display picons in To and Cc headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' and Info node +`(gnus)Picons' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (put 'gnus-treat-mail-picon 'highlight t) (defcustom gnus-treat-newsgroups-picon - (if (gnus-image-type-available-p 'xpm) + (if (and (gnus-image-type-available-p 'xpm) + (gnus-picons-installed-p)) 'head nil) "Display picons in the Newsgroups and Followup-To headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' and Info node +`(gnus)Picons' for details." :group 'gnus-article-treat :type gnus-article-treat-head-custom) (put 'gnus-treat-newsgroups-picon 'highlight t) @@ -1181,7 +1217,7 @@ See the manual for details." 'head nil) "Draw a boundary at the end of the headers. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -1189,7 +1225,7 @@ See the manual for details." (defcustom gnus-treat-capitalize-sentences nil "Capitalize sentence-starting words. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -1197,14 +1233,14 @@ See the manual for details." (defcustom gnus-treat-fill-long-lines nil "Fill long lines. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :type gnus-article-treat-custom) (defcustom gnus-treat-play-sounds nil "Play sounds. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -1222,7 +1258,7 @@ decode the body, '(or header t) for the whole article, etc." (defcustom gnus-treat-translate nil "Translate articles from one language to another. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :version "21.1" :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -1231,7 +1267,7 @@ See the manual for details." "Verify X-PGP-Sig. To automatically treat X-PGP-Sig, set it to head. Valid values are nil, t, `head', `last', an integer or a predicate. -See the manual for details." +See Info node `(gnus)Customizing Articles' for details." :group 'gnus-article-treat :group 'mime-security :type gnus-article-treat-custom) @@ -1299,12 +1335,15 @@ It is a string, such as \"PGP\". If nil, ask user." gnus-article-strip-multiple-blank-lines) (gnus-treat-overstrike gnus-article-treat-overstrike) (gnus-treat-unfold-headers gnus-article-treat-unfold-headers) + (gnus-treat-fold-headers gnus-article-treat-fold-headers) + ;; Displaying X-Face should be done after unfolding headers + ;; to protect bitmap lines. + (gnus-treat-display-xface gnus-article-display-x-face) (gnus-treat-fold-newsgroups gnus-article-treat-fold-newsgroups) (gnus-treat-buttonize-head gnus-article-add-buttons-to-head) - (gnus-treat-display-smileys gnus-article-smiley-display) + (gnus-treat-display-smileys gnus-treat-smiley) (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences) (gnus-treat-emphasize gnus-article-emphasize) - (gnus-treat-display-xface gnus-article-display-x-face) (gnus-treat-body-boundary gnus-article-treat-body-boundary) (gnus-treat-play-sounds gnus-earcon-display))) @@ -1834,6 +1873,46 @@ unfolded." (replace-match " " t t))) (goto-char (point-max))))))) +(defun gnus-article-treat-fold-headers () + "Fold message headers." + (interactive) + (gnus-with-article-headers + (while (not (eobp)) + (save-restriction + (mail-header-narrow-to-field) + (mail-header-fold-field) + (goto-char (point-max)))))) + +(defun gnus-treat-smiley () + "Display textual emoticons (\"smileys\") as small graphical icons." + (interactive) + (unless (featurep 'xemacs) + (when (and (>= emacs-major-version 21) + (not gnus-article-should-use-smiley-mule) + gnus-article-smiley-mule-loaded-p) + (load "smiley-ems" nil t) + (setq gnus-article-smiley-mule-loaded-p nil)) + (when (and gnus-article-should-use-smiley-mule + (not gnus-article-smiley-mule-loaded-p)) + (load "smiley-mule" nil t) + (setq gnus-article-smiley-mule-loaded-p t))) + (gnus-with-article-buffer + (if (memq 'smiley gnus-article-wash-types) + (gnus-delete-images 'smiley) + (article-goto-body) + (let ((images (smiley-region (point) (point-max)))) + (when images + (gnus-add-wash-type 'smiley) + (dolist (image images) + (gnus-add-image 'smiley image))))))) + +(defun gnus-article-remove-images () + "Remove all images from the article buffer." + (interactive) + (gnus-with-article-buffer + (dolist (elem gnus-article-image-alist) + (gnus-delete-images (car elem))))) + (defun gnus-article-treat-fold-newsgroups () "Unfold folded message headers. Only the headers that fit into the current window width will be @@ -1843,7 +1922,7 @@ unfolded." (while (gnus-article-goto-header "newsgroups\\|followup-to") (save-restriction (mail-header-narrow-to-field) - (while (search-forward "," nil t) + (while (re-search-forward ", *" nil t) (replace-match ", " t t)) (mail-header-fold-field) (goto-char (point-max)))))) @@ -1851,13 +1930,18 @@ unfolded." (defun gnus-article-treat-body-boundary () "Place a boundary line at the end of the headers." (interactive) - (gnus-with-article-headers - (goto-char (point-max)) - (let ((start (point))) - (insert "X-Boundary: ") - (gnus-add-text-properties start (point) '(invisible t intangible t)) - (insert (make-string (1- (window-width)) ?-) - "\n")))) + (when (and gnus-body-boundary-delimiter + (> (length gnus-body-boundary-delimiter) 0)) + (gnus-with-article-headers + (goto-char (point-max)) + (let ((start (point))) + (insert "X-Boundary: ") + (gnus-add-text-properties start (point) '(invisible t intangible t)) + (insert (let (str) + (while (>= (1- (window-width)) (length str)) + (setq str (concat str gnus-body-boundary-delimiter))) + (substring str 0 (1- (window-width)))) + "\n"))))) (defun article-fill-long-lines () "Fill lines that are wider than the window width." @@ -1920,52 +2004,77 @@ unfolded." (defun article-display-x-face (&optional force) "Look for an X-Face header and display it if present." (interactive (list 'force)) - (gnus-with-article-headers - ;; Delete the old process, if any. - (when (process-status "article-x-face") - (delete-process "article-x-face")) - (if (memq 'xface gnus-article-wash-types) - ;; We have already displayed X-Faces, so we remove them - ;; instead. - (gnus-delete-images 'xface) - ;; Display X-Faces. - (let (x-faces from face) - (save-excursion - (set-buffer gnus-original-article-buffer) - (save-restriction - (mail-narrow-to-head) - (while (gnus-article-goto-header "x-face") - (push (mail-header-field-value) x-faces)) - (setq from (message-fetch-field "from")))) - ;; Sending multiple EOFs to xv doesn't work, so we only do a - ;; single external face. - (when (stringp gnus-article-x-face-command) - (setq x-faces (list (car x-faces)))) - (while (and (setq face (pop x-faces)) - gnus-article-x-face-command - (or force - ;; Check whether this face is censored. - (not gnus-article-x-face-too-ugly) - (and gnus-article-x-face-too-ugly from - (not (string-match gnus-article-x-face-too-ugly - from))))) - ;; We display the face. - (if (symbolp gnus-article-x-face-command) - ;; The command is a lisp function, so we call it. - (if (gnus-functionp gnus-article-x-face-command) - (funcall gnus-article-x-face-command face) - (error "%s is not a function" gnus-article-x-face-command)) - ;; The command is a string, so we interpret the command - ;; as a, well, command, and fork it off. - (let ((process-connection-type nil)) - (process-kill-without-query - (start-process - "article-x-face" nil shell-file-name shell-command-switch - gnus-article-x-face-command)) - (with-temp-buffer - (insert face) - (process-send-region "article-x-face" (point-min) (point-max))) - (process-send-eof "article-x-face")))))))) + (let ((wash-face-p buffer-read-only)) ;; When type `W f' + (gnus-with-article-headers + ;; Delete the old process, if any. + (when (process-status "article-x-face") + (delete-process "article-x-face")) + (if (memq 'xface gnus-article-wash-types) + ;; We have already displayed X-Faces, so we remove them + ;; instead. + (gnus-delete-images 'xface) + ;; Display X-Faces. + (let (x-faces from face grey) + (save-excursion + (when (and wash-face-p + (progn + (goto-char (point-min)) + (not (re-search-forward + "^X-Face\\(-[0-9]+\\)?:[\t ]*" nil t))) + (gnus-buffer-live-p gnus-original-article-buffer)) + ;; If type `W f', use gnus-original-article-buffer, + ;; otherwise use the current buffer because displaying + ;; RFC822 parts calls this function too. + (set-buffer gnus-original-article-buffer)) + (save-restriction + (mail-narrow-to-head) + (while (gnus-article-goto-header "x-face\\(-[0-9]+\\)?") + (when (match-beginning 2) + (setq grey t)) + (push (mail-header-field-value) x-faces)) + (setq from (message-fetch-field "from")))) + (if grey + (let ((xpm (gnus-convert-gray-x-face-to-xpm x-faces)) + image) + (when xpm + (setq image (gnus-create-image xpm 'xpm t)) + (gnus-article-goto-header "from") + (when (bobp) + (insert "From: [no `from' set]\n") + (forward-char -17)) + (gnus-add-wash-type 'xface) + (gnus-add-image 'xface image) + (gnus-put-image image))) + ;; Sending multiple EOFs to xv doesn't work, so we only do a + ;; single external face. + (when (stringp gnus-article-x-face-command) + (setq x-faces (list (car x-faces)))) + (while (and (setq face (pop x-faces)) + gnus-article-x-face-command + (or force + ;; Check whether this face is censored. + (not gnus-article-x-face-too-ugly) + (and gnus-article-x-face-too-ugly from + (not (string-match gnus-article-x-face-too-ugly + from))))) + ;; We display the face. + (if (symbolp gnus-article-x-face-command) + ;; The command is a lisp function, so we call it. + (if (gnus-functionp gnus-article-x-face-command) + (funcall gnus-article-x-face-command face) + (error "%s is not a function" gnus-article-x-face-command)) + ;; The command is a string, so we interpret the command + ;; as a, well, command, and fork it off. + (let ((process-connection-type nil)) + (process-kill-without-query + (start-process + "article-x-face" nil shell-file-name shell-command-switch + gnus-article-x-face-command)) + (with-temp-buffer + (insert face) + (process-send-region "article-x-face" + (point-min) (point-max))) + (process-send-eof "article-x-face")))))))))) (defun article-decode-mime-words () "Decode all MIME-encoded words in the article." @@ -2781,15 +2890,15 @@ This format is defined by the `gnus-article-time-format' variable." (interactive (list t)) (article-date-ut 'iso8601 highlight)) -(defun article-show-all () - "Show all hidden text in the article buffer." - (interactive) - (save-excursion - (widen) - (let ((buffer-read-only nil)) - (gnus-article-unhide-text (point-min) (point-max)) - (gnus-remove-text-with-property 'gnus-prev) - (gnus-remove-text-with-property 'gnus-next)))) +;; (defun article-show-all () +;; "Show all hidden text in the article buffer." +;; (interactive) +;; (save-excursion +;; (widen) +;; (let ((buffer-read-only nil)) +;; (gnus-article-unhide-text (point-min) (point-max)) +;; (gnus-remove-text-with-property 'gnus-prev) +;; (gnus-remove-text-with-property 'gnus-next)))) (defun article-show-all-headers () "Show all hidden headers in the article buffer." @@ -3308,7 +3417,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is article-treat-dumbquotes article-normalize-headers (article-show-all-headers . gnus-article-show-all-headers) - (article-show-all . gnus-article-show-all)))) +;; (article-show-all . gnus-article-show-all) + ))) ;;; ;;; Gnus article mode @@ -3331,6 +3441,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is ">" end-of-buffer "\C-c\C-i" gnus-info-find-node "\C-c\C-b" gnus-bug + "R" gnus-article-reply-with-original + "F" gnus-article-followup-with-original "\C-hk" gnus-article-describe-key "\C-hc" gnus-article-describe-key-briefly @@ -3792,14 +3904,19 @@ value of the variable `gnus-show-mime' is non-nil." ;;; (defvar gnus-mime-button-line-format "%{%([%p. %d%T]%)%}%e\n" - "The following specs can be used: + "Format of the MIME buttons. + +Valid specifiers include: %t The MIME type %T MIME type, along with additional info %n The `name' parameter %d The description, if any %l The length of the encoded part %p The part identifier number -%e Dots if the part isn't displayed") +%e Dots if the part isn't displayed + +General format specifiers can also be used. See +(gnus)Formatting Variables.") (defvar gnus-mime-button-line-format-alist '((?t gnus-tmp-type ?s) @@ -4315,14 +4432,11 @@ If no internal viewer is available, use an external viewer." (setq b (point)) (gnus-eval-format gnus-mime-button-line-format gnus-mime-button-line-format-alist - `(keymap ,gnus-mime-button-map - ,@(if (>= (string-to-number emacs-version) 21) - nil - (list 'local-map gnus-mime-button-map)) - gnus-callback gnus-mm-display-part - gnus-part ,gnus-tmp-id - article-type annotation - gnus-data ,handle)) + `(,@(gnus-local-map-property gnus-mime-button-map) + gnus-callback gnus-mm-display-part + gnus-part ,gnus-tmp-id + article-type annotation + gnus-data ,handle)) (setq e (point)) (widget-convert-button 'link b e @@ -4575,12 +4689,9 @@ If no internal viewer is available, use an external viewer." ',gnus-article-mime-handle-alist)) (gnus-mime-display-alternative ',ihandles ',not-pref ',begend ,id)) - ,@(if (>= (string-to-number emacs-version) 21) - nil ;; XEmacs doesn't care - (list 'local-map gnus-mime-button-map)) + ,@(gnus-local-map-property gnus-mime-button-map) ,gnus-mouse-face-prop ,gnus-article-mouse-face face ,gnus-article-button-face - keymap ,gnus-mime-button-map gnus-part ,id gnus-data ,handle)) (widget-convert-button 'link from (point) @@ -4602,12 +4713,9 @@ If no internal viewer is available, use an external viewer." ',gnus-article-mime-handle-alist)) (gnus-mime-display-alternative ',ihandles ',handle ',begend ,id)) - ,@(if (>= (string-to-number emacs-version) 21) - nil ;; XEmacs doesn't care - (list 'local-map gnus-mime-button-map)) + ,@(gnus-local-map-property gnus-mime-button-map) ,gnus-mouse-face-prop ,gnus-article-mouse-face face ,gnus-article-button-face - keymap ,gnus-mime-button-map gnus-part ,id gnus-data ,handle)) (widget-convert-button 'link from (point) @@ -4696,7 +4804,7 @@ is the string to use when it is inactive.") (defun gnus-add-wash-type (type) "Add a washing of TYPE to the current status." - (push type gnus-article-wash-types)) + (add-to-list 'gnus-article-wash-types type)) (defun gnus-delete-wash-type (type) "Add a washing of TYPE to the current status." @@ -4911,7 +5019,7 @@ Argument LINES specifies lines to be scrolled down." (interactive "P") (gnus-article-check-buffer) (let ((nosaves - '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F" + '("q" "Q" "c" "r" "\C-c\C-f" "m" "a" "f" "Zc" "ZC" "ZE" "ZJ" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" "=" "^" "\M-^" "|")) (nosave-but-article @@ -5024,6 +5132,39 @@ Argument LINES specifies lines to be scrolled down." (describe-key-briefly key insert)) (describe-key-briefly key insert))) +(defun gnus-article-reply-with-original (&optional wide) + "Start composing a reply mail to the current message. +The text in the region will be yanked. If the region isn't active, +the entire article will be yanked." + (interactive "P") + (let ((article (cdr gnus-article-current)) cont) + (if (not (mark)) + (gnus-summary-reply (list (list article)) wide) + (setq cont (buffer-substring (point) (mark))) + ;; Deactivate active regions. + (when (and (boundp 'transient-mark-mode) + transient-mark-mode) + (setq mark-active nil)) + (gnus-summary-reply + (list (list article cont)) wide)))) + +(defun gnus-article-followup-with-original () + "Compose a followup to the current article. +The text in the region will be yanked. If the region isn't active, +the entire article will be yanked." + (interactive) + (let ((article (cdr gnus-article-current)) + cont) + (if (not (gnus-region-active-p)) + (gnus-summary-followup (list (list article))) + (setq cont (buffer-substring (point) (mark))) + ;; Deactivate active regions. + (when (and (boundp 'transient-mark-mode) + transient-mark-mode) + (setq mark-active nil)) + (gnus-summary-followup + (list (list article cont)))))) + (defun gnus-article-hide (&optional arg force) "Hide all the gruft in the current article. This means that PGP stuff, signatures, cited text and (some) @@ -5048,6 +5189,9 @@ If given a prefix, show the hidden text instead." (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) (gnus-request-group gnus-newsgroup-name t))) +(eval-when-compile + (autoload 'nneething-get-file-name "nneething")) + (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer. T-gnus change: Insert an article into `gnus-original-article-buffer'." @@ -5099,12 +5243,10 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." gnus-newsgroup-name))) (when (and (eq (car method) 'nneething) (vectorp header)) - (let ((dir (expand-file-name - (mail-header-subject header) - (file-name-as-directory - (or (cadr (assq 'nneething-address method)) - (nth 1 method)))))) - (when (file-directory-p dir) + (let ((dir (nneething-get-file-name + (mail-header-id header)))) + (when (and (stringp dir) + (file-directory-p dir)) (setq article 'nneething) (gnus-group-enter-directory dir)))))))) (setq gnus-original-article (cons group article)) @@ -5144,6 +5286,11 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." (numberp article) (gnus-cache-request-article article group)) 'article) + ;; Check the agent cache. + ((and gnus-agent gnus-agent-cache gnus-plugged + (numberp article) + (gnus-agent-request-article article group)) + 'article) ;; Get the article and put into the article buffer. ((or (stringp article) (numberp article)) @@ -5497,7 +5644,7 @@ after replacing with the original article." ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" 0 t gnus-button-handle-info 2) ;; This is how URLs _should_ be embedded in text... - ("]*\\)>" 0 t gnus-button-embedded-url 1) + ("]*\\)>" 1 t gnus-button-embedded-url 1) ;; Raw URLs. (,gnus-button-url-regexp 0 t browse-url 0)) "*Alist of regexps matching buttons in article bodies. @@ -5530,6 +5677,7 @@ variable it the real callback function." ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t browse-url 0) ("^Subject:" ,gnus-button-url-regexp 0 t browse-url 0) ("^[^:]+:" ,gnus-button-url-regexp 0 t browse-url 0) + ("^[^:]+:" "\\bmailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t gnus-button-message-id 3)) "*Alist of headers and regexps to match buttons in article heads. @@ -5963,7 +6111,7 @@ specified by `gnus-button-alist'." (if (not (string-match "=" cur)) nil ; Grace (setq key (gnus-url-unhex-string (substring cur 0 (match-beginning 0))) - val (gnus-url-unhex-string (substring cur (match-end 0) nil))) + val (gnus-url-unhex-string (substring cur (match-end 0) nil) t)) (if downcase (setq key (downcase key))) (setq cur (assoc key retval)) @@ -6000,71 +6148,46 @@ specified by `gnus-button-alist'." "Activate ADDRESS with `browse-url'." (browse-url (gnus-strip-whitespace address))) -(eval-when-compile - ;; Silence the byte-compiler. - (autoload 'smiley-toggle-buffer "gnus-bitmap")) -(defun gnus-article-smiley-display (&optional arg) - "Display smileys as small graphical icons. -With arg, turn displaying on if and only if arg is positive." - (interactive "P") - (cond ((featurep 'xemacs) - (gnus-smiley-display arg)) - ((>= emacs-major-version 21) - (if gnus-article-should-use-smiley-mule - (progn - (unless gnus-article-smiley-mule-loaded-p - (load "smiley-mule" nil t) - (setq gnus-article-smiley-mule-loaded-p t)) - (smiley-toggle-buffer arg)) - (when gnus-article-smiley-mule-loaded-p - (load "smiley-ems" nil t) - (setq gnus-article-smiley-mule-loaded-p nil)) - (gnus-smiley-display arg))) - (t - (setq gnus-article-should-use-smiley-mule t) - (unless gnus-article-smiley-mule-loaded-p - (load "smiley-mule" nil t) - (setq gnus-article-smiley-mule-loaded-p t)) - (smiley-toggle-buffer arg)))) - ;;; Next/prev buttons in the article buffer. (defvar gnus-next-page-line-format "%{%(Next page...%)%}\n") (defvar gnus-prev-page-line-format "%{%(Previous page...%)%}\n") -(defvar gnus-prev-page-map nil) -(unless gnus-prev-page-map - (setq gnus-prev-page-map (make-sparse-keymap)) - (define-key gnus-prev-page-map gnus-mouse-2 'gnus-button-prev-page) - (define-key gnus-prev-page-map "\r" 'gnus-button-prev-page)) +(defvar gnus-prev-page-map + (let ((map (make-sparse-keymap))) + (unless (>= emacs-major-version 21) + ;; XEmacs doesn't care. + (set-keymap-parent map gnus-article-mode-map)) + (define-key map gnus-mouse-2 'gnus-button-prev-page) + (define-key map "\r" 'gnus-button-prev-page) + map)) -(static-if (featurep 'xemacs) - (defun gnus-insert-prev-page-button () - (let ((buffer-read-only nil)) - (gnus-eval-format - gnus-prev-page-line-format nil - `(gnus-prev t local-map ,gnus-prev-page-map - gnus-callback gnus-article-button-prev-page - article-type annotation)))) - (defun gnus-insert-prev-page-button () - (let ((buffer-read-only nil) - (situation (get-text-property (point-min) 'mime-view-situation))) - (set-keymap-parent gnus-prev-page-map (current-local-map)) - (gnus-eval-format - gnus-prev-page-line-format nil - `(gnus-prev t local-map ,gnus-prev-page-map - gnus-callback gnus-article-button-prev-page - article-type annotation - mime-view-situation ,situation)))) - ) +(defun gnus-insert-prev-page-button () + (let ((b (point)) + (buffer-read-only nil) + (situation (get-text-property (point-min) 'mime-view-situation))) + (gnus-eval-format + gnus-prev-page-line-format nil + `(,@(gnus-local-map-property gnus-prev-page-map) + gnus-prev t + gnus-callback gnus-article-button-prev-page + article-type annotation + mime-view-situation ,situation)) + (widget-convert-button + 'link b (point) + :action 'gnus-button-prev-page + :button-keymap gnus-prev-page-map))) -(defvar gnus-next-page-map nil) -(unless gnus-next-page-map - (setq gnus-next-page-map (make-sparse-keymap)) - (define-key gnus-next-page-map gnus-mouse-2 'gnus-button-next-page) - (define-key gnus-next-page-map "\r" 'gnus-button-next-page)) +(defvar gnus-next-page-map + (let ((map (make-sparse-keymap))) + (unless (>= emacs-major-version 21) + ;; XEmacs doesn't care. + (set-keymap-parent map gnus-article-mode-map)) + (define-key map gnus-mouse-2 'gnus-button-next-page) + (define-key map "\r" 'gnus-button-next-page) + map)) -(defun gnus-button-next-page () +(defun gnus-button-next-page (&optional args more-args) "Go to the next page." (interactive) (let ((win (selected-window))) @@ -6072,7 +6195,7 @@ With arg, turn displaying on if and only if arg is positive." (gnus-article-next-page) (select-window win))) -(defun gnus-button-prev-page () +(defun gnus-button-prev-page (&optional args more-args) "Go to the prev page." (interactive) (let ((win (selected-window))) @@ -6080,25 +6203,20 @@ With arg, turn displaying on if and only if arg is positive." (gnus-article-prev-page) (select-window win))) -(static-if (featurep 'xemacs) - (defun gnus-insert-next-page-button () - (let ((buffer-read-only nil)) - (gnus-eval-format gnus-next-page-line-format nil - `(gnus-next - t local-map ,gnus-next-page-map - gnus-callback gnus-article-button-next-page - article-type annotation)))) - (defun gnus-insert-next-page-button () - (let ((buffer-read-only nil) - (situation (get-text-property (point-min) 'mime-view-situation))) - (set-keymap-parent gnus-next-page-map (current-local-map)) - (gnus-eval-format gnus-next-page-line-format nil - `(gnus-next - t local-map ,gnus-next-page-map +(defun gnus-insert-next-page-button () + (let ((b (point)) + (buffer-read-only nil) + (situation (get-text-property (point-min) 'mime-view-situation))) + (gnus-eval-format gnus-next-page-line-format nil + `(,@(gnus-local-map-property gnus-next-page-map) + gnus-next t gnus-callback gnus-article-button-next-page article-type annotation - mime-view-situation ,situation)))) - ) + mime-view-situation ,situation)) + (widget-convert-button + 'link b (point) + :action 'gnus-button-next-page + :button-keymap gnus-next-page-map))) (defun gnus-article-button-next-page (arg) "Go to the next page." @@ -6122,11 +6240,11 @@ With arg, turn displaying on if and only if arg is positive." This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a -(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups +\(REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups whose names match REGEXP. For example: -((\"chinese\" . gnus-decode-encoded-word-region-by-guess) +\((\"chinese\" . gnus-decode-encoded-word-region-by-guess) mail-decode-encoded-word-region (\"chinese\" . rfc1843-decode-region)) ") @@ -6445,14 +6563,11 @@ For example: (gnus-eval-format gnus-mime-security-button-line-format gnus-mime-security-button-line-format-alist - `(keymap ,gnus-mime-security-button-map - ,@(if (>= (string-to-number emacs-version) 21) - nil ;; XEmacs doesn't care - (list 'local-map gnus-mime-security-button-map)) - gnus-callback gnus-mime-security-press-button - gnus-line-format ,gnus-mime-security-button-line-format - article-type annotation - gnus-data ,handle)) + `(,@(gnus-local-map-property gnus-mime-security-button-map) + gnus-callback gnus-mime-security-press-button + gnus-line-format ,gnus-mime-security-button-line-format + article-type annotation + gnus-data ,handle)) (setq e (point)) (widget-convert-button 'link b e diff --git a/lisp/gnus-delay.el b/lisp/gnus-delay.el index c7652da..7e712b8 100644 --- a/lisp/gnus-delay.el +++ b/lisp/gnus-delay.el @@ -5,15 +5,17 @@ ;; Author: Kai Großjohann ;; Keywords: mail, news, extensions -;; This file is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; This file is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published +;; by the Free Software Foundation; either version 2, or (at your +;; option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to diff --git a/lisp/gnus-diary.el b/lisp/gnus-diary.el index 096459e..54b51d3 100644 --- a/lisp/gnus-diary.el +++ b/lisp/gnus-diary.el @@ -1,24 +1,24 @@ ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend -;; Copyright (C) 1999-2001 Didier Verna. +;; Copyright (c) 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001 Didier Verna. ;; Author: Didier Verna ;; Maintainer: Didier Verna ;; Created: Tue Jul 20 10:42:55 1999 -;; Last Revision: Wed Sep 12 12:31:09 2001 ;; Keywords: calendar mail news -;; This file is part of Gnus. +;; This file is part of GNU Emacs. -;; Gnus is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2 of the License, or -;; (at your option) any later version. +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published +;; by the Free Software Foundation; either version 2 of the License, +;; or (at your option) any later version. -;; Gnus is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; GNU Emacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 083a3ba..6d0d24e 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -1,5 +1,5 @@ ;;; gnus-ems.el --- functions for making Semi-gnus work under different Emacsen -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -48,9 +48,13 @@ (autoload 'gnus-xmas-redefine "gnus-xmas") (autoload 'appt-select-lowest-window "appt")) -(if (featurep 'xemacs) - (autoload 'gnus-smiley-display "smiley") - (autoload 'gnus-smiley-display "smiley-ems")) ; override XEmacs version +(cond ((featurep 'xemacs) + (autoload 'smiley-region "smiley")) + ;; override XEmacs version + ((>= emacs-major-version 21) + (autoload 'smiley-region "smiley-ems")) + (t + (autoload 'smiley-region "smiley-mule"))) (defun gnus-kill-all-overlays () "Delete all overlays in the current buffer." @@ -219,86 +223,6 @@ (goto-char (point-min)) (sit-for 0)))))) -(defvar gnus-article-xface-ring-internal nil - "Cache for face data.") - -;; Worth customizing? -(defvar gnus-article-xface-ring-size 6 - "Length of the ring used for `gnus-article-xface-ring-internal'.") - -(defvar gnus-article-compface-xbm - (condition-case () - (eq 0 (string-match "#define" - (shell-command-to-string "uncompface -X"))) - (error nil)) - "Non-nil means the compface program supports the -X option. -That produces XBM output.") - -(defun gnus-article-display-xface (data) - "Display the XFace header FACE in the current buffer. -Requires support for images in your Emacs and the external programs -`uncompface', and `icontopbm'. On a GNU/Linux system these -might be in packages with names like `compface' or `faces-xface' and -`netpbm' or `libgr-progs', for instance. See also -`gnus-article-compface-xbm'. - -This function is for Emacs 21+. See `gnus-xmas-article-display-xface' -for XEmacs." - ;; It might be worth converting uncompface's output in Lisp. - - (when (if (fboundp 'display-graphic-p) - (display-graphic-p)) - (unless gnus-article-xface-ring-internal ; Only load ring when needed. - (setq gnus-article-xface-ring-internal - (make-ring gnus-article-xface-ring-size))) - (save-excursion - (let* ((cur (current-buffer)) - (image (cdr-safe (assoc data (ring-elements - gnus-article-xface-ring-internal)))) - default-enable-multibyte-characters) - (unless image - (with-temp-buffer - (insert data) - (and (eq 0 (apply #'call-process-region (point-min) (point-max) - "uncompface" - 'delete '(t nil) nil - (if gnus-article-compface-xbm - '("-X")))) - (if gnus-article-compface-xbm - t - (goto-char (point-min)) - (progn (insert "/* Width=48, Height=48 */\n") t) - (eq 0 (call-process-region (point-min) (point-max) - "icontopbm" - 'delete '(t nil)))) - ;; Miles Bader says that faces don't look right as - ;; light on dark. - (if (eq 'dark (cdr-safe (assq 'background-mode - (frame-parameters)))) - (setq image (create-image (buffer-string) - (if gnus-article-compface-xbm - 'xbm - 'pbm) - t - :ascent 'center - :foreground "black" - :background "white")) - (setq image (create-image (buffer-string) - (if gnus-article-compface-xbm - 'xbm - 'pbm) - t - :ascent 'center))))) - (ring-insert gnus-article-xface-ring-internal (cons data image))) - (when image - (goto-char (point-min)) - (re-search-forward "^From:" nil 'move) - (while (get-text-property (point) 'display) - (goto-char (next-single-property-change (point) 'display))) - (gnus-add-wash-type 'xface) - (gnus-add-image 'xface image) - (insert-image image)))))) - ;;; Image functions. (defun gnus-image-type-available-p (type) @@ -313,12 +237,18 @@ for XEmacs." (apply 'create-image file type data-p props))) (defun gnus-put-image (glyph &optional string) - (insert-image glyph string)) + (insert-image glyph (or string " ")) + (unless string + (put-text-property (1- (point)) (point) + 'gnus-image-text-deletable t)) + glyph) (defun gnus-remove-image (image) - (dolist (position (gnus-text-with-property 'display)) + (dolist (position (message-text-with-property 'display)) (when (equal (get-text-property position 'display) image) - (put-text-property position (1+ position) 'display nil)))) + (put-text-property position (1+ position) 'display nil) + (when (get-text-property position 'gnus-image-text-deletable) + (delete-region position (1+ position)))))) (defun-maybe assoc-ignore-case (key alist) "Like `assoc', but assumes KEY is a string and ignores case when comparing." diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 978bccf..d24124a 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -176,6 +176,9 @@ colors of the displayed X-Faces." (save-restriction (article-narrow-to-head) (gnus-article-goto-header "from") + (when (bobp) + (insert "From: [no `from' set]\n") + (forward-char -17)) (gnus-add-image 'xface (gnus-put-image @@ -187,6 +190,42 @@ colors of the displayed X-Faces." pbm 'pbm t :ascent 'center :face 'gnus-x-face)))) (gnus-add-wash-type 'xface)))))) +(defun gnus-grab-cam-x-face () + "Grab a picture off the camera and make it into an X-Face." + (interactive) + (shell-command "xawtv-remote snap ppm") + (let ((file nil)) + (while (null (setq file (directory-files "/tftpboot/sparky/tmp" + t "snap.*ppm"))) + (sleep-for 1)) + (setq file (car file)) + (with-temp-buffer + (shell-command + (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface" + file) + (current-buffer)) + ;;(sleep-for 3) + (delete-file file) + (buffer-string)))) + +(defun gnus-grab-gray-x-face () + "Grab a picture off the camera and make it into an X-Face." + (interactive) + (shell-command "xawtv-remote snap ppm") + (let ((file nil)) + (while (null (setq file (directory-files "/tftpboot/sparky/tmp" + t "snap.*ppm"))) + (sleep-for 1)) + (setq file (car file)) + (with-temp-buffer + (shell-command + (format "pnmcut -left 70 -top 100 -width 144 -height 144 '%s' | ppmquant 256 2>/dev/null | ppmtogif > '%s.gif'" + file file) + (current-buffer)) + (delete-file file)) + (gnus-convert-image-to-gray-x-face (concat file ".gif") 3) + (delete-file (concat file ".gif")))) + (provide 'gnus-fun) ;;; gnus-fun.el ends here diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index afb29cf..98d08e3 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -179,9 +179,6 @@ with some simple extensions. will be inserted into the buffer just like information from any other group specifier. -Text between %( and %) will be highlighted with `gnus-mouse-face' when -the mouse point move inside the area. There can only be one such area. - Note that this format specification is not always respected. For reasons of efficiency, when listing killed groups, this specification is ignored altogether. If the spec is changed considerably, your @@ -192,7 +189,11 @@ If you use %o or %O, reading the active file will be slower and quite a bit of extra memory will be used. %D will also worsen performance. Also note that if you change the format specification to include any of these specs, you must probably re-start Gnus to see them go into -effect." +effect. + +General format specifiers can also be used. +See (gnus)Formatting Variables." + :link '(custom-manual "(gnus)Formatting Variables") :group 'gnus-group-visual :type 'string) @@ -1880,13 +1881,15 @@ Returns whether the fetching was successful or not." ;; if selection was successful. (defun gnus-group-read-ephemeral-group (group method &optional activate quit-config request-only - select-articles) + select-articles + parameters) "Read GROUP from METHOD as an ephemeral group. If ACTIVATE, request the group first. If QUIT-CONFIG, use that window configuration when exiting from the ephemeral group. If REQUEST-ONLY, don't actually read the group; just request it. If SELECT-ARTICLES, only select those articles. +If PARAMETERS, use those as the group parameters. Return the name of the group if selection was successful." ;; Transform the select method into a unique server. @@ -1903,10 +1906,13 @@ Return the name of the group if selection was successful." group `(-1 nil (,group ,gnus-level-default-subscribed nil nil ,method - ((quit-config . - ,(if quit-config quit-config - (cons gnus-summary-buffer - gnus-current-window-configuration)))))) + ,(cons + (if quit-config + (cons 'quit-config quit-config) + (cons 'quit-config + (cons gnus-summary-buffer + gnus-current-window-configuration))) + parameters))) gnus-newsrc-hashtb) (push method gnus-ephemeral-servers) (set-buffer gnus-group-buffer) @@ -3701,7 +3707,11 @@ The hook gnus-suspend-gnus-hook is called before actually suspending." ;; Kill Gnus buffers except for group mode buffer. (let ((group-buf (get-buffer gnus-group-buffer))) (mapcar (lambda (buf) - (unless (member buf (list group-buf gnus-dribble-buffer)) + (unless (or (member buf (list group-buf gnus-dribble-buffer)) + (progn + (save-excursion + (set-buffer buf) + (eq major-mode 'message-mode)))) (gnus-kill-buffer buf))) (gnus-buffers)) (gnus-kill-gnus-frames) @@ -4021,22 +4031,28 @@ This command may read the active file." (defun gnus-group-mark-article-read (group article) "Mark ARTICLE read." - (gnus-activate-group group) (let ((buffer (gnus-summary-buffer-name group)) - (mark gnus-read-mark)) - (unless - (and - (get-buffer buffer) - (with-current-buffer buffer - (when gnus-newsgroup-prepared - (when (and gnus-newsgroup-auto-expire - (memq mark gnus-auto-expirable-marks)) - (setq mark gnus-expirable-mark)) - (setq mark (gnus-request-update-mark - group article mark)) - (gnus-mark-article-as-read article mark) - (setq gnus-newsgroup-active (gnus-active group)) - t))) + (mark gnus-read-mark) + active n) + (if (get-buffer buffer) + (with-current-buffer buffer + (setq active gnus-newsgroup-active) + (gnus-activate-group group) + (when gnus-newsgroup-prepared + (when (and gnus-newsgroup-auto-expire + (memq mark gnus-auto-expirable-marks)) + (setq mark gnus-expirable-mark)) + (setq mark (gnus-request-update-mark + group article mark)) + (gnus-mark-article-as-read article mark) + (setq gnus-newsgroup-active (gnus-active group)) + (when active + (setq n (1+ (cdr active))) + (while (<= n (cdr gnus-newsgroup-active)) + (unless (eq n article) + (push n gnus-newsgroup-unselected)) + (setq n (1+ n)))))) + (gnus-activate-group group) (gnus-group-make-articles-read group (list article)) (when (gnus-group-auto-expirable-p group) diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index 2adb5c1..cf9b67e 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -1,5 +1,5 @@ ;;; gnus-int.el --- backend interface functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -36,6 +36,13 @@ :group 'gnus-start :type 'hook) +(defvar gnus-server-unopen-status nil + "The default status if the server is not able to open. +If the server is covered by Gnus agent, the possible values are +`denied', set the server denied; `offline', set the server offline; +`nil', ask user. If the server is not covered by Gnus agent, set the +server denied.") + ;;; ;;; Server Communication ;;; @@ -196,9 +203,25 @@ If it is down, start it up (again)." (setq elem (list gnus-command-method nil) gnus-opened-servers (cons elem gnus-opened-servers))) ;; Set the status of this server. - (setcar (cdr elem) (if result 'ok 'denied)) + (setcar (cdr elem) + (if result + (if (eq (cadr elem) 'offline) + 'offline + 'ok) + (if (and gnus-agent + (not (eq (cadr elem) 'offline)) + (gnus-agent-method-p gnus-command-method)) + (or gnus-server-unopen-status + (if (gnus-y-or-n-p + (format "Unable to open %s:%s, go offline? " + (car gnus-command-method) + (cadr gnus-command-method))) + 'offline + 'denied)) + 'denied))) ;; Return the result from the "open" call. - result)))) + (or (eq (cadr elem) 'offline) + result))))) (defun gnus-close-server (gnus-command-method) "Close the connection to GNUS-COMMAND-METHOD." @@ -301,11 +324,16 @@ this group uses will be queried." "Request headers for ARTICLES in GROUP. If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." (let ((gnus-command-method (gnus-find-method-for-group group))) - (if (and gnus-use-cache (numberp (car articles))) - (gnus-cache-retrieve-headers articles group fetch-old) + (cond + ((and gnus-use-cache (numberp (car articles))) + (gnus-cache-retrieve-headers articles group fetch-old)) + ((and gnus-agent gnus-agent-cache (gnus-online gnus-command-method) + (gnus-agent-method-p gnus-command-method)) + (gnus-agent-retrieve-headers articles group fetch-old)) + (t (funcall (gnus-get-function gnus-command-method 'retrieve-headers) articles (gnus-group-real-name group) - (nth 1 gnus-command-method) fetch-old)))) + (nth 1 gnus-command-method) fetch-old))))) (defun gnus-retrieve-articles (articles group) "Request ARTICLES in GROUP." @@ -370,6 +398,11 @@ If BUFFER, insert the article in that group." (gnus-cache-request-article article group)) (setq res (cons group article) clean-up t)) + ((and gnus-agent gnus-agent-cache gnus-plugged + (numberp article) + (gnus-agent-request-article article group)) + (setq res (cons group article) + clean-up t)) ;; Use `head' function. ((fboundp head) (setq res (funcall head article (gnus-group-real-name group) @@ -399,6 +432,12 @@ If BUFFER, insert the article in that group." (gnus-cache-request-article article group)) (setq res (cons group article) clean-up t)) + ;; Check the agent cache. + ((and gnus-agent gnus-agent-cache gnus-plugged + (numberp article) + (gnus-agent-request-article article group)) + (setq res (cons group article) + clean-up t)) ;; Use `head' function. ((fboundp head) (setq res (funcall head article (gnus-group-real-name group) diff --git a/lisp/gnus-logic.el b/lisp/gnus-logic.el index 13c9a20..77fc948 100644 --- a/lisp/gnus-logic.el +++ b/lisp/gnus-logic.el @@ -1,5 +1,5 @@ ;;; gnus-logic.el --- advanced scoring code for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -59,21 +59,21 @@ (defun gnus-score-advanced (rule &optional trace) "Apply advanced scoring RULE to all the articles in the current group." - (let ((headers gnus-newsgroup-headers) - gnus-advanced-headers score) - (while (setq gnus-advanced-headers (pop headers)) - (when (gnus-advanced-score-rule (car rule)) - ;; This rule was successful, so we add the score to - ;; this article. + (let (new-score score multiple) + (dolist (gnus-advanced-headers gnus-newsgroup-headers) + (when (setq multiple (gnus-advanced-score-rule (car rule))) + (setq new-score (or (nth 1 rule) + gnus-score-interactive-default-score)) + (when (numberp multiple) + (setq new-score (* multiple new-score))) + ;; This rule was successful, so we add the score to this + ;; article. (if (setq score (assq (mail-header-number gnus-advanced-headers) gnus-newsgroup-scored)) (setcdr score - (+ (cdr score) - (or (nth 1 rule) - gnus-score-interactive-default-score))) + (+ (cdr score) new-score)) (push (cons (mail-header-number gnus-advanced-headers) - (or (nth 1 rule) - gnus-score-interactive-default-score)) + new-score) gnus-newsgroup-scored) (when trace (push (cons "A file" rule) @@ -116,7 +116,7 @@ ;; 1- type redirection. (string-to-number (substring (symbol-name type) - (match-beginning 0) (match-end 0))) + (match-beginning 1) (match-end 1))) ;; ^^^ type redirection. (length (symbol-name type)))))) (when gnus-advanced-headers @@ -129,9 +129,8 @@ (error "Unknown advanced score type: %s" rule))))) (defun gnus-advanced-score-article (rule) - ;; `rule' is a semi-normal score rule, so we find out - ;; what function that's supposed to do the actual - ;; processing. + ;; `rule' is a semi-normal score rule, so we find out what function + ;; that's supposed to do the actual processing. (let* ((header (car rule)) (func (assoc (downcase header) gnus-advanced-index))) (if (not func) @@ -189,8 +188,8 @@ 'gnus-request-body) (t 'gnus-request-article))) ofunc article) - ;; Not all backends support partial fetching. In that case, - ;; we just fetch the entire article. + ;; Not all backends support partial fetching. In that case, we + ;; just fetch the entire article. (unless (gnus-check-backend-function (intern (concat "request-" header)) gnus-newsgroup-name) @@ -201,8 +200,8 @@ (when (funcall request-func article gnus-newsgroup-name) (goto-char (point-min)) ;; If just parts of the article is to be searched and the - ;; backend didn't support partial fetching, we just narrow - ;; to the relevant parts. + ;; backend didn't support partial fetching, we just narrow to + ;; the relevant parts. (when ofunc (if (eq ofunc 'gnus-request-head) (narrow-to-region diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c1280c4..21a845e 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1,5 +1,5 @@ ;;; gnus-msg.el --- mail and post interface for Semi-gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -137,11 +137,27 @@ See Info node `(gnus)Posting Styles'." (variable) (sexp))))))) -(defcustom gnus-inews-mark-gcc-as-read nil +(defcustom gnus-gcc-mark-as-read nil "If non-nil, automatically mark Gcc articles as read." :group 'gnus-message :type 'boolean) +(defvar gnus-inews-mark-gcc-as-read nil + "Obsolete variable. Use `gnus-gcc-mark-as-read' instead.") + +(make-obsolete-variable 'gnus-inews-mark-gcc-as-read + 'gnus-gcc-mark-as-read) + +(defcustom gnus-gcc-externalize-attachments nil + "Should local-file attachments be included as external parts in Gcc copies? +If it is `all', attach files as external parts; +if a regexp and matches the Gcc group name, attach files as external parts; +If nil, attach files as normal parts." + :group 'gnus-message + :type '(choice (const nil :tag "None") + (const all :tag "Any") + (string :tag "Regexp"))) + (defcustom gnus-group-posting-charset-alist '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1)) ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \t\n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$" koi8-r (koi8-r)) @@ -558,12 +574,19 @@ a news." (defun gnus-summary-followup (yank &optional force-news) "Compose a followup to an article. -If prefix argument YANK is non-nil, original article is yanked automatically." +If prefix argument YANK is non-nil, the original article is yanked +automatically. +YANK is a list of elements, where the car of each element is the +article number, and the two following numbers is the region to be +yanked." (interactive (list (and current-prefix-arg (gnus-summary-work-articles 1)))) (when yank - (gnus-summary-goto-subject (car yank))) + (gnus-summary-goto-subject + (if (listp (car yank)) + (caar yank) + (car yank)))) (save-window-excursion (gnus-summary-select-article)) (let ((headers (gnus-summary-article-header (gnus-summary-article-number))) @@ -591,11 +614,15 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (gnus-summary-followup (gnus-summary-work-articles arg) t)) (defun gnus-inews-yank-articles (articles) - (let ((more-than-one (cdr articles)) - (cur (current-buffer)) - refs beg article window) + (let (beg article yank-string + (more-than-one (cdr articles)) + (cur (current-buffer)) + refs window) (message-goto-body) (while (setq article (pop articles)) + (when (listp article) + (setq yank-string (nth 1 article) + article (nth 0 article))) (save-window-excursion (set-buffer gnus-summary-buffer) (gnus-summary-select-article nil nil nil article) @@ -611,11 +638,11 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (when (setq window (get-buffer-window cur t)) (select-frame (window-frame window))))) - (gnus-copy-article-buffer) + (gnus-copy-article-buffer nil yank-string) (let ((message-reply-buffer gnus-article-copy) (message-reply-headers + ;; The headers are decoded. (with-current-buffer gnus-article-copy - ;; The headers are decoded. (nnheader-parse-head t)))) (message-yank-original) (setq beg (or beg (mark t)))) @@ -687,7 +714,7 @@ header line with the old Message-ID." -(defun gnus-copy-article-buffer (&optional article-buffer) +(defun gnus-copy-article-buffer (&optional article-buffer yank-string) ;; make a copy of the article buffer with all text properties removed ;; this copy is in the buffer gnus-article-copy. ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used @@ -712,6 +739,10 @@ header line with the old Message-ID." (let ((inhibit-read-only t)) (copy-to-buffer gnus-article-copy (point-min) (point-max)) (set-buffer gnus-article-copy) + (when yank-string + (message-goto-body) + (delete-region (point) (point-max)) + (insert yank-string)) ;; Encode bitmap smileys to ordinary text. ;; Possibly, the original text might be restored. (static-unless (featurep 'xemacs) @@ -735,8 +766,8 @@ header line with the old Message-ID." (goto-char (point-min)) (while (looking-at message-unix-mail-delimiter) (forward-line 1)) - (setq beg (point)) - (setq end (or (message-goto-body) beg)) + (setq beg (point) + end (or (message-goto-body) beg)) ;; Delete the headers from the displayed articles. (set-buffer gnus-article-copy) (delete-region (goto-char (point-min)) @@ -1004,11 +1035,15 @@ If VERY-WIDE, make a very wide reply." (interactive (list (and current-prefix-arg (gnus-summary-work-articles 1)))) - ;; Stripping headers should be specified with mail-yank-ignored-headers. - (when yank - (gnus-summary-goto-subject (car yank))) - (let ((gnus-article-reply (or yank (gnus-summary-article-number))) - (headers "")) + (let* ((article + (if (listp (car yank)) + (caar yank) + (car yank))) + (gnus-article-reply (or article (gnus-summary-article-number))) + (headers "")) + ;; Stripping headers should be specified with mail-yank-ignored-headers. + (when yank + (gnus-summary-goto-subject article)) (gnus-setup-message (if yank 'reply-yank 'reply) (if (not very-wide) (gnus-summary-select-article) @@ -1165,7 +1200,14 @@ forward those articles instead." (defun gnus-summary-resend-message (address n) "Resend the current article to ADDRESS." (interactive - (list (message-read-from-minibuffer "Resend message(s) to: ") + (list (message-read-from-minibuffer + "Resend message(s) to: " + (when (gnus-buffer-live-p gnus-original-article-buffer) + ;; If some other article is currently selected, the + ;; initial-contents is wrong. Whatever, it is just the + ;; initial-contents. + (with-current-buffer gnus-original-article-buffer + (nnmail-fetch-field "to")))) current-prefix-arg)) (let ((articles (gnus-summary-work-articles n)) article) @@ -1352,7 +1394,9 @@ If YANK is non-nil, include the original article." (insert nntp-server-type)) (insert "\n\n\n\n\n") (let (mime-content-types) - (mime-edit-insert-tag "text" "plain" "; type=emacs-lisp")) + (mime-edit-insert-tag + "application" "emacs-lisp" + "\nContent-Disposition: inline\nContent-Description: User settings")) (insert (with-temp-buffer (gnus-debug) (buffer-string))) @@ -1510,7 +1554,8 @@ this is a reply." (let ((gcc (or gcc (mail-fetch-field "gcc" nil t))) (coding-system-for-write 'raw-text) (output-coding-system 'raw-text) - groups group method group-art) + groups group method group-art + mml-externalize-attachments) (when gcc (message-remove-header "gcc") (widen) @@ -1524,6 +1569,10 @@ this is a reply." (car method)))) (unless (gnus-request-group group nil method) (gnus-request-create-group group method)) + (setq mml-externalize-attachments + (if (stringp gnus-gcc-externalize-attachments) + (string-match gnus-gcc-externalize-attachments group) + gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (insert-buffer-substring message-encoding-buffer) @@ -1538,7 +1587,9 @@ this is a reply." (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method)) (sit-for 2)) - (when (and group-art gnus-inews-mark-gcc-as-read) + (when (and group-art + (or gnus-gcc-mark-as-read + gnus-inews-mark-gcc-as-read)) (gnus-group-mark-article-read group (cdr group-art))) (kill-buffer (current-buffer))))))))) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 359aad5..ae2d107 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -1,6 +1,6 @@ ;;; gnus-picon.el --- displaying pretty icons in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Wes Hardaker @@ -46,32 +46,21 @@ ;;; User variables: -(defgroup picon nil - "Show pictures of people, domains, and newsgroups." - :group 'gnus-visual) - -(defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces") - "*Defines the location of the faces database. -For information on obtaining this database of pretty pictures, please -see http://www.cs.indiana.edu/picons/ftp/index.html" - :type 'directory - :group 'picon) - (defcustom gnus-picon-news-directories '("news") "*List of directories to search for newsgroups faces." :type '(repeat string) - :group 'picon) + :group 'gnus-picon) (defcustom gnus-picon-user-directories '("users" "usenix" "local" "misc") "*List of directories to search for user faces." :type '(repeat string) - :group 'picon) + :group 'gnus-picon) (defcustom gnus-picon-domain-directories '("domains") "*List of directories to search for domain faces. Some people may want to add \"unknown\" to this list." :type '(repeat string) - :group 'picon) + :group 'gnus-picon) (defcustom gnus-picon-file-types (let ((types (list "xbm"))) @@ -82,15 +71,15 @@ Some people may want to add \"unknown\" to this list." types) "*List of suffixes on picon file names to try." :type '(repeat string) - :group 'picon) + :group 'gnus-picon) (defface gnus-picon-xbm-face '((t (:foreground "black" :background "white"))) "Face to show xbm picon in." - :group 'picon) + :group 'gnus-picon) (defface gnus-picon-face '((t (:foreground "black" :background "white"))) "Face to show picon in." - :group 'picon) + :group 'gnus-picon) ;;; Internal variables: @@ -98,6 +87,7 @@ Some people may want to add \"unknown\" to this list." (defvar gnus-picon-glyph-alist nil "Picon glyphs cache. List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.") +(defvar gnus-picon-cache nil) ;;; Functions: @@ -109,29 +99,30 @@ List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.") (split-string (car address) "\\.")))) (defun gnus-picon-find-face (address directories &optional exact) - (let* ((databases gnus-picon-databases) - (address (gnus-picon-split-address address)) + (let* ((address (gnus-picon-split-address address)) (user (pop address)) - database directory found instance base) - (while (and (not found) - (setq database (pop databases))) - (while (and (not found) - (setq directory (pop directories))) - (setq base (expand-file-name directory database)) - ;; Kludge to search misc/MISC for users. - (when (string= directory "misc") - (setq address '("MISC"))) - (while (and (not found) - address) - (setq found (gnus-picon-find-image - (concat base "/" (mapconcat 'identity - (reverse address) - "/") - "/" user "/"))) - (if exact - (setq address nil) - (pop address))))) - found)) + (faddress address) + database directory result instance base) + (catch 'found + (dolist (database gnus-picon-databases) + (dolist (directory directories) + (setq address faddress + base (expand-file-name directory database)) + (while address + (when (setq result (gnus-picon-find-image + (concat base "/" (mapconcat 'downcase + (reverse address) + "/") + "/" (downcase user) "/"))) + (throw 'found result)) + (if exact + (setq address nil) + (pop address))) + ;; Kludge to search MISC as well. But not in "news". + (unless (string= directory "news") + (when (setq result (gnus-picon-find-image + (concat base "/MISC/" user "/"))) + (throw 'found result)))))))) (defun gnus-picon-find-image (directory) (let ((types gnus-picon-file-types) @@ -163,67 +154,78 @@ GLYPH can be either a glyph or a string." (gnus-with-article-headers (let ((addresses (mail-header-parse-addresses (mail-fetch-field header))) - first spec file) + spec file point cache) (dolist (address addresses) - (setq address (car address) - first t) + (setq address (car address)) (when (and (stringp address) (setq spec (gnus-picon-split-address address))) - (when (setq file (gnus-picon-find-face - address gnus-picon-user-directories)) - (setcar spec (cons (gnus-picon-create-glyph file) - (car spec)))) - (dotimes (i (1- (length spec))) - (when (setq file (gnus-picon-find-face - (concat "unknown@" - (mapconcat - 'identity (nthcdr (1+ i) spec) ".")) - gnus-picon-domain-directories t)) - (setcar (nthcdr (1+ i) spec) - (cons (gnus-picon-create-glyph file) - (nth (1+ i) spec))))) + (if (setq cache (cdr (assoc address gnus-picon-cache))) + (setq spec cache) + (when (setq file (or (gnus-picon-find-face + address gnus-picon-user-directories) + (gnus-picon-find-face + (concat "unknown@" + (mapconcat + 'identity (cdr spec) ".")) + gnus-picon-user-directories))) + (setcar spec (cons (gnus-picon-create-glyph file) + (car spec)))) + + (dotimes (i (1- (length spec))) + (when (setq file (gnus-picon-find-face + (concat "unknown@" + (mapconcat + 'identity (nthcdr (1+ i) spec) ".")) + gnus-picon-domain-directories t)) + (setcar (nthcdr (1+ i) spec) + (cons (gnus-picon-create-glyph file) + (nth (1+ i) spec))))) + (setq spec (nreverse spec)) + (push (cons address spec) gnus-picon-cache)) (gnus-article-goto-header header) (mail-header-narrow-to-field) (when (search-forward address nil t) (delete-region (match-beginning 0) (match-end 0)) + (setq point (point)) (while spec - (gnus-picon-insert-glyph (pop spec) category) - (when spec - (if (not first) - (insert ".") - (insert "@") - (setq first nil)))))))))) + (goto-char point) + (if (> (length spec) 2) + (insert ".") + (if (= (length spec) 2) + (insert "@"))) + (gnus-picon-insert-glyph (pop spec) category)))))))) (defun gnus-picon-transform-newsgroups (header) (interactive) (gnus-with-article-headers - (let ((groups - (sort - (message-tokenize-header (mail-fetch-field header)) - (lambda (g1 g2) (> (length g1) (length g2))))) - spec file) + (gnus-article-goto-header header) + (mail-header-narrow-to-field) + (let ((groups (message-tokenize-header (mail-fetch-field header))) + spec file point) (dolist (group groups) - (setq spec (nreverse (split-string group "[.]"))) - (dotimes (i (length spec)) - (when (setq file (gnus-picon-find-face - (concat "unknown@" - (mapconcat - 'identity (nthcdr i spec) ".")) - gnus-picon-news-directories t)) - (setcar (nthcdr i spec) - (cons (gnus-picon-create-glyph file) - (nth i spec))))) - - (gnus-article-goto-header header) - (mail-header-narrow-to-field) + (unless (setq spec (cdr (assoc group gnus-picon-cache))) + (setq spec (nreverse (split-string group "[.]"))) + (dotimes (i (length spec)) + (when (setq file (gnus-picon-find-face + (concat "unknown@" + (mapconcat + 'identity (nthcdr i spec) ".")) + gnus-picon-news-directories t)) + (setcar (nthcdr i spec) + (cons (gnus-picon-create-glyph file) + (nth i spec))))) + (push (cons group spec) gnus-picon-cache)) (when (search-forward group nil t) (delete-region (match-beginning 0) (match-end 0)) - (setq spec (nreverse spec)) - (while spec - (gnus-picon-insert-glyph (pop spec) 'newsgroups-picon) - (when spec - (insert ".")))))))) + (save-restriction + (narrow-to-region (point) (point)) + (while spec + (goto-char (point-min)) + (if (> (length spec) 1) + (insert ".")) + (gnus-picon-insert-glyph (pop spec) 'newsgroups-picon)) + (goto-char (point-max)))))))) ;;; Commands: diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 171c026..30eb81e 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1,5 +1,5 @@ ;;; gnus-score.el --- scoring code for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Per Abrahamsen @@ -678,7 +678,7 @@ used as score." (and gnus-extra-headers (equal (nth 1 entry) "extra") (intern ; need symbol - (gnus-completing-read + (gnus-completing-read-with-default (symbol-name (car gnus-extra-headers)) ; default response "Score extra header:" ; prompt (mapcar (lambda (x) ; completion list @@ -1243,7 +1243,6 @@ EXTRA is the possible non-standard header." (setq gnus-newsgroup-adaptive t) adapt) (t - ;;(setq gnus-newsgroup-adaptive gnus-use-adaptive-scoring) gnus-default-adaptive-score-alist))) (setq gnus-thread-expunge-below (or thread-mark-and-expunge gnus-thread-expunge-below)) diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index a931c83..eec204e 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -1,5 +1,5 @@ ;;; gnus-spec.el --- format spec functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -76,6 +76,8 @@ (defvar gnus-tmp-article-number) (defvar gnus-mouse-face) (defvar gnus-mouse-face-prop) +(defvar gnus-tmp-header) +(defvar gnus-tmp-from) (defun gnus-summary-line-format-spec () (insert gnus-tmp-unread gnus-tmp-replied @@ -84,13 +86,15 @@ (point) (progn (insert - gnus-tmp-opening-bracket - (format "%4d: %-20s" - gnus-tmp-lines - (if (> (length gnus-tmp-name) 20) - (substring gnus-tmp-name 0 20) - gnus-tmp-name)) - gnus-tmp-closing-bracket) + (format "%c%4s: %-23s%c" gnus-tmp-opening-bracket gnus-tmp-lines + (let ((val + (inline + (gnus-summary-from-or-to-or-newsgroups + gnus-tmp-header gnus-tmp-from)))) + (if (> (length val) 23) + (substring val 0 23) + val)) + gnus-tmp-closing-bracket)) (point)) gnus-mouse-face-prop gnus-mouse-face) (insert " " gnus-tmp-subject-or-nil "\n")) @@ -129,10 +133,12 @@ `((group ("%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec)) (summary-dummy ("* %(: :%) %S\n" ,gnus-summary-dummy-line-format-spec)) - (summary ("%U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n" + (summary ("%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n" ,gnus-summary-line-format-spec))) "Alist of format specs.") +(defvar gnus-default-format-specs gnus-format-specs) + (defvar gnus-format-specs-compiled nil "Alist of compiled format specs. Each element should be the form: \(TYPE (FORMAT-STRING-1 . COMPILED-FUNCTION-1) @@ -332,15 +338,29 @@ (setq wend seek) (substring string wstart (1- wend)))) +(defun gnus-string-width-function () + (cond + (gnus-use-correct-string-widths + 'gnus-correct-length) + ((fboundp 'string-width) + 'string-width) + (t + 'length))) + +(defun gnus-substring-function () + (cond + (gnus-use-correct-string-widths + 'gnus-correct-substring) + ((fboundp 'string-width) + 'gnus-correct-substring) + (t + 'substring))) + (defun gnus-tilde-max-form (el max-width) "Return a form that limits EL to MAX-WIDTH." (let ((max (abs max-width)) - (length-fun (if gnus-use-correct-string-widths - 'gnus-correct-length - 'length)) - (substring-fun (if gnus-use-correct-string-widths - 'gnus-correct-substring - 'substring))) + (length-fun (gnus-string-width-function)) + (substring-fun (gnus-substring-function))) (if (symbolp el) `(if (> (,length-fun ,el) ,max) ,(if (< max-width 0) @@ -357,12 +377,8 @@ (defun gnus-tilde-cut-form (el cut-width) "Return a form that cuts CUT-WIDTH off of EL." (let ((cut (abs cut-width)) - (length-fun (if gnus-use-correct-string-widths - 'gnus-correct-length - 'length)) - (substring-fun (if gnus-use-correct-string-widths - 'gnus-correct-substring - 'substring))) + (length-fun (gnus-string-width-function)) + (substring-fun (gnus-substring-function))) (if (symbolp el) `(if (> (,length-fun ,el) ,cut) ,(if (< cut-width 0) @@ -385,26 +401,31 @@ (if (equal val ,ignore-value) "" val)))) -(defun gnus-correct-pad-form (el pad-width) +(defun gnus-pad-form (el pad-width) "Return a form that pads EL to PAD-WIDTH accounting for multi-column characters correctly. This is because `format' may pad to columns or to characters when given a pad value." (let ((pad (abs pad-width)) (side (< 0 pad-width))) (if (symbolp el) - `(let ((need (- ,pad (gnus-correct-length ,el)))) + `(let ((need (- ,pad (,(if gnus-use-correct-string-widths + 'gnus-correct-length + 'length) + ,el)))) (if (> need 0) (concat ,(when side '(make-string need ?\ )) ,el ,(when (not side) '(make-string need ?\ ))) ,el)) `(let* ((val (eval ,el)) - (need (- ,pad (gnus-correct-length ,el)))) + (need (- ,pad (,(if gnus-use-correct-string-widths + 'gnus-correct-length + 'length) val)))) (if (> need 0) (concat ,(when side '(make-string need ?\ )) - ,el + val ,(when (not side) '(make-string need ?\ ))) - ,el))))) + val))))) (defun gnus-parse-format (format spec-alist &optional insert) ;; This function parses the FORMAT string with the help of the @@ -415,9 +436,9 @@ characters when given a pad value." ;; them will have the balloon-help text property. (let ((case-fold-search nil)) (if (string-match - "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'" - format) - (gnus-parse-complex-format format spec-alist) + "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=" + format) + (gnus-parse-complex-format format spec-alist) ;; This is a simple format. (gnus-parse-simple-format format spec-alist insert)))) @@ -612,7 +633,7 @@ characters when given a pad value." (when max-width (setq el (gnus-tilde-max-form el max-width))) (when pad-width - (setq el (gnus-correct-pad-form el pad-width))) + (setq el (gnus-pad-form el pad-width))) (push el flist))) (insert elem-type) (push (car elem) flist)))) diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index e49c9fe..9d6b543 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -1,5 +1,5 @@ ;;; gnus-srvr.el --- virtual server support for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -55,7 +55,11 @@ The following specs are understood: %n name %w address %s status -%a agent covered" +%a agent covered + +General format specifiers can also be used. +See (gnus)Formatting Variables." + :link '(custom-manual "(gnus)Formatting Variables") :group 'gnus-server-visual :type 'string) @@ -117,6 +121,7 @@ If nil, a faster, but more primitive, buffer is used instead." '("Connections" ["Open" gnus-server-open-server t] ["Close" gnus-server-close-server t] + ["Offline" gnus-server-offline-server t] ["Deny" gnus-server-deny-server t] "---" ["Open All" gnus-server-open-all-servers t] @@ -150,6 +155,7 @@ If nil, a faster, but more primitive, buffer is used instead." "C" gnus-server-close-server "\M-c" gnus-server-close-all-servers "D" gnus-server-deny-server + "L" gnus-server-offline-server "R" gnus-server-remove-denials "n" next-line @@ -189,6 +195,13 @@ If nil, a faster, but more primitive, buffer is used instead." "Face used for displaying DENIED servers" :group 'gnus-server-visual) +(defface gnus-server-offline-face + '((((class color) (background light)) (:foreground "Orange" :bold t)) + (((class color) (background dark)) (:foreground "Yellow" :bold t)) + (t (:inverse-video t :bold t))) + "Face used for displaying OFFLINE servers" + :group 'gnus-server-visual) + (defcustom gnus-server-agent-face 'gnus-server-agent-face "Face name to use on AGENTIZED servers." :group 'gnus-server-visual @@ -209,11 +222,17 @@ If nil, a faster, but more primitive, buffer is used instead." :group 'gnus-server-visual :type 'face) +(defcustom gnus-server-offline-face 'gnus-server-offline-face + "Face name to use on OFFLINE servers." + :group 'gnus-server-visual + :type 'face) + (defvar gnus-server-font-lock-keywords (list '("(\\(agent\\))" 1 gnus-server-agent-face) '("(\\(opened\\))" 1 gnus-server-opened-face) '("(\\(closed\\))" 1 gnus-server-closed-face) + '("(\\(offline\\))" 1 gnus-server-offline-face) '("(\\(denied\\))" 1 gnus-server-denied-face))) (defun gnus-server-mode () @@ -251,14 +270,16 @@ The following commands are available: (gnus-tmp-where (nth 1 method)) (elem (assoc method gnus-opened-servers)) (gnus-tmp-status - (if (eq (nth 1 elem) 'denied) - "(denied)" + (cond + ((eq (nth 1 elem) 'denied) "(denied)") + ((eq (nth 1 elem) 'offline) "(offline)") + (t (condition-case nil (if (or (gnus-server-opened method) (eq (nth 1 elem) 'ok)) "(opened)" "(closed)") - ((error) "(error)")))) + ((error) "(error)"))))) (gnus-tmp-agent (if (and gnus-agent (member method gnus-agent-covered-methods)) @@ -477,6 +498,18 @@ The following commands are available: (gnus-server-update-server server) (gnus-server-position-point)))) +(defun gnus-server-offline-server (server) + "Set SERVER to offline." + (interactive (list (gnus-server-server-name))) + (let ((method (gnus-server-to-method server))) + (unless method + (error "No such server: %s" server)) + (prog1 + (gnus-close-server method) + (gnus-server-set-status method 'offline) + (gnus-server-update-server server) + (gnus-server-position-point)))) + (defun gnus-server-close-all-servers () "Close all servers." (interactive) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 6fc26cc..705b9ce 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1,5 +1,5 @@ ;;; gnus-start.el --- startup functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -415,17 +415,14 @@ Can be used to turn version control on or off." :group 'gnus-newsrc :type 'boolean) -(defvar gnus-startup-file-coding-system (static-if (boundp 'MULE) - '*ctext* - 'ctext) - "*Coding system for startup file.") +;;; Internal variables -(defvar gnus-ding-file-coding-system gnus-startup-file-coding-system - "*Coding system for ding file.") +(defvar gnus-ding-file-coding-system (static-if (boundp 'MULE) + '*ctext* + 'ctext) + "Coding system for ding file.") ;; Note that the ding file for T-gnus ought not to have byte-codes. -;;; Internal variables - (defvar gnus-newsrc-file-version nil) (defvar gnus-override-subscribe-method nil) (defvar gnus-dribble-buffer nil) @@ -452,21 +449,15 @@ Can be used to turn version control on or off." (if gnus-init-inhibit (setq gnus-init-inhibit nil) (setq gnus-init-inhibit inhibit-next) - (let ((files (list gnus-site-init-file gnus-init-file)) - file) - (while files - (and (setq file (pop files)) - (or (and (file-exists-p file) - ;; Don't try to load a directory. - (not (file-directory-p file))) - (file-exists-p (concat file ".el")) - (file-exists-p (concat file ".elc"))) - (if (or debug-on-error debug-on-quit) - (load file nil t) - (condition-case var - (load file nil t) - (error - (error "Error in %s: %s" file var)))))))))) + (dolist (file (list gnus-site-init-file gnus-init-file)) + (when (and file + (locate-library file)) + (if (or debug-on-error debug-on-quit) + (load file nil t) + (condition-case var + (load file nil t) + (error + (error "Error in %s: %s" file var))))))))) ;; For subscribing new newsgroup @@ -1624,7 +1615,7 @@ newsgroup." (when (and (<= (gnus-info-level info) foreign-level) (setq active (gnus-activate-group group 'scan))) ;; Let the Gnus agent save the active file. - (when (and gnus-agent gnus-plugged active) + (when (and gnus-agent active (gnus-online method)) (gnus-agent-save-group-info method (gnus-group-real-name group) active)) (unless (inline (gnus-virtual-group-p group)) @@ -1931,7 +1922,7 @@ newsgroup." (insert ?\\))) ;; Let the Gnus agent save the active file. - (when (and gnus-agent real-active gnus-plugged) + (when (and gnus-agent real-active (gnus-online method)) (gnus-agent-save-active method)) ;; If these are groups from a foreign select method, we insert the @@ -2007,7 +1998,7 @@ newsgroup." ;; Let the Gnus agent save the active file. (if (and gnus-agent real-active - gnus-plugged + (gnus-online method) (gnus-agent-method-p method)) (progn (gnus-agent-save-groups method) @@ -2104,6 +2095,14 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-yes-or-no-p (format "Error in %s; continue? " ding-file)) (error "Error in %s" ding-file)))))) +;; ;; Older versions of `gnus-format-specs' are no longer valid +;; ;; in Oort Gnus 0.01. +;; (let ((version +;; (and gnus-newsrc-file-version +;; (gnus-continuum-version gnus-newsrc-file-version)))) +;; (when (or (not version) +;; (< version 5.090009)) +;; (setq gnus-format-specs gnus-default-format-specs))) (when gnus-newsrc-assoc (setq gnus-newsrc-alist gnus-newsrc-assoc)))) (gnus-make-hashtable-from-newsrc-alist) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index a7dae60..05f181f 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1,5 +1,5 @@ ;;; gnus-sum.el --- summary mode commands for Semi-gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -246,6 +246,7 @@ simplification is selected." (defcustom gnus-thread-hide-subtree nil "*If non-nil, hide all threads initially. +This can be a predicate specifier which says which threads to hide. If threads are hidden, you have to run the command `gnus-summary-show-thread' by hand or use `gnus-select-article-hook' to expose hidden threads." @@ -306,13 +307,16 @@ This variable can either be the symbols `first' (place point on the first subject), `unread' (place point on the subject line of the first unread article), `best' (place point on the subject line of the higest-scored article), `unseen' (place point on the subject line of -the first unseen article), or a function to be called to place point on -some subject line.." +the first unseen article), 'unseen-or-unread' (place point on the subject +line of the first unseen article or, if all article have been seen, on the +subject line of the first unread article), or a function to be called to +place point on some subject line.." :group 'gnus-group-select :type '(choice (const best) (const unread) (const first) - (const unseen))) + (const unseen) + (const unseen-or-unread))) (defcustom gnus-dont-select-after-jump-to-other-group nil "If non-nil, don't select the first unread article after entering the @@ -597,7 +601,11 @@ list of parameters to that command." It works along the same lines as a normal formatting string, with some simple extensions. -%S The subject" +%S The subject + +General format specifiers can also be used. +See (gnus)Formatting Variables." + :link '(custom-manual "(gnus)Formatting Variables") :group 'gnus-threading :type 'string) @@ -682,7 +690,9 @@ was sent, sorting by number means sorting by arrival time.) Ready-made functions include `gnus-thread-sort-by-number', `gnus-thread-sort-by-author', `gnus-thread-sort-by-subject', -`gnus-thread-sort-by-date', `gnus-thread-sort-by-score' and +`gnus-thread-sort-by-date', `gnus-thread-sort-by-score', +`gnus-thread-sort-by-most-recent-number', +`gnus-thread-sort-by-most-recent-date', and `gnus-thread-sort-by-total-score' (see `gnus-thread-score-function'). When threading is turned off, the variable @@ -774,15 +784,14 @@ If you'd like to simplify subjects like the `gnus-summary-next-same-subject' command does, you can use the following hook: - (setq gnus-select-group-hook - (list - (lambda () - (mapcar (lambda (header) - (mail-header-set-subject - header - (gnus-simplify-subject - (mail-header-subject header) 're-only))) - gnus-newsgroup-headers))))" + (add-hook gnus-select-group-hook + (lambda () + (mapcar (lambda (header) + (mail-header-set-subject + header + (gnus-simplify-subject + (mail-header-subject header) 're-only))) + gnus-newsgroup-headers)))" :group 'gnus-group-select :type 'hook) @@ -922,7 +931,7 @@ which it may alter in any way.") (mime-find-field-decoder 'From 'nov) "Variable that says which function should be used to decode a string with encoded words.") -(defcustom gnus-extra-headers nil +(defcustom gnus-extra-headers '(To Newsgroups) "*Extra headers to parse." :version "21.1" :group 'gnus-summary @@ -1741,9 +1750,7 @@ increase the score of each group you read." "l" gnus-summary-stop-page-breaking "r" gnus-summary-caesar-message "t" gnus-article-toggle-headers - "g" gnus-summary-toggle-smiley - "u" gnus-article-treat-unfold-headers - "n" gnus-article-treat-fold-newsgroups + "g" gnus-treat-smiley "v" gnus-summary-verbose-headers "m" gnus-summary-toggle-mime "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive @@ -1769,9 +1776,15 @@ increase the score of each group you read." "c" gnus-article-highlight-citation "s" gnus-article-highlight-signature) + (gnus-define-keys (gnus-summary-wash-header-map "G" gnus-summary-wash-map) + "f" gnus-article-treat-fold-headers + "u" gnus-article-treat-unfold-headers + "n" gnus-article-treat-fold-newsgroups) + (gnus-define-keys (gnus-summary-wash-display-map "D" gnus-summary-wash-map) "x" gnus-article-display-x-face - "s" gnus-summary-toggle-smiley + "s" gnus-treat-smiley + "D" gnus-article-remove-images "f" gnus-treat-from-picon "m" gnus-treat-mail-picon "n" gnus-treat-newsgroups-picon) @@ -1905,7 +1918,8 @@ increase the score of each group you read." ["Lapsed" gnus-article-date-lapsed t] ["User-defined" gnus-article-date-user t]) ("Display" - ["Toggle smiley" gnus-summary-toggle-smiley t] + ["Remove images" gnus-article-remove-images t] + ["Toggle smiley" gnus-treat-smiley t] ["Show X-Face" gnus-article-display-x-face t] ["Show picons in From" gnus-treat-from-picon t] ["Show picons in mail headers" gnus-treat-mail-picon t] @@ -2005,7 +2019,7 @@ increase the score of each group you read." ["Fetch article with id..." gnus-summary-refer-article t] ["Setup Mailing List Params" gnus-mailing-list-insinuate t] ["Redisplay" gnus-summary-show-article t] - ["Raw article" gnus-summary-show-raw-article t]))) + ["Raw article" gnus-summary-show-raw-article :keys "C-u g"]))) (easy-menu-define gnus-summary-article-menu gnus-summary-mode-map "" (cons "Article" innards)) @@ -2060,6 +2074,10 @@ increase the score of each group you read." ["Wide reply and yank" gnus-summary-wide-reply-with-original ,@(if (featurep 'xemacs) '(t) '(:help "Mail a reply, quoting this article"))] + ["Very wide reply" gnus-summary-very-wide-reply t] + ["Very wide reply and yank" gnus-summary-very-wide-reply-with-original + ,@(if (featurep 'xemacs) '(t) + '(:help "Mail a very wide reply, quoting this article"))] ["Mail forward" gnus-summary-mail-forward t] ["Post forward" gnus-summary-post-forward t] ["Digest and mail" gnus-summary-digest-mail-forward t] @@ -2810,7 +2828,12 @@ display only a single character." (defun gnus-summary-setup-buffer (group) "Initialize summary buffer." - (let ((buffer (gnus-summary-buffer-name group))) + (let ((buffer (gnus-summary-buffer-name group)) + (dead-name (concat "*Dead Summary " + (gnus-group-decoded-name group) "*"))) + ;; If a dead summary buffer exists, we kill it. + (when (gnus-buffer-live-p dead-name) + (gnus-kill-buffer dead-name)) (if (get-buffer buffer) (progn (set-buffer buffer) @@ -2970,11 +2993,12 @@ buffer that was in action when the last article was fetched." (cond ((setq to (cdr (assq 'To extra-headers))) (concat "-> " - (gnus-summary-extract-address-component - (funcall gnus-decode-encoded-word-function to)))) + (inline + (gnus-summary-extract-address-component + (funcall gnus-decode-encoded-word-function to))))) ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) (concat "=> " newsgroups))))) - (gnus-summary-extract-address-component gnus-tmp-from)))) + (inline (gnus-summary-extract-address-component gnus-tmp-from))))) (defun gnus-summary-insert-line (gnus-tmp-header gnus-tmp-level gnus-tmp-current @@ -3287,9 +3311,7 @@ If SHOW-ALL is non-nil, already read articles are also listed." ;; Hide conversation thread subtrees. We cannot do this in ;; gnus-summary-prepare-hook since kill processing may not ;; work with hidden articles. - (and gnus-show-threads - gnus-thread-hide-subtree - (gnus-summary-hide-all-threads)) + (gnus-summary-maybe-hide-threads) (when kill-buffer (gnus-kill-or-deaden-summary kill-buffer)) (gnus-summary-auto-select-subject) @@ -3300,7 +3322,10 @@ If SHOW-ALL is non-nil, already read articles are also listed." gnus-auto-select-first) (progn (gnus-configure-windows 'summary) - (gnus-summary-goto-article (gnus-summary-article-number))) + (let ((art (gnus-summary-article-number))) + (unless (or (memq art gnus-newsgroup-undownloaded) + (memq art gnus-newsgroup-downloadable)) + (gnus-summary-goto-article art)))) ;; Don't select any articles. (gnus-summary-position-point) (gnus-configure-windows 'summary 'force) @@ -3328,6 +3353,8 @@ If SHOW-ALL is non-nil, already read articles are also listed." (gnus-summary-first-unread-subject)) ((eq gnus-auto-select-subject 'unseen) (gnus-summary-first-unseen-subject)) + ((eq gnus-auto-select-subject 'unseen-or-unread) + (gnus-summary-first-unseen-or-unread-subject)) ((eq gnus-auto-select-subject 'first) ;; Do nothing. ) @@ -3430,7 +3457,7 @@ If SHOW-ALL is non-nil, already read articles are also listed." (while threads (when (setq references (mail-header-references (caar threads))) (setq id (mail-header-id (caar threads)) - ids (gnus-split-references references) + ids (inline (gnus-split-references references)) entered nil) (while (setq ref (pop ids)) (setq ids (delete ref ids)) @@ -4165,15 +4192,47 @@ Unscored articles will be counted as having a score of zero." (defun gnus-thread-total-score (thread) ;; This function find the total score of THREAD. - (cond ((null thread) - 0) - ((consp thread) - (if (stringp (car thread)) - (apply gnus-thread-score-function 0 - (mapcar 'gnus-thread-total-score-1 (cdr thread))) - (gnus-thread-total-score-1 thread))) - (t - (gnus-thread-total-score-1 (list thread))))) + (cond + ((null thread) + 0) + ((consp thread) + (if (stringp (car thread)) + (apply gnus-thread-score-function 0 + (mapcar 'gnus-thread-total-score-1 (cdr thread))) + (gnus-thread-total-score-1 thread))) + (t + (gnus-thread-total-score-1 (list thread))))) + +(defun gnus-thread-sort-by-most-recent-number (h1 h2) + "Sort threads such that the thread with the most recently arrived article comes first." + (> (gnus-thread-highest-number h1) (gnus-thread-highest-number h2))) + +(defun gnus-thread-highest-number (thread) + "Return the highest article number in THREAD." + (apply 'max (mapcar (lambda (header) + (mail-header-number header)) + (message-flatten-list thread)))) + +(defun gnus-thread-sort-by-most-recent-date (h1 h2) + "Sort threads such that the thread with the most recently dated article comes first." + (> (gnus-thread-latest-date h1) (gnus-thread-latest-date h2))) + +(defun gnus-thread-latest-date (thread) + "Return the highest article date in THREAD." + (let ((previous-time 0)) + (apply 'max (mapcar + (lambda (header) + (setq previous-time + (time-to-seconds + (mail-header-parse-date + (condition-case () + (mail-header-date header) + (error previous-time)))))) + (sort + (message-flatten-list thread) + (lambda (h1 h2) + (< (mail-header-number h1) + (mail-header-number h2)))))))) (defun gnus-thread-total-score-1 (root) ;; This function find the total score of the thread below ROOT. @@ -4956,8 +5015,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." ((eq mark-type 'range) (cond ((eq mark 'seen) - ;; T-gnus change: Fix the record for `seen' if it looks like - ;; (seen NUM1 . NUM2). It should be (seen (NUM1 . NUM2)). + ;; Fix the record for `seen' if it looks like (seen NUM1 . NUM2). + ;; It should be (seen (NUM1 . NUM2)). (when (numberp (cddr marks)) (setcdr marks (list (cdr marks)))) (setq articles (cdr marks)) @@ -6188,10 +6247,11 @@ The state which existed when entering the ephemeral is reset." (suppress-keymap gnus-dead-summary-mode-map) (substitute-key-definition 'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map) - (let ((keys '("\C-d" "\r" "\177" [delete]))) - (while keys - (define-key gnus-dead-summary-mode-map - (pop keys) 'gnus-summary-wake-up-the-dead)))) + (dolist (key '("\C-d" "\r" "\177" [delete])) + (define-key gnus-dead-summary-mode-map + key 'gnus-summary-wake-up-the-dead)) + (dolist (key '("q" "Q")) + (define-key gnus-dead-summary-mode-map key 'bury-buffer))) (defvar gnus-dead-summary-mode nil "Minor mode for Gnus summary buffers.") @@ -6237,17 +6297,20 @@ The state which existed when entering the ephemeral is reset." (set-buffer buffer) (gnus-kill-buffer gnus-article-buffer) (gnus-kill-buffer gnus-original-article-buffer))) - (cond (gnus-kill-summary-on-exit - (when (and gnus-use-trees - (gnus-buffer-exists-p buffer)) - (save-excursion - (set-buffer buffer) - (gnus-tree-close gnus-newsgroup-name))) - (gnus-kill-buffer buffer)) - ((gnus-buffer-exists-p buffer) - (save-excursion - (set-buffer buffer) - (gnus-deaden-summary)))))) + (cond + ;; Kill the buffer. + (gnus-kill-summary-on-exit + (when (and gnus-use-trees + (gnus-buffer-exists-p buffer)) + (save-excursion + (set-buffer buffer) + (gnus-tree-close gnus-newsgroup-name))) + (gnus-kill-buffer buffer)) + ;; Deaden the buffer. + ((gnus-buffer-exists-p buffer) + (save-excursion + (set-buffer buffer) + (gnus-deaden-summary)))))) (defun gnus-summary-wake-up-the-dead (&rest args) "Wake up the dead summary buffer." @@ -6373,9 +6436,12 @@ Returns the article selected or nil if there are no unread articles." (and (not (and undownloaded (eq gnus-undownloaded-mark (gnus-data-mark (car data))))) - (not (and unseen - (memq (car data) gnus-newsgroup-unseen))) - (not (gnus-data-unread-p (car data))))) + (if unseen + (or (not (memq + (gnus-data-number (car data)) + gnus-newsgroup-unseen)) + (not (gnus-data-unread-p (car data)))) + (not (gnus-data-unread-p (car data)))))) (setq data (cdr data))) (when data (goto-char (gnus-data-pos (car data))) @@ -6425,6 +6491,8 @@ If optional argument UNREAD is non-nil, only unread article is selected." "Go the subject line of ARTICLE. If FORCE, also allow jumping to articles not currently shown." (interactive "nArticle number: ") + (unless (numberp article) + (error "Article %s is not a number" article)) (let ((b (point)) (data (gnus-data-find article))) ;; We read in the article if we have to. @@ -6466,7 +6534,8 @@ Given a prefix, will force an `article' buffer configuration." (when (gnus-buffer-live-p gnus-article-buffer) (with-current-buffer gnus-article-buffer (setq gnus-article-charset gnus-newsgroup-charset) - (setq gnus-article-ignored-charsets gnus-newsgroup-ignored-charsets))) + (setq gnus-article-ignored-charsets gnus-newsgroup-ignored-charsets) + (set-buffer-multibyte t))) (if (null article) nil (prog1 @@ -6519,13 +6588,14 @@ be displayed." ;; The requested article is different from the current article. (progn (gnus-summary-display-article article all-headers) - (when (or all-headers gnus-show-all-headers) - (gnus-article-show-all-headers)) +;;; Hidden headers are not hidden text any more. +;; (when (or all-headers gnus-show-all-headers) +;; (gnus-article-show-all-headers)) (gnus-article-set-window-start (cdr (assq article gnus-newsgroup-bookmarks))) article) - (when (or all-headers gnus-show-all-headers) - (gnus-article-show-all-headers)) +;; (when (or all-headers gnus-show-all-headers) +;; (gnus-article-show-all-headers)) 'old)))) (defun gnus-summary-force-verify-and-decrypt () @@ -6824,6 +6894,19 @@ Return nil if there are no unseen articles." (gnus-summary-first-subject t t t)) (gnus-summary-position-point))) +(defun gnus-summary-first-unseen-or-unread-subject () + "Place the point on the subject line of the first unseen article. +Return nil if there are no unseen articles." + (interactive) + (prog1 + (unless (when (gnus-summary-first-subject t t t) + (gnus-summary-show-thread) + (gnus-summary-first-subject t t t)) + (when (gnus-summary-first-subject t) + (gnus-summary-show-thread) + (gnus-summary-first-subject t))) + (gnus-summary-position-point))) + (defun gnus-summary-first-article () "Select the first article. Return nil if there are no articles." @@ -7035,7 +7118,7 @@ articles that are younger than AGE days." (interactive (let ((header (intern - (gnus-completing-read + (gnus-completing-read-with-default (symbol-name (car gnus-extra-headers)) (if current-prefix-arg "Exclude extra header:" @@ -7246,9 +7329,7 @@ If ALL, mark even excluded ticked and dormants as read." ;; according to the new limit. (gnus-summary-prepare) ;; Hide any threads, possibly. - (and gnus-show-threads - gnus-thread-hide-subtree - (gnus-summary-hide-all-threads)) + (gnus-summary-maybe-hide-threads) ;; Try to return to the article you were at, or one in the ;; neighborhood. (when data @@ -7661,7 +7742,10 @@ to guess what the document format is." (gnus-group-read-ephemeral-group name `(nndoc ,name (nndoc-address ,(get-buffer dig)) (nndoc-article-type - ,(if force 'mbox 'guess))) t)) + ,(if force 'mbox 'guess))) + t nil nil nil + `((adapt-file . ,(gnus-score-file-name gnus-newsgroup-name + "ADAPT"))))) ;; Make all postings to this group go to the parent group. (nconc (gnus-info-params (gnus-get-info name)) params) @@ -8119,13 +8203,10 @@ are `C-u g'." (let ((gnus-newsgroup-charset (or (cdr (assq arg gnus-summary-show-article-charset-alist)) (mm-read-coding-system - "View as charset: " + "View as charset: " ;; actually it is coding system. (save-excursion (set-buffer gnus-article-buffer) - (let ((coding-systems - (detect-coding-region (point) (point-max)))) - (or (car-safe coding-systems) - coding-systems)))))) + (mm-detect-coding-region (point) (point-max)))))) (gnus-newsgroup-ignored-charsets 'gnus-all)) (gnus-summary-select-article nil 'force) (let ((deps gnus-newsgroup-dependencies) @@ -8319,7 +8400,9 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." ;; `gnus-read-move-group-name' an opportunity to suggest an ;; appropriate default. (unless (gnus-buffer-live-p gnus-original-article-buffer) - (gnus-summary-select-article nil nil nil (car articles))) + (let ((gnus-display-mime-function nil) + (gnus-article-prepare-hook nil)) + (gnus-summary-select-article nil nil nil (car articles)))) ;; Read the newsgroup name. (when (and (not to-newsgroup) (not select-method)) @@ -8550,7 +8633,7 @@ latter case, they will be copied into the relevant groups." (car (gnus-find-method-for-group gnus-newsgroup-name))))) (method - (gnus-completing-read + (gnus-completing-read-with-default methname "What backend do you want to use when respooling?" methods nil t nil 'gnus-mail-method-history)) ms) @@ -8884,13 +8967,6 @@ groups." (execute-kbd-macro (concat (this-command-keys) key)) (gnus-article-edit-done)) -(defun gnus-summary-toggle-smiley (&optional arg) - "Toggle the display of smilies as small graphical icons." - (interactive "P") - (save-excursion - (set-buffer gnus-article-buffer) - (gnus-article-smiley-display arg))) - ;;; Respooling (defun gnus-summary-respool-query (&optional silent trace) @@ -9809,18 +9885,49 @@ Returns nil if no thread was there to be shown." (goto-char orig) (gnus-summary-position-point)))) -(defun gnus-summary-hide-all-threads () - "Hide all thread subtrees." +(defun gnus-summary-maybe-hide-threads () + "If requested, hide the threads that should be hidden." + (when (and gnus-show-threads + gnus-thread-hide-subtree) + (gnus-summary-hide-all-threads + (if (or (consp gnus-thread-hide-subtree) + (gnus-functionp gnus-thread-hide-subtree)) + (gnus-make-predicate gnus-thread-hide-subtree) + nil)))) + +;;; Hiding predicates. + +(defun gnus-article-unread-p (header) + (memq (mail-header-number header) gnus-newsgroup-unreads)) + +(defun gnus-article-unseen-p (header) + (memq (mail-header-number header) gnus-newsgroup-unseen)) + +(defun gnus-map-articles (predicate articles) + "Map PREDICATE over ARTICLES and return non-nil if any predicate is non-nil." + (apply 'gnus-or (mapcar predicate + (mapcar 'gnus-summary-article-header articles)))) + +(defun gnus-summary-hide-all-threads (&optional predicate) + "Hide all thread subtrees. +If PREDICATE is supplied, threads that satisfy this predicate +will not be hidden." (interactive) (save-excursion (goto-char (point-min)) - (gnus-summary-hide-thread) - (while (zerop (gnus-summary-next-thread 1 t)) - (gnus-summary-hide-thread))) + (let ((end nil)) + (while (not end) + (when (or (not predicate) + (gnus-map-articles + predicate (gnus-summary-article-children))) + (gnus-summary-hide-thread)) + (setq end (not (zerop (gnus-summary-next-thread 1 t))))))) (gnus-summary-position-point)) (defun gnus-summary-hide-thread () "Hide thread subtrees. +If PREDICATE is supplied, threads that satisfy this predicate +will not be hidden. Returns nil if no threads were there to be hidden." (interactive) (let ((buffer-read-only nil) @@ -10016,8 +10123,7 @@ Argument REVERSE means reverse order." ;; We do the sorting by regenerating the threads. (gnus-summary-prepare) ;; Hide subthreads if needed. - (when (and gnus-show-threads gnus-thread-hide-subtree) - (gnus-summary-hide-all-threads)))) + (gnus-summary-maybe-hide-threads))) (defun gnus-summary-sort (predicate reverse) "Sort summary buffer by PREDICATE. REVERSE means reverse order." @@ -10040,8 +10146,7 @@ Argument REVERSE means reverse order." ;; We do the sorting by regenerating the threads. (gnus-summary-prepare) ;; Hide subthreads if needed. - (when (and gnus-show-threads gnus-thread-hide-subtree) - (gnus-summary-hide-all-threads)))) + (gnus-summary-maybe-hide-threads))) ;; Summary saving commands. @@ -10233,23 +10338,26 @@ save those articles instead." (to-newsgroup (cond ((null split-name) - (gnus-completing-read default prom - gnus-active-hashtb - 'gnus-valid-move-group-p - nil prefix - 'gnus-group-history)) + (gnus-completing-read-with-default + default prom + gnus-active-hashtb + 'gnus-valid-move-group-p + nil prefix + 'gnus-group-history)) ((= 1 (length split-name)) - (gnus-completing-read (car split-name) prom - gnus-active-hashtb - 'gnus-valid-move-group-p - nil nil - 'gnus-group-history)) + (gnus-completing-read-with-default + (car split-name) prom + gnus-active-hashtb + 'gnus-valid-move-group-p + nil nil + 'gnus-group-history)) (t - (gnus-completing-read nil prom - (mapcar (lambda (el) (list el)) - (nreverse split-name)) - nil nil nil - 'gnus-group-history)))) + (gnus-completing-read-with-default + nil prom + (mapcar (lambda (el) (list el)) + (nreverse split-name)) + nil nil nil + 'gnus-group-history)))) (to-method (gnus-server-to-method (gnus-group-method to-newsgroup)))) (when to-newsgroup (if (or (string= to-newsgroup "") @@ -11080,7 +11188,8 @@ If ALL is a number, fetch this number of articles." (setq older (subseq older 0 all)))))))) (if (not older) (message "No old news.") - (gnus-summary-insert-articles older) + (let ((gnus-fetch-old-headers t)) + (gnus-summary-insert-articles older)) (gnus-summary-limit (gnus-union older old)))) (gnus-summary-position-point))) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 53072f2..b7d054d 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1,5 +1,5 @@ ;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Ilja Weis @@ -61,7 +61,10 @@ with some simple extensions. %g Number of groups in the topic. %a Number of unread articles in the groups in the topic. %A Number of unread articles in the groups in the topic and its subtopics. -" + +General format specifiers can also be used. +See (gnus)Formatting Variables." + :link '(custom-manual "(gnus)Formatting Variables") :type 'string :group 'gnus-topic) @@ -250,6 +253,28 @@ If RECURSIVE is t, return groups in its subtopics too." (cdr recursive))) visible-groups)) +(defun gnus-topic-goto-previous-topic (n) + "Go to the N'th previous topic." + (interactive "p") + (gnus-topic-goto-next-topic (- n))) + +(defun gnus-topic-goto-next-topic (n) + "Go to the N'th next topic." + (interactive "p") + (let ((backward (< n 0)) + (n (abs n)) + (topic (gnus-current-topic))) + (while (and (> n 0) + (setq topic + (if backward + (gnus-topic-previous-topic topic) + (gnus-topic-next-topic topic)))) + (gnus-topic-goto-topic topic) + (setq n (1- n))) + (when (/= 0 n) + (gnus-message 7 "No more topics")) + n)) + (defun gnus-topic-previous-topic (topic) "Return the previous topic on the same level as TOPIC." (let ((top (cddr (gnus-topic-find-topology @@ -1029,6 +1054,8 @@ articles in the topic and its subtopics." "j" gnus-topic-jump-to-topic "M" gnus-topic-move-matching "C" gnus-topic-copy-matching + "\M-p" gnus-topic-goto-previous-topic + "\M-n" gnus-topic-goto-next-topic "\C-i" gnus-topic-indent [tab] gnus-topic-indent "r" gnus-topic-rename @@ -1068,6 +1095,8 @@ articles in the topic and its subtopics." ["Mark" gnus-topic-mark-topic t] ["Indent" gnus-topic-indent t] ["Sort" gnus-topic-sort-topics t] + ["Previous topic" gnus-topic-goto-previous-topic t] + ["Next topic" gnus-topic-goto-next-topic t] ["Toggle hide empty" gnus-topic-toggle-display-empty-topics t] ["Edit parameters" gnus-topic-edit-parameters t]) ["List active" gnus-topic-list-active t])))) @@ -1165,10 +1194,13 @@ Also see `gnus-group-catchup'." (if (not topic) (call-interactively 'gnus-group-catchup-current) (save-excursion - (let ((gnus-group-marked + (let* ((groups (mapcar (lambda (entry) (car (nth 2 entry))) - (gnus-topic-find-groups topic gnus-level-killed t)))) - (gnus-group-catchup-current))))) + (gnus-topic-find-groups topic gnus-level-killed t))) + (buffer-read-only nil) + (gnus-group-marked groups)) + (gnus-group-catchup-current) + (mapcar 'gnus-topic-update-topics-containing-group groups))))) (defun gnus-topic-read-group (&optional all no-article group) "Read news in this newsgroup. @@ -1226,7 +1258,8 @@ When used interactively, PARENT will be the topic under point." If COPYP, copy the groups instead." (interactive (list current-prefix-arg - (completing-read "Move to topic: " gnus-topic-alist nil t))) + (gnus-completing-read "Move to topic" gnus-topic-alist nil t + 'gnus-topic-history))) (let ((use-marked (and (not n) (not (gnus-region-active-p)) gnus-group-marked t)) (groups (gnus-group-process-prefix n)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index a332aa3..fe2d0e0 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1,5 +1,5 @@ ;;; gnus-util.el --- utility functions for Semi-gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -247,17 +247,6 @@ (delete-char 1)) (goto-char (next-single-property-change (point) prop nil (point-max)))))) -(defun gnus-text-with-property (prop) - "Return a list of all points where the text has PROP." - (let ((points nil) - (point (point-min))) - (save-excursion - (while (< point (point-max)) - (when (get-text-property point prop) - (push point points)) - (incf point))) - (nreverse points))) - (require 'nnheader) (defun gnus-newsgroup-directory-form (newsgroup) "Make hierarchical directory name from NEWSGROUP name." @@ -331,7 +320,7 @@ (define-key keymap key (pop plist)) (pop plist))))) -(defun gnus-completing-read (default prompt &rest args) +(defun gnus-completing-read-with-default (default prompt &rest args) ;; Like `completing-read', except that DEFAULT is the default argument. (let* ((prompt (if default (concat prompt " (default " default ") ") @@ -380,7 +369,8 @@ (604800 . "%a %k:%M") ;;that's one week ((gnus-seconds-month) . "%a %d") ((gnus-seconds-year) . "%b %d") - (t . "%b %m '%y")) ;;this one is used when no other does match + (t . "%b %d '%y")) ;;this one is used when no + ;;other does match "Alist of time in seconds and format specification used to display dates not older. The first element must be a number or a function returning a number. The second element is a format-specification as described in @@ -513,11 +503,15 @@ jabbering all the time." (defsubst gnus-parent-id (references &optional n) "Return the last Message-ID in REFERENCES. If N, return the Nth ancestor instead." - (when references - (let ((ids (inline (gnus-split-references references)))) - (while (nthcdr (or n 1) ids) - (setq ids (cdr ids))) - (car ids)))) + (when (and references + (not (zerop (length references)))) + (if n + (let ((ids (inline (gnus-split-references references)))) + (while (nthcdr n ids) + (setq ids (cdr ids))) + (car ids)) + (when (string-match "<[^> \t]+>\\'" references) + (match-string 0 references))))) (defun gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." @@ -727,9 +721,10 @@ Bind `print-quoted' and `print-readably' to t while printing." (when (get-text-property b 'gnus-face) (setq b (next-single-property-change b 'gnus-face nil end))) (when (/= b end) - (gnus-put-text-property - b (setq b (next-single-property-change b 'gnus-face nil end)) - prop val))))) + (inline + (gnus-put-text-property + b (setq b (next-single-property-change b 'gnus-face nil end)) + prop val)))))) ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 ;;; The primary idea here is to try to protect internal datastructures @@ -1264,6 +1259,47 @@ forbidden in URL encoding." (setq tmp (concat tmp str)) tmp)) +(defun gnus-make-predicate (spec) + "Transform SPEC into a function that can be called. +SPEC is a predicate specifier that contains stuff like `or', `and', +`not', lists and functions. The functions all take one parameter." + `(lambda (elem) ,(gnus-make-predicate-1 spec))) + +(defun gnus-make-predicate-1 (spec) + (cond + ((symbolp spec) + `(,spec elem)) + ((listp spec) + (if (memq (car spec) '(or and not)) + `(,(car spec) ,@(mapcar 'gnus-make-predicate-1 (cdr spec))) + (error "Invalid predicate specifier: %s" spec))))) + +(defun gnus-local-map-property (map) + "Return a list suitable for a text property list specifying keymap MAP." + (cond + ((featurep 'xemacs) + (list 'keymap map)) + ((>= emacs-major-version 21) + (list 'keymap map)) + (t + (list 'local-map map)))) + +(defun gnus-completing-read (prompt table &optional predicate require-match + history) + (when (and history + (not (boundp history))) + (set history nil)) + (completing-read + (if (symbol-value history) + (concat prompt " (" (car (symbol-value history)) "): ") + (concat prompt ": ")) + table + predicate + require-match + nil + history + (car (symbol-value history)))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus-vers.el b/lisp/gnus-vers.el index 85237f2..21b9843 100644 --- a/lisp/gnus-vers.el +++ b/lisp/gnus-vers.el @@ -34,16 +34,16 @@ (require 'product) (provide 'gnus-vers) -(defconst gnus-revision-number "11" +(defconst gnus-revision-number "02" "Revision number for this version of gnus.") ;; Product information of this gnus. (product-provide 'gnus-vers (product-define "T-gnus" nil - (list 6 15 4 + (list 6 15 5 (string-to-number gnus-revision-number)))) -(defconst gnus-original-version-number "0.04" +(defconst gnus-original-version-number "0.05" "Version number for this version of Gnus.") (provide 'running-pterodactyl-gnus-0_73-or-later) diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index 3f65dcf..ba3e34a 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -1,6 +1,6 @@ ;;; gnus-xmas.el --- Gnus functions for XEmacs -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -632,6 +632,8 @@ If it is non-nil, it must be a toolbar. The five valid values are [gnus-group-unsubscribe gnus-group-unsubscribe t "Unsubscribe group"] [gnus-group-subscribe gnus-group-subscribe t "Subscribe group"] [gnus-group-kill-group gnus-group-kill-group t "Kill group"] + [gnus-summary-mail-save + gnus-group-save-newsrc t "Save .newsrc files"] ; borrowed icon. [gnus-group-exit gnus-group-exit t "Exit Gnus"]) "The group buffer toolbar.") @@ -689,6 +691,8 @@ If it is non-nil, it must be a toolbar. The five valid values are gnus-summary-save-article-file t "Save article in file"] [gnus-summary-save-article gnus-summary-save-article t "Save article"] + [gnus-summary-cancel-article ; usenet : cancellation :: mail : deletion. + gnus-summary-delete-article t "Delete message"] [gnus-summary-catchup gnus-summary-catchup t "Catchup"] [gnus-summary-catchup-and-exit @@ -722,41 +726,6 @@ XEmacs compatibility workaround." 'call-process-region (point-min) (point-max) command t '(t nil) nil args)) -(defface gnus-x-face '((t (:foreground "black" :background "white"))) - "Face to show X face" - :group 'gnus-xmas) - -(defun gnus-xmas-article-display-xface (data) - "Display the XFace in DATA." - (save-excursion - (let ((xface-glyph - (cond - ((featurep 'xface) - (make-glyph (vector 'xface :data - (concat "X-Face: " data)))) - ((featurep 'xpm) - (let ((cur (current-buffer))) - (save-excursion - (gnus-set-work-buffer) - (insert data) - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - (gnus-xmas-call-region "uncompface") - (goto-char (point-min)) - (insert "/* Width=48, Height=48 */\n") - (gnus-xmas-call-region "icontopbm") - (gnus-xmas-call-region "ppmtoxpm") - (make-glyph - (vector 'xpm :data (buffer-string))))))) - (t - (make-glyph [nothing]))))) - ;;(set-glyph-face xface-glyph 'gnus-x-face) - - (gnus-article-goto-header "from") - (gnus-put-image xface-glyph " ") - (gnus-add-wash-type 'xface) - (gnus-add-image 'xface xface-glyph)))) - (defvar gnus-xmas-modeline-left-extent (let ((ext (copy-extent modeline-buffer-id-left-extent))) ext)) @@ -936,6 +905,8 @@ XEmacs compatibility workaround." Warning: Don't insert text immediately after the image." (let ((begin (point)) extent) + (if (and (bobp) (not string)) + (setq string " ")) (if string (insert string) (setq begin (1- begin))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 20ac952..92fdcda 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1,6 +1,7 @@ ;;; gnus.el --- a newsreader for GNU Emacs -;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. + +;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, +;; 1998, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ;; Lars Magne Ingebrigtsen @@ -143,6 +144,10 @@ :link '(custom-manual "(gnus)Summary Maneuvering") :group 'gnus-summary) +(defgroup gnus-picon nil + "Show pictures of people, domains, and newsgroups." + :group 'gnus-visual) + (defgroup gnus-summary-mail nil "Mail group commands." :link '(custom-manual "(gnus)Mail Group Commands") @@ -272,6 +277,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) +(defgroup gnus-fun nil + "Frivolous Gnus extensions." + :link '(custom-manual "(gnus)Exiting Gnus") + :group 'gnus) + (defcustom gnus-inhibit-startup-message nil "If non-nil, the startup message will not be displayed. This variable is used before `.gnus.el' is loaded, so it should @@ -800,17 +810,17 @@ be set in `.emacs' instead." (berry "#cc6485" "#ff7db5") (dino "#724214" "#1e3f03") (oort "#cccccc" "#888888") + (storm "#666699" "#99ccff") + (pdino "#9999cc" "#99ccff") + (purp "#9999cc" "#666699") (neutral "#b4b4b4" "#878787") (september "#bf9900" "#ffcc00")) "Color alist used for the Gnus logo.") (defcustom gnus-logo-color-style 'oort "*Color styles used for the Gnus logo." - :type '(choice (const flame) (const pine) (const moss) - (const irish) (const sky) (const tin) - (const velvet) (const grape) (const labia) - (const berry) (const neutral) (const september) - (const dino)) + :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem))) + gnus-logo-color-alist)) :group 'gnus-xmas) (defvar gnus-logo-colors @@ -1792,6 +1802,9 @@ face." (defvar gnus-plugged t "Whether Gnus is plugged or not.") +(defvar gnus-agent-cache t + "Whether Gnus use agent cache.") + (defcustom gnus-default-charset 'iso-8859-1 "Default charset assumed to be used when viewing non-ASCII characters. This variable is overridden on a group-to-group basis by the @@ -1817,6 +1830,8 @@ covered by that variable." (defvar gnus-agent-fetching nil "Whether Gnus agent is in fetching mode.") +(defvar gnus-agent-covered-methods nil) + (defvar gnus-command-method nil "Dynamically bound variable that says what the current backend is.") @@ -2062,6 +2077,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-demon-remove-handler) ("gnus-demon" :interactive t gnus-demon-init gnus-demon-cancel) + ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from + gnus-convert-image-to-gray-x-face) ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer) ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close @@ -2136,7 +2153,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") ("gnus-picon" :interactive t gnus-treat-from-picon) ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p gnus-grouplens-mode) - ("smiley" :interactive t gnus-smiley-display) + ("smiley" :interactive t smiley-region) ("gnus-win" gnus-configure-windows gnus-add-configuration) ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group gnus-list-of-unread-articles gnus-list-of-read-articles @@ -2169,7 +2186,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-article-hide-pem gnus-article-hide-signature gnus-article-strip-leading-blank-lines gnus-article-date-local gnus-article-date-original gnus-article-date-lapsed - gnus-article-show-all-headers gnus-article-show-all + gnus-article-show-all-headers + ;; gnus-article-show-all gnus-article-edit-mode gnus-article-edit-article gnus-article-edit-done article-decode-encoded-words gnus-start-date-timer gnus-stop-date-timer @@ -2205,7 +2223,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") ("gnus-agent" gnus-open-agent gnus-agent-get-function gnus-agent-save-groups gnus-agent-save-active gnus-agent-method-p gnus-agent-get-undownloaded-list gnus-agent-fetch-session - gnus-summary-set-agent-mark gnus-agent-save-group-info) + gnus-summary-set-agent-mark gnus-agent-save-group-info + gnus-agent-request-article gnus-agent-retrieve-headers) ("gnus-agent" :interactive t gnus-unplugged gnus-agentize gnus-agent-batch) ("gnus-vm" :interactive t gnus-summary-save-in-vm @@ -2241,7 +2260,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") ;;; gnus-sum.el thingies -(defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23n%]%) %s\n" +(defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n" "*The format specification of the lines in the summary buffer. It works along the same lines as a normal formatting string, @@ -2289,10 +2308,6 @@ with some simple extensions. will be inserted into the summary just like information from any other summary specifier. -Text between %( and %) will be highlighted with `gnus-mouse-face' -when the mouse point is placed inside the area. There can only be one -such area. - The %U (status), %R (replied) and %z (zcore) specs have to be handled with care. For reasons of efficiency, Gnus will compute what column these characters will end up in, and \"hard-code\" that. This means that @@ -2303,7 +2318,11 @@ which is bad enough. The smart choice is to have these specs as far to the left as possible. -This restriction may disappear in later versions of Gnus." +This restriction may disappear in later versions of Gnus. + +General format specifiers can also be used. +See (gnus)Formatting Variables." + :link '(custom-manual "(gnus)Formatting Variables") :type 'string :group 'gnus-summary-format) @@ -2347,6 +2366,12 @@ This restriction may disappear in later versions of Gnus." "Get hash value of STRING in HASHTABLE." `(symbol-value (intern-soft ,string ,hashtable))) +(defmacro gnus-gethash-safe (string hashtable) + "Get hash value of STRING in HASHTABLE. +Return nil if not defined." + `(let ((sym (intern-soft ,string ,hashtable))) + (and (boundp sym) (symbol-value sym)))) + (defmacro gnus-sethash (string value hashtable) "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." `(set (intern ,string ,hashtable) ,value)) @@ -2948,7 +2973,7 @@ You should probably use `gnus-find-method-for-group' instead." (let (new) (dolist (elem parameters) (if (and (stringp (cdr elem)) - (string-match "\\\\" (cdr elem))) + (string-match "\\\\[0-9&]" (cdr elem))) (push (cons (car elem) (gnus-expand-group-parameter match (cdr elem) group)) new) @@ -2997,12 +3022,10 @@ If you call this function inside a loop, consider using the faster (set-buffer gnus-group-buffer) (if symbol (gnus-group-fast-parameter group symbol allow-list) - (let ((parameters - (nconc - (copy-sequence - (funcall gnus-group-get-parameter-function group)) - (gnus-parameters-get-parameter group)))) - parameters)))) + (nconc + (copy-sequence + (funcall gnus-group-get-parameter-function group)) + (gnus-parameters-get-parameter group))))) (defun gnus-group-get-parameter (group &optional symbol allow-list) "Return the group parameters for GROUP. @@ -3332,22 +3355,35 @@ Allow completion over sensible values." (t (list (intern method) ""))))) +;;; Agent functions + +(defun gnus-agent-method-p (method) + "Say whether METHOD is covered by the agent." + (member method gnus-agent-covered-methods)) + +(defun gnus-online (method) + (not + (if gnus-plugged + (eq (cadr (assoc method gnus-opened-servers)) 'offline) + (gnus-agent-method-p method)))) + ;;; User-level commands. ;;;###autoload (defun gnus-slave-no-server (&optional arg) - "Read network news as a slave, without connecting to local server." + "Read network news as a slave, without connecting to the local server." (interactive "P") (gnus-no-server arg t)) ;;;###autoload (defun gnus-no-server (&optional arg slave) "Read network news. -If ARG is a positive number, Gnus will use that as the -startup level. If ARG is nil, Gnus will be started at level 2. -If ARG is non-nil and not a positive number, Gnus will -prompt the user for the name of an NNTP server to use. -As opposed to `gnus', this command will not connect to the local server." +If ARG is a positive number, Gnus will use that as the startup +level. If ARG is nil, Gnus will be started at level 2. If ARG is +non-nil and not a positive number, Gnus will prompt the user for the +name of an NNTP server to use. +As opposed to `gnus', this command will not connect to the local +server." (interactive "P") (gnus-no-server-1 arg slave)) diff --git a/lisp/imap.el b/lisp/imap.el index 519690c..ca6cc64 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -1,5 +1,5 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000, 2001 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -589,7 +589,9 @@ If ARGS, PROMPT is used as an argument to `format'." (let ((cmds (if (listp imap-ssl-program) imap-ssl-program (list imap-ssl-program))) cmd done) - (ignore-errors (require 'ssl)) + (condition-case () + (require 'ssl) + (error)) (while (and (not done) (setq cmd (pop cmds))) (message "imap: Opening SSL connection with `%s'..." cmd) (let* ((port (or port imap-default-ssl-port)) @@ -601,17 +603,18 @@ If ARGS, PROMPT is used as an argument to `format'." ?p (number-to-string port))))) process) (when (setq process - (ignore-errors - (cond ((eq system-type 'windows-nt) - (let (selective-display - (coding-system-for-write 'binary) - (coding-system-for-read 'raw-text-dos) - (output-coding-system 'binary) - (input-coding-system 'raw-text-dos)) - (open-ssl-stream name buffer server port))) - (t - (as-binary-process - (open-ssl-stream name buffer server port)))))) + (condition-case nil + (cond ((eq system-type 'windows-nt) + (let (selective-display + (coding-system-for-write 'binary) + (coding-system-for-read 'raw-text-dos) + (output-coding-system 'binary) + (input-coding-system 'raw-text-dos)) + (open-ssl-stream name buffer server port))) + (t + (as-binary-process + (open-ssl-stream name buffer server port)))) + (error nil))) (with-current-buffer buffer (goto-char (point-min)) (while (and (memq (process-status process) '(open run)) @@ -700,12 +703,7 @@ If ARGS, PROMPT is used as an argument to `format'." nil))) (defun imap-starttls-p (buffer) - (and (imap-capability 'STARTTLS buffer) - (condition-case () - (progn - (require 'starttls) - (call-process "starttls")) - (error nil)))) + (imap-capability 'STARTTLS buffer)) (defun imap-starttls-open (name buffer server port) (let* ((port (or port imap-default-port)) @@ -757,12 +755,15 @@ Returns t if login was successful, nil otherwise." (while (or (not user) (not passwd)) (setq user (or imap-username (read-from-minibuffer - (concat "IMAP username for " imap-server ": ") + (concat "IMAP username for " imap-server + " (using stream `" (symbol-name imap-stream) + "'): ") (or user imap-default-user)))) (setq passwd (or imap-password (imap-read-passwd (concat "IMAP password for " user "@" - imap-server ": ")))) + imap-server " (using authenticator `" + (symbol-name imap-auth) "'): ")))) (when (and user passwd) (if (funcall loginfunc user passwd) (progn @@ -784,13 +785,7 @@ Returns t if login was successful, nil otherwise." (defun imap-gssapi-auth-p (buffer) (and (imap-capability 'AUTH=GSSAPI buffer) - (catch 'imtest-found - (let (prg (prgs imap-gssapi-program)) - (while (setq prg (pop prgs)) - (condition-case () - (and (call-process (substring prg 0 (string-match " " prg))) - (throw 'imtest-found t)) - (error nil))))))) + (eq imap-stream 'gssapi))) (defun imap-gssapi-auth (buffer) (message "imap: Authenticating using GSSAPI...%s" @@ -799,13 +794,7 @@ Returns t if login was successful, nil otherwise." (defun imap-kerberos4-auth-p (buffer) (and (imap-capability 'AUTH=KERBEROS_V4 buffer) - (catch 'imtest-found - (let (prg (prgs imap-kerberos4-program)) - (while (setq prg (pop prgs)) - (condition-case () - (and (call-process (substring prg 0 (string-match " " prg))) - (throw 'imtest-found t)) - (error nil))))))) + (eq imap-stream 'kerberos4))) (defun imap-kerberos4-auth (buffer) (message "imap: Authenticating using Kerberos 4...%s" @@ -940,46 +929,53 @@ necessery. If nil, the buffer name is generated." (setq imap-auth (or auth imap-auth)) (setq imap-stream (or stream imap-stream)) (message "imap: Connecting to %s..." imap-server) - (if (let ((imap-stream (or imap-stream imap-default-stream))) - (imap-open-1 buffer)) - ;; Choose stream. - (let (stream-changed) - (message "imap: Connecting to %s...done" imap-server) - (when (null imap-stream) - (let ((streams imap-streams)) - (while (setq stream (pop streams)) - (if (funcall (nth 1 (assq stream imap-stream-alist)) buffer) - (setq stream-changed (not (eq (or imap-stream - imap-default-stream) - stream)) - imap-stream stream - streams nil))) - (unless imap-stream - (error "Couldn't figure out a stream for server")))) - (when stream-changed - (message "imap: Reconnecting with stream `%s'..." imap-stream) - (imap-close buffer) - (if (imap-open-1 buffer) - (message "imap: Reconnecting with stream `%s'...done" - imap-stream) - (message "imap: Reconnecting with stream `%s'...failed" - imap-stream)) - (setq imap-capability nil)) - (if (imap-opened buffer) - ;; Choose authenticator - (when (and (null imap-auth) (not (eq imap-state 'auth))) - (let ((auths imap-authenticators)) - (while (setq auth (pop auths)) - (if (funcall (nth 1 (assq auth imap-authenticator-alist)) - buffer) - (setq imap-auth auth - auths nil))) - (unless imap-auth - (error "Couldn't figure out authenticator for server")))))) - (message "imap: Connecting to %s...failed" imap-server)) - (when (imap-opened buffer) - (setq imap-mailbox-data (make-vector imap-mailbox-prime 0)) - buffer))) + (if (null (let ((imap-stream (or imap-stream imap-default-stream))) + (imap-open-1 buffer))) + (progn + (message "imap: Connecting to %s...failed" imap-server) + nil) + (when (null imap-stream) + ;; Need to choose stream. + (let ((streams imap-streams)) + (while (setq stream (pop streams)) + ;; OK to use this stream? + (when (funcall (nth 1 (assq stream imap-stream-alist)) buffer) + ;; Stream changed? + (if (not (eq imap-default-stream stream)) + (with-current-buffer (get-buffer-create + (generate-new-buffer-name " *temp*")) + (mapcar 'make-local-variable imap-local-variables) + (set-buffer-multibyte nil) + (buffer-disable-undo) + (setq imap-server (or server imap-server)) + (setq imap-port imap-port) + (setq imap-auth imap-auth) + (message "imap: Reconnecting with stream `%s'..." stream) + (if (null (let ((imap-stream stream)) + (imap-open-1 (current-buffer)))) + (progn + (kill-buffer (current-buffer)) + (message + "imap: Reconnecting with stream `%s'...failed" + stream)) + ;; We're done, kill the first connection + (imap-close buffer) + (kill-buffer buffer) + (rename-buffer buffer) + (message "imap: Reconnecting with stream `%s'...done" + stream) + (setq imap-stream stream) + (setq imap-capability nil) + (setq streams nil))) + ;; We're done + (message "imap: Connecting to %s...done" imap-server) + (setq imap-stream stream) + (setq imap-capability nil) + (setq streams nil)))))) + (when (imap-opened buffer) + (setq imap-mailbox-data (make-vector imap-mailbox-prime 0))) + (when imap-stream + buffer)))) (defun imap-opened (&optional buffer) "Return non-nil if connection to imap server in BUFFER is open. @@ -1006,15 +1002,36 @@ password is remembered in the buffer." (make-local-variable 'imap-password) (if user (setq imap-username user)) (if passwd (setq imap-password passwd)) - (if (funcall (nth 2 (assq imap-auth imap-authenticator-alist)) buffer) - (setq imap-state 'auth))))) + (if imap-auth + (and (funcall (nth 2 (assq imap-auth + imap-authenticator-alist)) buffer) + (setq imap-state 'auth)) + ;; Choose authenticator. + (let ((auths imap-authenticators) + auth) + (while (setq auth (pop auths)) + ;; OK to use authenticator? + (when (funcall (nth 1 (assq auth imap-authenticator-alist)) buffer) + (message "imap: Authenticating to `%s' using `%s'..." + imap-server auth) + (setq imap-auth auth) + (if (funcall (nth 2 (assq auth imap-authenticator-alist)) buffer) + (progn + (message "imap: Authenticating to `%s' using `%s'...done" + imap-server auth) + (setq auths nil)) + (message "imap: Authenticating to `%s' using `%s'...failed" + imap-server auth))))) + imap-state)))) (defun imap-close (&optional buffer) "Close connection to server in BUFFER. If BUFFER is nil, the current buffer is used." (with-current-buffer (or buffer (current-buffer)) (when (imap-opened) - (imap-send-command-wait "LOGOUT")) + (condition-case nil + (imap-send-command-wait "LOGOUT") + (quit nil))) (when (and imap-process (memq (process-status imap-process) '(open run))) (delete-process imap-process)) @@ -2193,7 +2210,9 @@ Return nil if no complete line has arrived." (let ((token (read (current-buffer)))) (imap-forward) (cond ((eq token 'UID) - (setq uid (ignore-errors (read (current-buffer))))) + (setq uid (condition-case () + (read (current-buffer)) + (error)))) ((eq token 'FLAGS) (setq flags (imap-parse-flag-list)) (if (not flags) diff --git a/lisp/lpath.el b/lisp/lpath.el index 625622d..604739d 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -122,7 +122,7 @@ '((function-max-args smiley-encode-buffer))) ((boundp 'MULE) '((coding-system-get - compose-mail file-name-extension + coding-system-to-mime-charset compose-mail file-name-extension find-coding-systems-for-charsets find-coding-systems-region function-max-args get-charset-property shell-command-to-string smiley-encode-buffer))) diff --git a/lisp/message.el b/lisp/message.el index 7a54d53..b438468 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1,5 +1,5 @@ ;;; message.el --- composing mail and news messages -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -158,6 +158,11 @@ mailbox format." :group 'message-sending :type '(repeat (symbol :tag "Type"))) +(defcustom message-fcc-externalize-attachments nil + "If non-nil, attachments are included as external parts in Fcc copies." + :type 'boolean + :group 'message-sending) + (defcustom message-courtesy-message "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" "*This is inserted at the start of a mailed copy of a posted message. @@ -242,14 +247,14 @@ included. Organization, Lines and User-Agent are optional." :type 'sexp) (defcustom message-ignored-news-headers - "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:" + "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" "*Regexp of headers to be removed unconditionally before posting." :group 'message-news :group 'message-headers :type 'regexp) (defcustom message-ignored-mail-headers - "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:" + "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" "*Regexp of headers to be removed unconditionally before mailing." :group 'message-mail :group 'message-headers @@ -1751,6 +1756,7 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c?" 'describe-mode) (define-key message-mode-map "\C-c\C-f\C-t" 'message-goto-to) + (define-key message-mode-map "\C-c\C-f\C-o" 'message-goto-from) (define-key message-mode-map "\C-c\C-f\C-b" 'message-goto-bcc) (define-key message-mode-map "\C-c\C-f\C-w" 'message-goto-fcc) (define-key message-mode-map "\C-c\C-f\C-c" 'message-goto-cc) @@ -1772,6 +1778,9 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c\C-t" 'message-insert-to) (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups) + (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance) + (define-key message-mode-map "\C-c\M-n" 'message-insert-disposition-notification-to) + (define-key message-mode-map "\C-c\C-y" 'message-yank-original) (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer) (define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message) @@ -1814,12 +1823,16 @@ Point is left at the beginning of the narrowed-to region." ["Kill To Signature" message-kill-to-signature t] ["Newline and Reformat" message-newline-and-reformat t] ["Rename buffer" message-rename-buffer t] - ["Flag as important" message-insert-importance-high + ["Flag As Important" message-insert-importance-high ,@(if (featurep 'xemacs) '(t) '(:help "Mark this message as important"))] - ["Flag as unimportant" message-insert-importance-low + ["Flag As Unimportant" message-insert-importance-low ,@(if (featurep 'xemacs) '(t) '(:help "Mark this message as unimportant"))] + ["Request Receipt" + message-insert-disposition-notification-to + ,@(if (featurep 'xemacs) '(t) + '(:help "Request a Disposition Notification of this article"))] ["Spellcheck" ispell-message ,@(if (featurep 'xemacs) '(t) '(:help "Spellcheck this message"))] @@ -1847,6 +1860,7 @@ Point is left at the beginning of the narrowed-to region." ["Fetch Newsgroups" message-insert-newsgroups t] "----" ["To" message-goto-to t] + ["From" message-goto-from t] ["Subject" message-goto-subject t] ["Cc" message-goto-cc t] ["Reply-To" message-goto-reply-to t] @@ -1939,6 +1953,7 @@ C-c C-f move to a header field (and create it if there isn't): C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution C-c C-f C-f move to Followup-To C-c C-f C-m move to Mail-Followup-To + C-c C-f C-i cycle through Importance values C-c C-f c move to Mail-Copies-To C-c C-t `message-insert-to' (add a To header to a news followup) C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) @@ -1951,7 +1966,8 @@ C-c C-e `message-elide-region' (elide the text between point and mark). C-c C-v `message-delete-not-region' (remove the text outside the region). C-c C-z `message-kill-to-signature' (kill the text up to the signature). C-c C-r `message-caesar-buffer-body' (rot13 the message body). -C-c C-p `message-insert-or-toggle-importance' (insert or cycle importance) +C-c C-u `message-insert-or-toggle-importance' (insert or cycle importance). +C-c M-n `message-insert-disposition-notification-to' (request receipt). M-RET `message-newline-and-reformat' (break the line and reformat)." (set (make-local-variable 'message-reply-buffer) nil) (make-local-variable 'message-send-actions) @@ -2056,6 +2072,11 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (interactive) (message-position-on-field "To")) +(defun message-goto-from () + "Move point to the From header." + (interactive) + (message-position-on-field "From")) + (defun message-goto-subject () "Move point to the Subject header." (interactive) @@ -2319,10 +2340,14 @@ Prefix arg means justify as well." (if not-break (setq point nil) (if bolp - (insert "\n") - (insert "\n\n")) + (newline) + (newline) + (newline)) (setq point (point)) - (insert "\n\n") + ;; (newline 2) doesn't mark both newline's as hard, so call + ;; newline twice. -jas + (newline) + (newline) (delete-region (point) (re-search-forward "[ \t]*")) (when (and quoted (not bolp)) (insert quoted leading-space))) @@ -2433,6 +2458,16 @@ and `low'." (message-goto-eoh) (insert (format "Importance: %s\n" new))))) +(defun message-insert-disposition-notification-to () + "Request a disposition notification (return receipt) to this message. +Note that this should not be used in newsgroups." + (interactive) + (save-excursion + (message-remove-header "Disposition-Notification-To") + (message-goto-eoh) + (insert (format "Disposition-Notification-To: %s\n" + (or (message-fetch-field "From") (message-make-from)))))) + (defun message-elide-region (b e) "Elide the text in the region. An ellipsis (from `message-elide-ellipsis') will be inserted where the @@ -2972,7 +3007,7 @@ It should typically alter the sending method in some way or other." (save-excursion (set-buffer message-encoding-buffer) (erase-buffer) - ;; ;; Avoid copying text props. + ;; ;; Avoid copying text props (except hard newlines). ;; T-gnus change: copy all text props from the editing buffer ;; into the encoding buffer. (insert-buffer message-edit-buffer) @@ -3061,6 +3096,17 @@ used to distinguish whether the invisible text is a MIME part or not." '(invisible t mime-edit-invisible t)) (put-text-property start end 'invisible t)))))) +(defun message-text-with-property (prop) + "Return a list of all points where the text has PROP." + (let ((points nil) + (point (point-min))) + (save-excursion + (while (< point (point-max)) + (when (get-text-property point prop) + (push point points)) + (incf point))) + (nreverse points))) + (defun message-fix-before-sending () "Do various things to make the message nice before sending it." ;; Make sure there's a newline at the end of the message. @@ -3271,6 +3317,9 @@ This sub function is for exclusive use of `message-send-mail'." (save-excursion (set-buffer tembuf) (erase-buffer) + ;; ;; Avoid copying text props (except hard newlines). + ;; T-gnus change: copy all text props from the editing buffer + ;; into the encoding buffer. (insert-buffer message-encoding-buffer) ;; Remove some headers. (save-restriction @@ -3279,7 +3328,6 @@ This sub function is for exclusive use of `message-send-mail'." ;; ;; We (re)generate the Lines header. ;; (when (memq 'Lines message-required-mail-headers) ;; (message-generate-headers '(Lines))) - ;; Remove some headers. (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. @@ -3703,7 +3751,7 @@ Otherwise, generate and save a value for `canlock-password' first." (zerop (length (setq to (completing-read - "Followups to: (default all groups) " + "Followups to (default: no Followup-To header) " (mapcar (lambda (g) (list g)) (cons "poster" (message-tokenize-header @@ -4051,7 +4099,8 @@ Otherwise, generate and save a value for `canlock-password' first." (let ((case-fold-search t) (coding-system-for-write 'raw-text) (output-coding-system 'raw-text) - list file) + list file + (mml-externalize-attachments message-fcc-externalize-attachments)) (save-excursion (save-restriction (message-narrow-to-headers) @@ -4204,7 +4253,7 @@ If NOW, use that time instead." (aset user (match-beginning 0) ?_)) user) (message-number-base36 (user-uid) -1)) - (message-number-base36 (+ (car tm) + (message-number-base36 (+ (car tm) (lsh (% message-unique-id-char 25) 16)) 4) (message-number-base36 (+ (nth 1 tm) (lsh (/ message-unique-id-char 25) 16)) 4) @@ -4321,16 +4370,6 @@ If NOW, use that time instead." (aset tmp (1- (match-end 0)) ?-)) (string-match "[\\()]" tmp))))) (insert fullname) - (goto-char (point-min)) - ;; Look for a character that cannot appear unquoted - ;; according to RFC 822. - (when (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" nil 1) - ;; Quote fullname, escaping specials. - (goto-char (point-min)) - (insert "\"") - (while (re-search-forward "[\"\\]" nil 1) - (replace-match "\\\\\\&" t)) - (insert "\"")) (insert " <" login ">")) (t ; 'parens or default (insert login " (") @@ -4392,7 +4431,7 @@ give as trustworthy answer as possible." (match-string 1 user-mail)) ;; Default to this bogus thing. (t - (concat system-name ".i-did-not-set--mail-host-address--so-shoot-me"))))) + (concat system-name ".i-did-not-set--mail-host-address--so-tickle-me"))))) (defun message-make-host-name () "Return the name of the host." @@ -4563,6 +4602,8 @@ Headers already prepared in the buffer are not modified." (goto-char (point-max)) (insert (if (stringp header) header (symbol-name header)) ": " value) + ;; We check whether the value was ended by a + ;; newline. If now, we insert one. (unless (bolp) (insert "\n")) (forward-line -1)) @@ -4859,7 +4900,7 @@ than 988 characters long, and if they are not, trim them until they are." to group) (if (not (or (null name) (string-equal name "mail") - (string-equal name "news"))) + (string-equal name "posting"))) (setq name (concat "*sent " name "*")) (message-narrow-to-headers) (setq to (message-fetch-field "to")) @@ -4871,7 +4912,7 @@ than 988 characters long, and if they are not, trim them until they are." (or (car (mail-extract-address-components to)) to) "*")) ((and group (not (string= group ""))) - (concat "*sent news on " group "*")) + (concat "*sent posting on " group "*")) (t "*sent mail*")))) (unless (string-equal name (buffer-name)) (rename-buffer name t))))) @@ -5054,7 +5095,7 @@ OTHER-HEADERS is an alist of header/value pairs." "Start editing a news article to be sent." (interactive) (let ((message-this-is-news t)) - (message-pop-to-buffer (message-buffer-name "news" nil newsgroups)) + (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)) (message-setup `((Newsgroups . ,(or newsgroups "")) (Subject . ,(or subject "")))))) @@ -5851,7 +5892,7 @@ you." (special-display-regexps nil) (same-window-buffer-names nil) (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "news" nil newsgroups))) + (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) (let ((message-this-is-news t)) (message-setup `((Newsgroups . ,(or newsgroups "")) (Subject . ,(or subject "")))))) @@ -5865,7 +5906,7 @@ you." (special-display-regexps nil) (same-window-buffer-names nil) (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "news" nil newsgroups))) + (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) (let ((message-this-is-news t)) (message-setup `((Newsgroups . ,(or newsgroups "")) (Subject . ,(or subject "")))))) @@ -5939,6 +5980,9 @@ which specify the range to operate on." (tool-bar-add-item-from-menu 'message-insert-importance-low "unimportant" message-mode-map) + (tool-bar-add-item-from-menu + 'message-insert-disposition-notification-to "receipt" + message-mode-map) tool-bar-map))))) ;;; Group name completion. @@ -6178,11 +6222,11 @@ regexp varstr." (message-narrow-to-headers-or-head) (message-remove-first-header "Content-Type") (message-remove-first-header "Content-Transfer-Encoding")) - ;; We always make sure that the message has a Content-Type header. - ;; This is because some broken MTAs and MUAs get awfully confused - ;; when confronted with a message with a MIME-Version header and - ;; without a Content-Type header. For instance, Solaris' - ;; /usr/bin/mail. + ;; We always make sure that the message has a Content-Type + ;; header. This is because some broken MTAs and MUAs get + ;; awfully confused when confronted with a message with a + ;; MIME-Version header and without a Content-Type header. For + ;; instance, Solaris' /usr/bin/mail. (unless content-type-p (goto-char (point-min)) ;; For unknown reason, MIME-Version doesn't exist. @@ -6190,16 +6234,16 @@ regexp varstr." (forward-line 1) (insert "Content-Type: text/plain; charset=us-ascii\n")))))) -(defun message-read-from-minibuffer (prompt) +(defun message-read-from-minibuffer (prompt &optional initial-contents) "Read from the minibuffer while providing abbrev expansion." (if (fboundp 'mail-abbrevs-setup) (let ((mail-abbrev-mode-regexp "") (minibuffer-setup-hook 'mail-abbrevs-setup) (minibuffer-local-map message-minibuffer-local-map)) - (read-from-minibuffer prompt)) + (read-from-minibuffer prompt initial-contents)) (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) (minibuffer-local-map message-minibuffer-local-map)) - (read-string prompt)))) + (read-string prompt initial-contents)))) (defun message-use-alternative-email-as-from () (require 'mail-utils) diff --git a/lisp/mm-encode.el b/lisp/mm-encode.el index 98edfe8..fa44d45 100644 --- a/lisp/mm-encode.el +++ b/lisp/mm-encode.el @@ -1,5 +1,5 @@ ;;; mm-encode.el --- Functions for encoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko @@ -35,6 +35,7 @@ ("text/.*" qp-or-base64) ("message/rfc822" 8bit) ("application/emacs-lisp" 8bit) + ("application/x-emacs-lisp" 8bit) ("application/x-patch" 8bit) (".*" base64)) "Alist of regexps that match MIME types and their encodings. diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 38bc539..7c98056 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -1,5 +1,5 @@ ;;; mm-util.el --- Utility functions for Mule and low level things -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko @@ -284,6 +284,10 @@ prefer iso-2022-jp to japanese-shift-jis: '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8)) ") +(defvar mm-use-find-coding-systems-region + (fboundp 'find-coding-systems-region) + "Use `find-coding-systems-region' to find proper coding systems.") + ;;; Internal variables: ;;; Functions: @@ -334,10 +338,8 @@ used as the line break code type of the coding system." ) charset) ;; Translate invalid charsets. - ((mm-coding-system-p (setq charset - (cdr (assq charset - mm-charset-synonym-alist)))) - charset) + ((let ((cs (cdr (assq charset mm-charset-synonym-alist)))) + (and cs (mm-coding-system-p cs) cs))) ;; Last resort: search the coding system list for entries which ;; have the right mime-charset in case the canonical name isn't ;; defined (though it should be). @@ -399,6 +401,26 @@ Only used in Emacs Mule 4." (or (get-charset-property charset 'preferred-coding-system) (get-charset-property charset 'prefered-coding-system))) +(defsubst mm-guess-charset () + "Guess Mule charset from the language environment." + (or + mail-parse-mule-charset ;; cached mule-charset + (progn + (setq mail-parse-mule-charset + (and (boundp 'current-language-environment) + (car (last + (assq 'charset + (assoc current-language-environment + language-info-alist)))))) + (if (or (not mail-parse-mule-charset) + (eq mail-parse-mule-charset 'ascii)) + (setq mail-parse-mule-charset + (or (car (last (assq mail-parse-charset + mm-mime-mule-charset-alist))) + ;; default + 'latin-iso8859-1))) + mail-parse-mule-charset))) + (defun mm-charset-after (&optional pos) "Return charset of a character in current buffer at position POS. If POS is nil, it defauls to the current point. @@ -415,23 +437,7 @@ If the charset is `composition', return the actual one." (if (and charset (not (memq charset '(ascii eight-bit-control eight-bit-graphic)))) charset - (or - mail-parse-mule-charset ;; cached mule-charset - (progn - (setq mail-parse-mule-charset - (and (boundp 'current-language-environment) - (car (last - (assq 'charset - (assoc current-language-environment - language-info-alist)))))) - (if (or (not mail-parse-mule-charset) - (eq mail-parse-mule-charset 'ascii)) - (setq mail-parse-mule-charset - (or (car (last (assq mail-parse-charset - mm-mime-mule-charset-alist))) - ;; Fixme: don't fix that! - 'latin-iso8859-1))) - mail-parse-mule-charset))))))) + (mm-guess-charset)))))) (defun mm-mime-charset (charset) "Return the MIME charset corresponding to the given Mule CHARSET." @@ -459,14 +465,13 @@ If the charset is `composition', return the actual one." (setq result (cons head result))) (nreverse result))) -;; It's not clear whether this is supposed to mean the global or local -;; setting. I think it's used inconsistently. -- fx -(defsubst mm-multibyte-p () - "Say whether multibyte is enabled." - (if (and (not (featurep 'xemacs)) - (boundp 'enable-multibyte-characters)) - enable-multibyte-characters - (featurep 'mule))) +(if (and (not (featurep 'xemacs)) + (boundp 'enable-multibyte-characters)) + (defalias 'mm-multibyte-p + (lambda () + "Say whether multibyte is enabled in the current buffer." + enable-multibyte-characters)) + (defalias 'mm-multibyte-p (lambda () (featurep 'mule)))) (defun mm-iso-8859-x-to-15-region (&optional b e) (if (fboundp 'char-charset) @@ -500,7 +505,7 @@ charset, and a longer list means no appropriate charset." (let (charsets) ;; The return possibilities of this function are a mess... (or (and (mm-multibyte-p) - (fboundp 'find-coding-systems-region) + mm-use-find-coding-systems-region ;; Find the mime-charset of the most preferred coding ;; system that has one. (let ((systems (find-coding-systems-region b e))) @@ -725,6 +730,31 @@ If INHIBIT is non-nil, inhibit mm-inhibit-file-name-handlers." (push dir result)) (push path result)))) +(if (fboundp 'detect-coding-region) + (defun mm-detect-coding-region (start end) + "Like 'detect-coding-region' except returning the best one." + (let ((coding-systems + (detect-coding-region (point) (point-max)))) + (or (car-safe coding-systems) + coding-systems))) + (defun mm-detect-coding-region (start end) + (let ((point (point))) + (goto-char start) + (skip-chars-forward "\0-\177" end) + (prog1 + (if (eq (point) end) 'ascii (mm-guess-charset)) + (goto-char point))))) + +(if (fboundp 'coding-system-get) + (defun mm-detect-mime-charset-region (start end) + "Detect MIME charset of the text in the region between START and END." + (let ((cs (mm-detect-coding-region start end))) + (coding-system-get cs 'mime-charset))) + (defun mm-detect-mime-charset-region (start end) + "Detect MIME charset of the text in the region between START and END." + (let ((cs (mm-detect-coding-region start end))) + cs))) + (provide 'mm-util) ;;; mm-util.el ends here diff --git a/lisp/mm-view.el b/lisp/mm-view.el index af5386f..192b94f 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -1,5 +1,5 @@ ;;; mm-view.el --- functions for viewing MIME objects -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -296,6 +296,7 @@ (buffer-disable-undo) (mm-insert-part handle) (funcall mode) + (require 'font-lock) (let ((font-lock-verbose nil)) ;; I find font-lock a bit too verbose. (font-lock-fontify-buffer)) diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el index ac87492..d5baf3f 100644 --- a/lisp/mml-smime.el +++ b/lisp/mml-smime.el @@ -112,8 +112,9 @@ ;; todo: try dns/ldap automatically first, before prompting user (let (certs done) (while (not done) - (ecase (read (gnus-completing-read "dns" "Fetch certificate from" - '(("dns") ("file")) nil t)) + (ecase (read (gnus-completing-read-with-default + "dns" "Fetch certificate from" + '(("dns") ("file")) nil t)) (dns (setq certs (append certs (mml-smime-get-dns-cert)))) (file (setq certs (append certs diff --git a/lisp/mml.el b/lisp/mml.el index 47242c9..1a94898 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -1,5 +1,5 @@ ;;; mml.el --- A package for parsing and validating MML documents -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -35,6 +35,7 @@ (autoload 'gnus-setup-posting-charset "gnus-msg") (autoload 'gnus-add-minor-mode "gnus-ems") (autoload 'message-fetch-field "message") + (autoload 'fill-flowed-encode "flow-fill") (autoload 'message-posting-charset "message")) (defcustom mml-content-type-parameters @@ -64,6 +65,16 @@ NAME is a string containing the name of the TWEAK parameter in the MML handle. FUNCTION is a Lisp function which is called with the MML handle to tweak the part.") +(defvar mml-tweak-sexp-alist + '((mml-externalize-attachments . mml-tweak-externalize-attachments)) + "A list of (SEXP . FUNCTION) for tweaking MML parts. +SEXP is a s-expression. If the evaluation of SEXP is non-nil, FUNCTION +is called. FUNCTION is a Lisp function which is called with the MML +handle to tweak the part.") + +(defvar mml-externalize-attachments nil + "*If non-nil, local-file attachments are generated as external parts.") + (defvar mml-generate-multipart-alist nil "*Alist of multipart generation functions. Each entry has the form (NAME . FUNCTION), where @@ -276,6 +287,15 @@ A message part needs to be split into %d charset parts. Really send? " (setq contents (append (list (cons 'tag-location orig-point)) contents)) (cons (intern name) (nreverse contents)))) +(defun mml-buffer-substring-no-properties-except-hard-newlines (start end) + (let ((str (buffer-substring-no-properties start end)) + (bufstart start) tmp) + (while (setq tmp (text-property-any start end 'hard 't)) + (set-text-properties (- tmp bufstart) (- tmp bufstart -1) + '(hard t) str) + (setq start (1+ tmp))) + str)) + (defun mml-read-part (&optional mml) "Return the buffer up till the next part, multipart or closing part or multipart. If MML is non-nil, return the buffer up till the correspondent mml tag." @@ -289,19 +309,22 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (if (re-search-forward "<#\\(/\\)?mml." nil t) (setq count (+ count (if (match-beginning 1) -1 1))) (goto-char (point-max)))) - (buffer-substring-no-properties beg (if (> count 0) - (point) - (match-beginning 0)))) + (mml-buffer-substring-no-properties-except-hard-newlines + beg (if (> count 0) + (point) + (match-beginning 0)))) (if (re-search-forward "<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)." nil t) (prog1 - (buffer-substring-no-properties beg (match-beginning 0)) + (mml-buffer-substring-no-properties-except-hard-newlines + beg (match-beginning 0)) (if (or (not (match-beginning 1)) (equal (match-string 2) "multipart")) (goto-char (match-beginning 0)) (when (looking-at "[ \t]*\n") (forward-line 1)))) - (buffer-substring-no-properties beg (goto-char (point-max))))))) + (mml-buffer-substring-no-properties-except-hard-newlines + beg (goto-char (point-max))))))) (defvar mml-boundary nil) (defvar mml-base-boundary "-=-=") @@ -330,7 +353,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (cond ((or (eq (car cont) 'part) (eq (car cont) 'mml)) (let ((raw (cdr (assq 'raw cont))) - coded encoding charset filename type) + coded encoding charset filename type flowed) (setq type (or (cdr (assq 'type cont)) "text/plain")) (if (and (not raw) (member (car (split-string type "/")) '("text" "message"))) @@ -377,8 +400,24 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (setq charset (mm-encode-body charset)) (setq encoding (mm-body-encoding charset (cdr (assq 'encoding cont)))))) + ;; Only perform format=flowed filling on text/plain + ;; parts where there either isn't a format parameter + ;; in the mml tag or it says "flowed" and there + ;; actually are hard newlines in the text. + (let (use-hard-newlines) + (when (and (string= type "text/plain") + (or (null (assq 'format cont)) + (string= (assq 'format cont) "flowed")) + (setq use-hard-newlines + (text-property-any + (point-min) (point-max) 'hard 't))) + (fill-flowed-encode) + ;; Indicate that `mml-insert-mime-headers' should + ;; insert a "; format=flowed" string unless the + ;; user has already specified it. + (setq flowed (null (assq 'format cont))))) (setq coded (buffer-string))) - (mml-insert-mime-headers cont type charset encoding) + (mml-insert-mime-headers cont type charset encoding flowed) (insert "\n") (insert coded)) (mm-with-unibyte-buffer @@ -393,7 +432,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (insert (cdr (assq 'contents cont))))) (setq encoding (mm-encode-buffer type) coded (mm-string-as-multibyte (buffer-string)))) - (mml-insert-mime-headers cont type charset encoding) + (mml-insert-mime-headers cont type charset encoding nil) (insert "\n") (mm-with-unibyte-current-buffer (insert coded))))) @@ -462,7 +501,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (if (setq sender (cdr (assq 'sender cont))) (message-options-set 'message-sender sender)) (if (setq recipients (cdr (assq 'recipients cont))) - (message-options-set 'message-sender recipients)) + (message-options-set 'message-recipients recipients)) (funcall (nth 1 item) cont))) (let ((item (assoc (cdr (assq 'encrypt cont)) mml-encrypt-alist)) sender recipients) @@ -470,7 +509,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (if (setq sender (cdr (assq 'sender cont))) (message-options-set 'message-sender sender)) (if (setq recipients (cdr (assq 'recipients cont))) - (message-options-set 'message-sender recipients)) + (message-options-set 'message-recipients recipients)) (funcall (nth 1 item) cont)))))) (defun mml-compute-boundary (cont) @@ -513,13 +552,14 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." "") mml-base-boundary)) -(defun mml-insert-mime-headers (cont type charset encoding) +(defun mml-insert-mime-headers (cont type charset encoding flowed) (let (parameters disposition description) (setq parameters (mml-parameter-string cont mml-content-type-parameters)) (when (or charset parameters + flowed (not (equal type mml-generate-default-type))) (when (consp charset) (error @@ -528,6 +568,8 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (when charset (insert "; " (mail-header-encode-parameter "charset" (symbol-name charset)))) + (when flowed + (insert "; format=flowed")) (when parameters (mml-insert-parameter-string cont mml-content-type-parameters)) @@ -626,6 +668,9 @@ If HANDLES is non-nil, use it instead reparsing the buffer." (message-encode-message-body) (save-restriction (message-narrow-to-headers-or-head) + ;; Skip past any From_ headers. + (while (looking-at "From ") + (forward-line 1)) (let ((mail-parse-charset message-default-charset)) (mail-encode-encoded-word-buffer)))) @@ -928,7 +973,8 @@ If RAW, don't highlight the article." (erase-buffer) (mm-disable-multibyte) (insert s))) - (let ((gnus-newsgroup-charset (car message-posting-charset))) + (let ((gnus-newsgroup-charset (car message-posting-charset)) + gnus-article-prepare-hook gnus-original-article-buffer) (run-hooks 'gnus-article-decode-hook) (let ((gnus-newsgroup-name "dummy")) (gnus-article-prepare-display)))) @@ -962,7 +1008,23 @@ If RAW, don't highlight the article." (setq alist (cdr alist))))))) (if func (funcall func cont) - cont))) + cont) + (let ((alist mml-tweak-sexp-alist)) + (while alist + (if (eval (caar alist)) + (funcall (cdar alist) cont)) + (setq alist (cdr alist))))) + cont) + +(defun mml-tweak-externalize-attachments (cont) + "Tweak attached files as external parts." + (let (filename-cons) + (when (and (eq (car cont) 'part) + (not (cdr (assq 'buffer cont))) + (and (setq filename-cons (assq 'filename cont)) + (not (equal (cdr (assq 'nofile cont)) "yes")))) + (setcar cont 'external) + (setcar filename-cons 'name)))) (provide 'mml) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index 69fe63c..b86a2e1 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -417,14 +417,13 @@ by you.") (match-string 1))) (fprint (and (re-search-forward "^\\[GNUPG:\\] VALIDSIG \\([0-9a-zA-Z]*\\) " - nil t) + nil t) (match-string 1))) - (trust (and (re-search-forward "^\\[GNUPG:\\] \\(TRUST_.*\\)$" - nil t) + (trust (and (re-search-forward "^\\[GNUPG:\\] \\(TRUST_.*\\)$" nil t) (match-string 1))) (trust-good-enough-p (cdr (assoc (cdr (assoc trust gpg-unabbrev-trust-alist)) - mml2015-trust-boundaries-alist)))) + mml2015-trust-boundaries-alist)))) (if (and signer trust fprint) (concat signer (unless trust-good-enough-p diff --git a/lisp/nnagent.el b/lisp/nnagent.el index 6a3b7be..c77b91f 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -1,6 +1,6 @@ ;;; nnagent.el --- offline backend for Gnus -;; Copyright (C) 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -128,6 +128,46 @@ (append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags"))) nil) +(deffoo nnagent-retrieve-headers (articles &optional group server fetch-old) + (let ((file (gnus-agent-article-name ".overview" group)) + arts n) + (save-excursion + (gnus-agent-load-alist group) + (setq arts (gnus-set-difference articles + (mapcar 'car gnus-agent-article-alist))) + (set-buffer nntp-server-buffer) + (erase-buffer) + (nnheader-insert-file-contents file) + (goto-char (point-min)) + (while (and arts (not (eobp))) + (cond + ((looking-at "[0-9]") + (setq n (read (current-buffer))) + (if (> n (car arts)) + (beginning-of-line)) + (while (and arts (> n (car arts))) + (insert (format + "%d\t[Undownloaded article %d]\tGnus Agent\t\t\t\n" + (car arts) (car arts))) + (pop arts)) + (if (and arts (= n (car arts))) + (pop arts)))) + (forward-line 1)) + (while (and arts) + (insert (format + "%d\t[Undownloaded article %d]\tGnus Agent\t\t\t\n" + (car arts) (car arts))) + (pop arts)) + (if (and fetch-old + (not (numberp fetch-old))) + t ; Don't remove anything. + (nnheader-nov-delete-outside-range + (if fetch-old (max 1 (- (car articles) fetch-old)) + (car articles)) + (car (last articles))) + t) + 'nov))) + (deffoo nnagent-request-group (group &optional server dont-check) (nnoo-parent-function 'nnagent 'nnml-request-group (list group (nnagent-server server) dont-check))) @@ -178,10 +218,6 @@ (nnoo-parent-function 'nnagent 'nnml-request-scan (list group (nnagent-server server)))) -(deffoo nnagent-retrieve-headers (sequence &optional group server fetch-old) - (nnoo-parent-function 'nnagent 'nnml-retrieve-headers - (list sequence group (nnagent-server server) fetch-old))) - (deffoo nnagent-set-status (article name value &optional group server) (nnoo-parent-function 'nnagent 'nnml-set-status (list article name value group (nnagent-server server)))) diff --git a/lisp/nneething.el b/lisp/nneething.el index 7b713c4..9901397 100644 --- a/lisp/nneething.el +++ b/lisp/nneething.el @@ -1,6 +1,6 @@ ;;; nneething.el --- arbitrary file access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -73,6 +73,103 @@ included.") (defvoo nneething-active nil) (defvoo nneething-address nil) +(defvar nneething-mime-extensions + '(("" . "text/plain") + (".abs" . "audio/x-mpeg") + (".aif" . "audio/aiff") + (".aifc" . "audio/aiff") + (".aiff" . "audio/aiff") + (".ano" . "application/x-annotator") + (".au" . "audio/ulaw") + (".avi" . "video/x-msvideo") + (".bcpio" . "application/x-bcpio") + (".bin" . "application/octet-stream") + (".cdf" . "application/x-netcdr") + (".cpio" . "application/x-cpio") + (".csh" . "application/x-csh") + (".css" . "text/css") + (".dvi" . "application/x-dvi") + (".diff" . "text/x-patch") + (".el" . "application/emacs-lisp") + (".eps" . "application/postscript") + (".etx" . "text/x-setext") + (".exe" . "application/octet-stream") + (".fax" . "image/x-fax") + (".gif" . "image/gif") + (".hdf" . "application/x-hdf") + (".hqx" . "application/mac-binhex40") + (".htm" . "text/html") + (".html" . "text/html") + (".icon" . "image/x-icon") + (".ief" . "image/ief") + (".jpg" . "image/jpeg") + (".macp" . "image/x-macpaint") + (".man" . "application/x-troff-man") + (".me" . "application/x-troff-me") + (".mif" . "application/mif") + (".mov" . "video/quicktime") + (".movie" . "video/x-sgi-movie") + (".mp2" . "audio/x-mpeg") + (".mp3" . "audio/x-mpeg") + (".mp2a" . "audio/x-mpeg2") + (".mpa" . "audio/x-mpeg") + (".mpa2" . "audio/x-mpeg2") + (".mpe" . "video/mpeg") + (".mpeg" . "video/mpeg") + (".mpega" . "audio/x-mpeg") + (".mpegv" . "video/mpeg") + (".mpg" . "video/mpeg") + (".mpv" . "video/mpeg") + (".ms" . "application/x-troff-ms") + (".nc" . "application/x-netcdf") + (".nc" . "application/x-netcdf") + (".oda" . "application/oda") + (".patch" . "text/x-patch") + (".pbm" . "image/x-portable-bitmap") + (".pdf" . "application/pdf") + (".pgm" . "image/portable-graymap") + (".pict" . "image/pict") + (".png" . "image/png") + (".pnm" . "image/x-portable-anymap") + (".ppm" . "image/portable-pixmap") + (".ps" . "application/postscript") + (".qt" . "video/quicktime") + (".ras" . "image/x-raster") + (".rgb" . "image/x-rgb") + (".rtf" . "application/rtf") + (".rtx" . "text/richtext") + (".sh" . "application/x-sh") + (".sit" . "application/x-stuffit") + (".siv" . "application/sieve") + (".snd" . "audio/basic") + (".src" . "application/x-wais-source") + (".tar" . "archive/tar") + (".tcl" . "application/x-tcl") + (".tex" . "application/x-tex") + (".texi" . "application/texinfo") + (".tga" . "image/x-targa") + (".tif" . "image/tiff") + (".tiff" . "image/tiff") + (".tr" . "application/x-troff") + (".troff" . "application/x-troff") + (".tsv" . "text/tab-separated-values") + (".txt" . "text/plain") + (".vbs" . "video/mpeg") + (".vox" . "audio/basic") + (".vrml" . "x-world/x-vrml") + (".wav" . "audio/x-wav") + (".xls" . "application/vnd.ms-excel") + (".wrl" . "x-world/x-vrml") + (".xbm" . "image/xbm") + (".xpm" . "image/xpm") + (".xwd" . "image/windowdump") + (".zip" . "application/zip") + (".ai" . "application/postscript") + (".jpe" . "image/jpeg") + (".jpeg" . "image/jpeg")) + "An alist of file extensions and corresponding MIME content-types. +This variable is used as the alternative of `mailcap-mime-extensions'.") + ;;; Interface functions. @@ -126,11 +223,25 @@ included.") (file-exists-p file) ; The file exists. (not (file-directory-p file)) ; It's not a dir. (save-excursion - (nnmail-find-file file) ; Insert the file in the nntp buf. + (let ((nnmail-file-coding-system 'binary)) + (nnmail-find-file file)) ; Insert the file in the nntp buf. (unless (nnheader-article-p) ; Either it's a real article... - (goto-char (point-min)) - (nneething-make-head - file (current-buffer)) ; ... or we fake some headers. + (let ((type + (unless (file-directory-p file) + (or (cdr (assoc (concat "." (file-name-extension file)) + (if (boundp 'mailcap-mime-extensions) + (symbol-value 'mailcap-mime-extensions) + nneething-mime-extensions))) + "text/plain"))) + (charset + (mm-detect-mime-charset-region (point-min) (point-max))) + (encoding)) + (unless (string-match "\\`text/" type) + (base64-encode-region (point-min) (point-max)) + (setq encoding "base64")) + (goto-char (point-min)) + (nneething-make-head file (current-buffer) + nil type charset encoding)) (insert "\n")) t)))) @@ -272,13 +383,44 @@ included.") (insert-buffer-substring nneething-work-buffer) (goto-char (point-max)))) -(defun nneething-make-head (file &optional buffer extra-msg) +(defun nneething-encode-file-name (file &optional coding-system) + "Encode the name of the FILE in CODING-SYSTEM." + (let ((pos 0) buf) + (setq file (mm-encode-coding-string + file (or coding-system nnmail-pathname-coding-system))) + (while (string-match "[^-a-zA-Z_:/.]" file pos) + (setq buf (cons (format "%%%02x" (aref file (match-beginning 0))) + (cons (substring file pos (match-beginning 0)) buf)) + pos (match-end 0))) + (apply (function concat) + (nreverse (cons (substring file pos) buf))))) + +(defun nneething-decode-file-name (file &optional coding-system) + "Decode the name of the FILE is encoded in CODING-SYSTEM." + (let ((pos 0) buf) + (while (string-match "%\\([0-9a-fA-F][0-9a-fA-F]\\)" file pos) + (setq buf (cons (string (string-to-number (match-string 1 file) 16)) + (cons (substring file pos (match-beginning 0)) buf)) + pos (match-end 0))) + (decode-coding-string + (apply (function concat) + (nreverse (cons (substring file pos) buf))) + (or coding-system nnmail-pathname-coding-system)))) + +(defun nneething-get-file-name (id) + "Extract the file name from the message ID string." + (when (string-match "\\`\\'" id) + (nneething-decode-file-name (match-string 1 id)))) + +(defun nneething-make-head (file &optional buffer extra-msg + mime-type mime-charset mime-encoding) "Create a head by looking at the file attributes of FILE." (let ((atts (file-attributes file))) (insert "Subject: " (file-name-nondirectory file) (or extra-msg "") "\n" "Message-ID: \n" (if (equal '(0 0) (nth 5 atts)) "" (concat "Date: " (current-time-string (nth 5 atts)) "\n")) @@ -297,6 +439,19 @@ included.") (concat "Lines: " (int-to-string (count-lines (point-min) (point-max))) "\n")) + "") + (if mime-type + (concat "Content-Type: " mime-type + (if mime-charset + (concat "; charset=" + (if (stringp mime-charset) + mime-charset + (symbol-name mime-charset))) + "") + (if mime-encoding + (concat "\nContent-Transfer-Encoding: " mime-encoding) + "") + "\nMIME-Version: 1.0\n") "")))) (defun nneething-from-line (uid &optional file) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 3ca1246..97e6a1b 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -1164,13 +1164,14 @@ This command does not work if you use short group names." (nnfolder-open-marks group server) ;; Update info using `nnfolder-marks'. (mapcar (lambda (pred) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnfolder-marks)) - (gnus-info-marks info)) - t)) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnfolder-marks)) + (gnus-info-marks info)) + t))) gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnfolder-marks)))) (gnus-info-set-read info diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 55ae38a..afa0959 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1207,7 +1207,35 @@ find-file-hooks, etc. (defalias 'mm-multibyte-string-p (if (fboundp 'multibyte-string-p) 'multibyte-string-p - 'ignore))) + 'ignore)) + + (defun nnheader-detect-coding-region (start end) + "Like 'detect-coding-region' except returning the best one." + (let ((coding-systems + (static-if (boundp 'MULE) + (code-detect-region (point) (point-max)) + (detect-coding-region (point) (point-max))))) + (or (car-safe coding-systems) + coding-systems))) + (defalias 'mm-detect-coding-region 'nnheader-detect-coding-region) + + (defun nnheader-detect-mime-charset-region (start end) + "Detect MIME charset of the text in the region between START and END." + (coding-system-to-mime-charset + (nnheader-detect-coding-region start end))) + (defalias 'mm-detect-mime-charset-region + 'nnheader-detect-mime-charset-region) + + (defmacro nnheader-with-unibyte-buffer (&rest forms) + "Create a temporary buffer, and evaluate FORMS there like `progn'. +Use unibyte mode for this." + `(let (default-enable-multibyte-characters mc-flag) + (with-temp-buffer ,@forms))) + (put 'nnheader-with-unibyte-buffer 'lisp-indent-function 0) + (put 'nnheader-with-unibyte-buffer 'edebug-form-spec '(body)) + (put 'mm-with-unibyte-buffer 'lisp-indent-function 0) + (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body)) + (defalias 'mm-with-unibyte-buffer 'nnheader-with-unibyte-buffer)) ;; mail-parse stuff. (unless (featurep 'mail-parse) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 6740e65..be9f8cc 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -196,7 +196,9 @@ RFC2060 section 6.4.4." :group 'nnimap :type 'sexp) -(defcustom nnimap-close-asynchronous nil +;; Performance / bug workaround variables + +(defcustom nnimap-close-asynchronous t "Close mailboxes asynchronously in `nnimap-close-group'. This means that errors cought by nnimap when closing the mailbox will not prevent Gnus from updating the group status, which may be harmful. @@ -204,6 +206,18 @@ However, it increases speed." :type 'boolean :group 'nnimap) +(defcustom nnimap-dont-close t + "Never close mailboxes. +This increases the speed of closing mailboxes (quiting group) but may +decrease the speed of selecting another mailbox later. Re-selecting +the same mailbox will be faster though." + :type 'boolean + :group 'nnimap) + +(defvoo nnimap-need-unselect-to-notice-new-mail nil + "Unselect mailboxes before looking for new mail in them. +Some servers seem to need this under some circumstances.") + ;; Authorization / Privacy variables (defvoo nnimap-auth-method nil @@ -421,16 +435,18 @@ If SERVER is nil, uses the current server." (defun nnimap-before-find-minmax-bugworkaround () "Function called before iterating through mailboxes with `nnimap-find-minmax-uid'." - ;; XXX this is for UoW imapd problem, it doesn't notice new mail in - ;; currently selected mailbox without a re-select/examine. - (or (null (imap-current-mailbox nnimap-server-buffer)) - (imap-mailbox-unselect nnimap-server-buffer))) + (when nnimap-need-unselect-to-notice-new-mail + ;; XXX this is for UoW imapd problem, it doesn't notice new mail in + ;; currently selected mailbox without a re-select/examine. + (or (null (imap-current-mailbox nnimap-server-buffer)) + (imap-mailbox-unselect nnimap-server-buffer)))) (defun nnimap-find-minmax-uid (group &optional examine) "Find lowest and highest active article nummber in GROUP. If EXAMINE is non-nil the group is selected read-only." (with-current-buffer nnimap-server-buffer - (when (imap-mailbox-select group examine) + (when (or (string= group (imap-current-mailbox)) + (imap-mailbox-select group examine)) (let (minuid maxuid) (when (> (imap-mailbox-get 'exists) 0) (imap-fetch "1,*" "UID" nil 'nouidfetch) @@ -846,15 +862,18 @@ function is generally only called when Gnus is shutting down." (when (and (imap-opened) (nnimap-possibly-change-group group server)) (case nnimap-expunge-on-close - (always (imap-mailbox-expunge nnimap-close-asynchronous) - (imap-mailbox-close nnimap-close-asynchronous)) + (always (progn + (imap-mailbox-expunge nnimap-close-asynchronous) + (unless nnimap-dont-close + (imap-mailbox-close nnimap-close-asynchronous)))) (ask (if (and (imap-search "DELETED") - (gnus-y-or-n-p (format - "Expunge articles in group `%s'? " - imap-current-mailbox))) - (progn (imap-mailbox-expunge nnimap-close-asynchronous) - (imap-mailbox-close nnimap-close-asynchronous)) - (imap-mailbox-unselect))) + (gnus-y-or-n-p (format "Expunge articles in group `%s'? " + imap-current-mailbox))) + (progn + (imap-mailbox-expunge nnimap-close-asynchronous) + (unless nnimap-dont-close + (imap-mailbox-close nnimap-close-asynchronous))) + (imap-mailbox-unselect))) (t (imap-mailbox-unselect))) (not imap-current-mailbox)))) diff --git a/lisp/nnkiboze.el b/lisp/nnkiboze.el index b705d2e..b610abe 100644 --- a/lisp/nnkiboze.el +++ b/lisp/nnkiboze.el @@ -110,7 +110,8 @@ (setq num (string-to-int (match-string 2 xref)) group (match-string 1 xref)) (or (with-current-buffer buffer - (gnus-cache-request-article num group)) + (or (gnus-cache-request-article num group) + (gnus-agent-request-article num group))) (gnus-request-article num group buffer))))) (deffoo nnkiboze-request-scan (&optional group server) @@ -254,6 +255,7 @@ Finds out what articles are to be part of the nnkiboze groups." (load newsrc-file)) (let ((coding-system-for-write nnkiboze-file-coding-system) (output-coding-system nnkiboze-file-coding-system)) + (gnus-make-directory (file-name-directory nov-file)) (with-temp-file nov-file (when (file-exists-p nov-file) (nnheader-insert-file-contents nov-file)) @@ -342,6 +344,7 @@ Finds out what articles are to be part of the nnkiboze groups." (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc)) (setq newsrc (cdr newsrc))))) ;; We save the kiboze newsrc for this group. + (gnus-make-directory (file-name-directory newsrc-file)) (with-temp-file newsrc-file (insert "(setq nnkiboze-newsrc '") (gnus-prin1 nnkiboze-newsrc) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 8419806..52c993c 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1,5 +1,5 @@ ;;; nnmail.el --- mail support functions for the Gnus mail backends -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -465,7 +465,7 @@ parameter. It should return nil, `warn' or `delete'." (const warn) (const delete))) -(defcustom nnmail-extra-headers nil +(defcustom nnmail-extra-headers '(To Newsgroups) "*Extra headers to parse." :version "21.1" :group 'nnmail @@ -703,7 +703,7 @@ If SOURCE is a directory spec, try to return the group name component." (defsubst nnmail-search-unix-mail-delim () "Put point at the beginning of the next Unix mbox message." - ;; Algorithm used to find the the next article in the + ;; Algorithm used to find the next article in the ;; brain-dead Unix mbox format: ;; ;; 1) Search for "^From ". @@ -732,7 +732,7 @@ If SOURCE is a directory spec, try to return the group name component." (defun nnmail-search-unix-mail-delim-backward () "Put point at the beginning of the current Unix mbox message." - ;; Algorithm used to find the the next article in the + ;; Algorithm used to find the next article in the ;; brain-dead Unix mbox format: ;; ;; 1) Search for "^From ". @@ -1072,13 +1072,11 @@ FUNC will be called with the group name to determine the article number." (funcall func (car method))))))))) ;; Produce a trace if non-empty. (when (and trace nnmail-split-trace) - (let ((trace (nreverse nnmail-split-trace)) - (restore (current-buffer))) + (let ((restore (current-buffer))) (nnheader-set-temp-buffer "*Split Trace*") (gnus-add-buffer) - (while trace - (insert (car trace) "\n") - (setq trace (cdr trace))) + (dolist (trace (nreverse nnmail-split-trace)) + (insert trace "\n")) (goto-char (point-min)) (gnus-configure-windows 'split-trace) (set-buffer restore))) diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 61c7c41..9525854 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -1,5 +1,5 @@ ;;; nnmaildir.el --- maildir backend for Gnus -;; Copyright (c) 2001 Free Software Foundation, Inc. +;; Copyright (c) 2001, 2002 Free Software Foundation, Inc. ;; Copyright (c) 2000, 2001 Paul Jarc ;; Author: Paul Jarc @@ -30,17 +30,15 @@ ;; ;; Some goals of nnmaildir: ;; * Everything Just Works, and correctly. E.g., stale NOV data is -;; ignored when articles have been edited; no need for -;; -generate-nov-databases. +;; ignored; no need for -generate-nov-databases. ;; * Perfect reliability: [C-g] will never corrupt its data in memory, ;; and SIGKILL will never corrupt its data in the filesystem. ;; * We make it easy to manipulate marks, etc., from outside Gnus. ;; * All information about a group is stored in the maildir, for easy -;; backup and restoring. +;; backup, copying, restoring, etc. ;; * We use the filesystem as a database. ;; ;; Todo: -;; * Ignore old NOV data when gnus-extra-headers has changed. ;; * Don't force article renumbering, so nnmaildir can be used with ;; the cache and agent. Alternatively, completely rewrite the Gnus ;; backend interface, which would have other advantages. @@ -136,7 +134,9 @@ by nnmaildir-request-article.") ["subject\tfrom\tdate" "references\tchars\lines" "extra" - article-file-modtime]] + article-file-modtime + ;; The value of nnmail-extra-headers when this NOV data was parsed: + (to in-reply-to)]] (defmacro nnmaildir--srv-new () '(make-vector 11 nil)) (defmacro nnmaildir--srv-get-name (server) `(aref ,server 0)) @@ -213,15 +213,17 @@ by nnmaildir-request-article.") (defmacro nnmaildir--art-set-msgid (article val) `(aset ,article 3 ,val)) (defmacro nnmaildir--art-set-nov (article val) `(aset ,article 4 ,val)) -(defmacro nnmaildir--nov-new () '(make-vector 4 nil)) +(defmacro nnmaildir--nov-new () '(make-vector 5 nil)) (defmacro nnmaildir--nov-get-beg (nov) `(aref ,nov 0)) (defmacro nnmaildir--nov-get-mid (nov) `(aref ,nov 1)) (defmacro nnmaildir--nov-get-end (nov) `(aref ,nov 2)) (defmacro nnmaildir--nov-get-mtime (nov) `(aref ,nov 3)) +(defmacro nnmaildir--nov-get-neh (nov) `(aref ,nov 4)) (defmacro nnmaildir--nov-set-beg (nov val) `(aset ,nov 0 ,val)) (defmacro nnmaildir--nov-set-mid (nov val) `(aset ,nov 1 ,val)) (defmacro nnmaildir--nov-set-end (nov val) `(aset ,nov 2 ,val)) (defmacro nnmaildir--nov-set-mtime (nov val) `(aset ,nov 3 ,val)) +(defmacro nnmaildir--nov-set-neh (nov val) `(aset ,nov 4 ,val)) (defmacro nnmaildir--srv-grp-dir (srv-dir gname) `(file-name-as-directory (concat ,srv-dir ,gname))) @@ -289,7 +291,8 @@ by nnmaildir-request-article.") (defun nnmaildir--update-nov (srv-dir group article) (let ((nnheader-file-coding-system 'binary) dir gname pgname msgdir prefix suffix file attr mtime novdir novfile - nov msgid nov-beg nov-mid nov-end field pos extra val deactivate-mark) + nov msgid nov-beg nov-mid nov-end field pos extra val old-neh new-neh + deactivate-mark) (catch 'return (setq suffix (nnmaildir--art-get-suffix article)) (if (stringp suffix) nil @@ -315,17 +318,35 @@ by nnmaildir-request-article.") novfile (concat novdir prefix)) (save-excursion (set-buffer (get-buffer-create " *nnmaildir nov*")) - (when (file-exists-p novfile) - (and nov - (equal mtime (nnmaildir--nov-get-mtime nov)) - (throw 'return nov)) - (erase-buffer) - (nnheader-insert-file-contents novfile) - (setq nov (read (current-buffer))) - (nnmaildir--art-set-msgid article (car nov)) - (setq nov (cadr nov)) - (and (equal mtime (nnmaildir--nov-get-mtime nov)) - (throw 'return nov))) + (when (file-exists-p novfile) ;; If not, force reparsing the message. + (if nov nil ;; It's already in memory. + ;; Else read the data from the NOV file. + (erase-buffer) + (nnheader-insert-file-contents novfile) + (setq nov (read (current-buffer))) + (nnmaildir--art-set-msgid article (car nov)) + (setq nov (cadr nov))) + ;; If the NOV's modtime matches the file's current modtime, + ;; and it has the right length (i.e., it wasn't produced by + ;; a too-much older version of nnmaildir), then we may use + ;; this NOV data rather than parsing the message file, + ;; unless nnmail-extra-headers has been augmented since this + ;; data was last parsed. + (when (and (equal mtime (nnmaildir--nov-get-mtime nov)) + (= (length nov) (length (nnmaildir--nov-new)))) + ;; This NOV data is potentially up-to-date. + (setq old-neh (nnmaildir--nov-get-neh nov) + new-neh nnmail-extra-headers) + (if (equal new-neh old-neh) (throw 'return nov)) ;; Common case. + ;; They're not equal, but maybe the new is a subset of the old... + (if (null new-neh) (throw 'return nov)) + (while new-neh + (if (memq (car new-neh) old-neh) + (progn + (setq new-neh (cdr new-neh)) + (if new-neh nil (throw 'return nov))) + (setq new-neh nil))))) + ;; Parse the NOV data out of the message. (erase-buffer) (nnheader-insert-file-contents file) (insert "\n") @@ -399,8 +420,9 @@ by nnmaildir-request-article.") (nnmaildir--nov-set-mid nov nov-mid) (nnmaildir--nov-set-end nov nov-end) (nnmaildir--nov-set-mtime nov mtime) + (nnmaildir--nov-set-neh nov (copy-sequence nnmail-extra-headers)) (prin1 (list msgid nov) (current-buffer)) - (setq file (concat novdir ":")) + (setq file (concat novfile ":")) (nnmaildir--unlink file) (write-region (point-min) (point-max) file nil 'no-message)) (rename-file file novfile 'replace) @@ -1438,7 +1460,8 @@ by nnmaildir-request-article.") (let ((no-force (not force)) (group (nnmaildir--prepare server gname)) pgname time boundary time-iter bound-iter high low target dir nlist - stop num article didnt suffix nnmaildir--file deactivate-mark) + stop number article didnt suffix nnmaildir--file + nnmaildir-article-file-name deactivate-mark) (catch 'return (if group nil (nnmaildir--srv-set-error nnmaildir--cur-server @@ -1460,11 +1483,7 @@ by nnmaildir-request-article.") high (1- high))) (setcar (cdr boundary) low) (setcar boundary high) - (setq target (nnmaildir--param pgname 'expire-group) - target (and (stringp target) - (not (string-equal target pgname)) - target) - dir (nnmaildir--srv-get-dir nnmaildir--cur-server) + (setq dir (nnmaildir--srv-get-dir nnmaildir--cur-server) dir (nnmaildir--srv-grp-dir dir gname) dir (nnmaildir--cur dir) nlist (nnmaildir--grp-get-lists group) @@ -1473,17 +1492,17 @@ by nnmaildir-request-article.") (save-excursion (set-buffer (get-buffer-create " *nnmaildir move*")) (while ranges - (setq num (car ranges) ranges (cdr ranges)) - (while (eq num (car ranges)) + (setq number (car ranges) ranges (cdr ranges)) + (while (eq number (car ranges)) (setq ranges (cdr ranges))) - (if (numberp num) (setq stop num) - (setq stop (car num) num (cdr num))) - (setq nlist (nthcdr (- (nnmaildir--art-get-num (car nlist)) num) + (if (numberp number) (setq stop number) + (setq stop (car number) number (cdr number))) + (setq nlist (nthcdr (- (nnmaildir--art-get-num (car nlist)) number) nlist)) (while (and nlist (setq article (car nlist) - num (nnmaildir--art-get-num article)) - (>= num stop)) + number (nnmaildir--art-get-num article)) + (>= number stop)) (setq nlist (cdr nlist) suffix (nnmaildir--art-get-suffix article)) (catch 'continue @@ -1509,14 +1528,20 @@ by nnmaildir-request-article.") time-iter (cdr time-iter))) (and bound-iter time-iter (car-less-than-car bound-iter time-iter)))) - (setq didnt (cons (nnmaildir--art-get-num article) didnt)) - (when target + (setq didnt (cons number didnt)) + (save-excursion + (setq nnmaildir-article-file-name nnmaildir--file + target (nnmaildir--param pgname 'expire-group))) + (when (and (stringp target) + (not (string-equal target pgname))) ;; Move it. (erase-buffer) (nnheader-insert-file-contents nnmaildir--file) (gnus-request-accept-article target nil nil 'no-encode)) - (nnmaildir--unlink nnmaildir--file) - (nnmaildir--art-set-suffix article 'expire) - (nnmaildir--art-set-nov article nil))))) + (if (equal target pgname) + (setq didnt (cons number didnt)) ;; Leave it here. + (nnmaildir--unlink nnmaildir--file) + (nnmaildir--art-set-suffix article 'expire) + (nnmaildir--art-set-nov article nil)))))) (erase-buffer)) didnt))) diff --git a/lisp/nnml.el b/lisp/nnml.el index 7f1a3e6..7f411b0 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -946,13 +946,14 @@ Use the nov database for the current group if available." (nnml-open-marks group server) ;; Update info using `nnml-marks'. (mapcar (lambda (pred) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnml-marks)) - (gnus-info-marks info)) - t)) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnml-marks)) + (gnus-info-marks info)) + t))) gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnml-marks)))) (gnus-info-set-read info diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 52bffad..e961d78 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -103,6 +103,17 @@ ;; '(index-range all prefetch-articles off encapsulate-images on ;; expiry-wait 6) +(unless (fboundp 'gnus-define-group-parameter) + (defmacro gnus-define-group-parameter (&rest args) nil) + (defun nnshimbun-find-group-parameters (name) + "Return a nnshimbun GROUP's group parameters." + (when name + (or (gnus-group-find-parameter name 'nnshimbun-group-parameters t) + (assoc-default name + (and (boundp 'nnshimbun-group-parameters-alist) + (symbol-value 'nnshimbun-group-parameters-alist)) + (function string-match)))))) + (gnus-define-group-parameter nnshimbun-group-parameters :type list diff --git a/lisp/nnslashdot.el b/lisp/nnslashdot.el index b03fc3b..49e8403 100644 --- a/lisp/nnslashdot.el +++ b/lisp/nnslashdot.el @@ -1,5 +1,5 @@ ;;; nnslashdot.el --- interfacing with Slashdot -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -23,9 +23,6 @@ ;;; Commentary: -;; Note: You need to have `url' and `w3' installed for this -;; backend to work. - ;;; Code: (eval-when-compile (require 'cl)) @@ -102,9 +99,10 @@ (let ((case-fold-search t)) (erase-buffer) (when (= start 1) - (mm-url-insert (format nnslashdot-article-url - (nnslashdot-sid-strip sid)) t) + (mm-url-insert (format nnslashdot-article-url sid) t) (goto-char (point-min)) + (if (eobp) + (error "Couldn't open connection to slashdot")) (re-search-forward "Posted by[ \t\r\n]+") (when (looking-at "\\(]+>\\)?[ \t\r\n]*\\([^<\r\n]+\\)") (setq from (mm-url-decode-entities-string (match-string 2)))) @@ -119,15 +117,14 @@ 1 (make-full-mail-header 1 group from date - (concat "<" (nnslashdot-sid-strip sid) "%1@slashdot>") + (concat "<" sid "%1@slashdot>") "" 0 lines nil nil)) headers) (setq start (if nnslashdot-threaded 2 (pop articles)))) (while (and start (<= start last)) (setq point (goto-char (point-max))) (mm-url-insert - (format nnslashdot-comments-url - (nnslashdot-sid-strip sid) + (format nnslashdot-comments-url sid nnslashdot-threshold 0 (- start 2)) t) (when (and nnslashdot-threaded first-comments) @@ -184,10 +181,9 @@ article (concat subject " (" score ")") from date - (concat "<" (nnslashdot-sid-strip sid) "%" cid "@slashdot>") + (concat "<" sid "%" cid "@slashdot>") (if parent - (concat "<" (nnslashdot-sid-strip sid) "%" - parent "@slashdot>") + (concat "<" sid "%" parent "@slashdot>") "") 0 lines nil nil)) headers) @@ -304,6 +300,8 @@ (mm-with-unibyte-buffer (mm-url-insert nnslashdot-backslash-url t) (goto-char (point-min)) + (if (eobp) + (error "Couldn't open connection to slashdot")) (while (search-forward "" nil t) (narrow-to-region (point) (search-forward "")) (goto-char (point-min)) @@ -356,7 +354,7 @@ (deffoo nnslashdot-request-post (&optional server) (nnslashdot-possibly-change-server nil server) - (let ((sid (nnslashdot-sid-strip (message-fetch-field "newsgroups"))) + (let ((sid (message-fetch-field "newsgroups")) (subject (message-fetch-field "subject")) (references (car (last (split-string (message-fetch-field "references"))))) @@ -507,8 +505,6 @@ ; (substring sid (match-end 0)) ; sid)) -(defalias 'nnslashdot-sid-strip 'identity) - (provide 'nnslashdot) ;;; nnslashdot.el ends here diff --git a/lisp/nnspool.el b/lisp/nnspool.el index dfc4ebd..7ca4f7a 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -1,7 +1,8 @@ ;;; nnspool.el --- spool access for GNU Emacs ;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000 Free Software Foundation, Inc. +;; 2000, 2002 +;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ;; Lars Magne Ingebrigtsen @@ -331,7 +332,8 @@ there.") () (nnheader-report 'nnspool "") (set-process-sentinel proc 'nnspool-inews-sentinel) - (process-send-region proc (point-min) (point-max)) + (mm-with-unibyte-current-buffer + (process-send-region proc (point-min) (point-max))) ;; We slap a condition-case around this, because the process may ;; have exited already... (ignore-errors diff --git a/lisp/nntp.el b/lisp/nntp.el index afb439f..583456e 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -1,7 +1,7 @@ ;;; nntp.el --- nntp access for Gnus + ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001 -;; Free Software Foundation, Inc. +;; 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Katsumi Yamaoka @@ -10,18 +10,18 @@ ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; it under the terms of the GNU General Public License as published +;; by the Free Software Foundation; either version 2, or (at your +;; option) any later version. -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; GNU Emacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Commentary: @@ -432,9 +432,9 @@ noticing asynchronous data.") (set-buffer buffer) (goto-char pos) (if (looking-at (regexp-quote command)) - (delete-region pos (progn (forward-line 1) (gnus-point-at-bol)))) - ))) - )) + (delete-region pos (progn + (forward-line 1) + (gnus-point-at-bol))))))))) (defun nntp-send-command-nodelete (wait-for &rest strings) "Send STRINGS to server and wait until WAIT-FOR returns." @@ -452,9 +452,9 @@ noticing asynchronous data.") (set-buffer buffer) (goto-char pos) (if (looking-at (regexp-quote command)) - (delete-region pos (progn (forward-line 1) (gnus-point-at-bol)))) - ))) - )) + (delete-region pos (progn + (forward-line 1) + (gnus-point-at-bol))))))))) (defun nntp-send-command-and-decode (wait-for &rest strings) "Send STRINGS to server and wait until WAIT-FOR returns." @@ -477,10 +477,9 @@ noticing asynchronous data.") (set-buffer buffer) (goto-char pos) (if (looking-at (regexp-quote command)) - (delete-region pos (progn (forward-line 1) (gnus-point-at-bol)))) - ))) - )) - + (delete-region pos (progn + (forward-line 1) + (gnus-point-at-bol))))))))) (defun nntp-send-buffer (wait-for) "Send the current buffer to server and wait until WAIT-FOR returns." @@ -490,8 +489,16 @@ noticing asynchronous data.") (set-buffer (nntp-find-connection-buffer nntp-server-buffer)) (erase-buffer))) (nntp-encode-text) - (process-send-region (nntp-find-connection nntp-server-buffer) - (point-min) (point-max)) + (let ((multibyte (and (boundp 'enable-multibyte-characters) + (symbol-value 'enable-multibyte-characters)))) + (unwind-protect + ;; Some encoded unicode text contains character 0x80-0x9f e.g. Euro. + (let (default-enable-multibyte-characters mc-flag) + ;; `set-buffer-multibyte' will be provided by APEL for all Emacsen. + (set-buffer-multibyte nil) + (process-send-region (nntp-find-connection nntp-server-buffer) + (point-min) (point-max)))) + (set-buffer-multibyte multibyte)) (nntp-retrieve-data nil nntp-address nntp-port-number nntp-server-buffer wait-for nnheader-callback-function)) @@ -602,7 +609,8 @@ noticing asynchronous data.") (last-point (point-min)) (nntp-inhibit-erase t) (buf (nntp-find-connection-buffer nntp-server-buffer)) - (command (if nntp-server-list-active-group "LIST ACTIVE" "GROUP"))) + (command (if nntp-server-list-active-group + "LIST ACTIVE" "GROUP"))) (while groups ;; Send the command to the server. (nntp-send-command nil command (pop groups)) @@ -764,8 +772,8 @@ noticing asynchronous data.") (save-excursion (set-buffer nntp-server-buffer) (copy-to-buffer buffer (point-min) (point-max)) - (nntp-find-group-and-number)) - (nntp-find-group-and-number)))) + (nntp-find-group-and-number group)) + (nntp-find-group-and-number group)))) (deffoo nntp-request-head (article &optional group server) (nntp-possibly-change-group group server) @@ -773,7 +781,7 @@ noticing asynchronous data.") "\r?\n\\.\r?\n" "HEAD" (if (numberp article) (int-to-string article) article)) (prog1 - (nntp-find-group-and-number) + (nntp-find-group-and-number group) (nntp-decode-text)))) (deffoo nntp-request-body (article &optional group server) @@ -1231,7 +1239,10 @@ password contained in '~/.nntp-authinfo'." (erase-buffer) (nntp-send-command "^[245].*\n" "GROUP" group) (setcar (cddr entry) group) - (erase-buffer)))))) + (erase-buffer) + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer))))))) (defun nntp-decode-text (&optional cr-only) "Decode the text in the current buffer." @@ -1427,7 +1438,7 @@ password contained in '~/.nntp-authinfo'." (setq nntp-server-xover nil))) nntp-server-xover)))) -(defun nntp-find-group-and-number () +(defun nntp-find-group-and-number (&optional group) (save-excursion (save-restriction (set-buffer nntp-server-buffer) @@ -1439,29 +1450,48 @@ password contained in '~/.nntp-authinfo'." (string-to-int (buffer-substring (match-beginning 1) (match-end 1))))) - group newsgroups xref) + newsgroups xref) (and number (zerop number) (setq number nil)) - ;; Then we find the group name. - (setq group - (cond - ;; If there is only one group in the Newsgroups header, - ;; then it seems quite likely that this article comes - ;; from that group, I'd say. - ((and (setq newsgroups (mail-fetch-field "newsgroups")) - (not (string-match "," newsgroups))) - newsgroups) - ;; If there is more than one group in the Newsgroups - ;; header, then the Xref header should be filled out. - ;; We hazard a guess that the group that has this - ;; article number in the Xref header is the one we are - ;; looking for. This might very well be wrong if this - ;; article happens to have the same number in several - ;; groups, but that's life. - ((and (setq xref (mail-fetch-field "xref")) - number - (string-match (format "\\([^ :]+\\):%d" number) xref)) - (substring xref (match-beginning 1) (match-end 1))) - (t ""))) + (if number + ;; Then we find the group name. + (setq group + (cond + ;; If there is only one group in the Newsgroups + ;; header, then it seems quite likely that this + ;; article comes from that group, I'd say. + ((and (setq newsgroups + (mail-fetch-field "newsgroups")) + (not (string-match "," newsgroups))) + newsgroups) + ;; If there is more than one group in the + ;; Newsgroups header, then the Xref header should + ;; be filled out. We hazard a guess that the group + ;; that has this article number in the Xref header + ;; is the one we are looking for. This might very + ;; well be wrong if this article happens to have + ;; the same number in several groups, but that's + ;; life. + ((and (setq xref (mail-fetch-field "xref")) + number + (string-match + (format "\\([^ :]+\\):%d" number) xref)) + (match-string 1 xref)) + (t ""))) + (cond + ((and (setq xref (mail-fetch-field "xref")) + (string-match + (if group + (concat "\\(" (regexp-quote group) "\\):\\([0-9]+\\)") + "\\([^ :]+\\):\\([0-9]+\\)") + xref)) + (setq group (match-string 1 xref) + number (string-to-int (match-string 2 xref)))) + ((and (setq newsgroups + (mail-fetch-field "newsgroups")) + (not (string-match "," newsgroups))) + (setq group newsgroups)) + (group) + (t (setq group "")))) (when (string-match "\r" group) (setq group (substring group 0 (match-beginning 0)))) (cons group number))))) diff --git a/lisp/nnvirtual.el b/lisp/nnvirtual.el index c19bfb6..43cd7f6 100644 --- a/lisp/nnvirtual.el +++ b/lisp/nnvirtual.el @@ -522,14 +522,15 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components." ;;; We map between virtual articles and real articles in a manner -;;; which keeps the size of the virtual active list the same as -;;; the sum of the component active lists. -;;; To achieve fair mixing of the groups, the last article in -;;; each of N component groups will be in the the last N articles -;;; in the virtual group. - -;;; If you have 3 components A, B and C, with articles 1-8, 1-5, and 6-7 -;;; resprectively, then the virtual article numbers look like: +;;; which keeps the size of the virtual active list the same as the +;;; sum of the component active lists. + +;;; To achieve fair mixing of the groups, the last article in each of +;;; N component groups will be in the last N articles in the virtual +;;; group. + +;;; If you have 3 components A, B and C, with articles 1-8, 1-5, and +;;; 6-7 resprectively, then the virtual article numbers look like: ;;; ;;; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ;;; A1 A2 A3 A4 B1 A5 B2 A6 B3 A7 B4 C6 A8 B5 C7 diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 467a1fe..7814864 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -1,5 +1,5 @@ ;;; rfc2047.el --- Functions for encoding and decoding rfc2047 messages -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko @@ -535,13 +535,20 @@ The buffer may be narrowed." (defun rfc2047-decode-string (string) "Decode the quoted-printable-encoded STRING and return the results." (let ((m (mm-multibyte-p))) - (with-temp-buffer - (when m - (mm-enable-multibyte)) - (insert string) - (inline - (rfc2047-decode-region (point-min) (point-max))) - (buffer-string)))) + (if (string-match "=\\?" string) + (with-temp-buffer + (when m + (mm-enable-multibyte)) + (insert string) + (inline + (rfc2047-decode-region (point-min) (point-max))) + (buffer-string)) + (if (and m + mail-parse-charset + (not (eq mail-parse-charset 'us-ascii)) + (not (eq mail-parse-charset 'gnus-decoded))) + (mm-decode-coding-string string mail-parse-charset) + string)))) (defun rfc2047-parse-and-decode (word) "Decode WORD and return it if it is an encoded word. diff --git a/lisp/sieve-manage.el b/lisp/sieve-manage.el index ca1d7dc..0d2422c 100644 --- a/lisp/sieve-manage.el +++ b/lisp/sieve-manage.el @@ -65,7 +65,7 @@ ;; ;; 2001-10-31 Committed to Oort Gnus. ;; -;; $Id: sieve-manage.el,v 1.1.4.1 2002-01-08 05:20:04 yamaoka Exp $ +;; $Id: sieve-manage.el,v 1.1.4.2 2002-01-21 05:45:12 yamaoka Exp $ ;;; Code: diff --git a/lisp/sieve-mode.el b/lisp/sieve-mode.el index 126d09c..8eac37b 100644 --- a/lisp/sieve-mode.el +++ b/lisp/sieve-mode.el @@ -45,7 +45,7 @@ ;; added keymap and menubar to hook into sieve-manage ;; 2001-10-31 version 1.2 committed to Oort Gnus ;; -;; $Id: sieve-mode.el,v 1.1.4.1 2002-01-08 05:20:04 yamaoka Exp $ +;; $Id: sieve-mode.el,v 1.1.4.2 2002-01-21 05:45:12 yamaoka Exp $ ;;; Code: diff --git a/lisp/smiley-ems.el b/lisp/smiley-ems.el index 6b571d2..d05a713 100644 --- a/lisp/smiley-ems.el +++ b/lisp/smiley-ems.el @@ -1,6 +1,6 @@ ;;; smiley-ems.el --- displaying smiley faces -;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Dave Love ;; Keywords: news mail multimedia @@ -37,6 +37,7 @@ (eval-when-compile (require 'cl)) (require 'nnheader) +(require 'gnus-art) (defgroup smiley nil "Turn :-)'s into real images." @@ -102,10 +103,6 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (push (list (car elt) (cadr elt) image) smiley-cached-regexp-alist))))))) -(defvar smiley-active nil - "Non-nil means smilies in the buffer will be displayed.") -(make-variable-buffer-local 'smiley-active) - (defvar smiley-mouse-map (let ((map (make-sparse-keymap))) (define-key map [down-mouse-2] 'ignore) ; override widget @@ -125,7 +122,6 @@ A list of images is returned." (overlays-in start end)) (unless smiley-cached-regexp-alist (smiley-update-cache)) - (setq smiley-active t) (save-excursion (let ((beg (or start (point-min))) group overlay image images) @@ -136,6 +132,8 @@ A list of images is returned." (while (re-search-forward (car entry) end t) (when image (push image images) + (gnus-add-wash-type 'smiley) + (gnus-add-image 'smiley image) (add-text-properties (match-beginning group) (match-end group) `(display ,image @@ -146,12 +144,15 @@ A list of images is returned." images)))) (defun smiley-toggle-buffer (&optional arg) - "Toggle displaying smiley faces. + "Toggle displaying smiley faces in article buffer. With arg, turn displaying on if and only if arg is positive." (interactive "P") - (if (numberp arg) - (setq smiley-active (> arg 0)) - (setq smiley-active (not smiley-active)))) + (gnus-with-article-buffer + (if (if (numberp arg) + (> arg 0) + (not (memq 'smiley gnus-article-wash-types))) + (smiley-region (point-min) (point-max)) + (gnus-delete-images 'smiley)))) (defun smiley-mouse-toggle-buffer (event) "Toggle displaying smiley faces. @@ -162,25 +163,6 @@ With arg, turn displaying on if and only if arg is positive." (mouse-set-point event) (smiley-toggle-buffer)))) -(eval-when-compile (defvar gnus-article-buffer)) - -(defun gnus-smiley-display (&optional arg) - "Display textual emoticaons (\"smilies\") as small graphical icons. -With arg, turn displaying on if and only if arg is positive." - (interactive "P") - (gnus-with-article-buffer - (if (memq 'smiley gnus-article-wash-types) - (gnus-delete-images 'smiley) - (article-goto-body) - (let ((images (smiley-region (point) (point-max)))) - (when images - (gnus-add-wash-type 'smiley) - (dolist (image images) - (gnus-add-image 'smiley image)))) - (when (and (numberp arg) - (<= arg 0)) - (smiley-toggle-buffer arg))))) - (provide 'smiley) ;;; smiley-ems.el ends here diff --git a/lisp/smiley.el b/lisp/smiley.el index eb0eef8..737f7f0 100644 --- a/lisp/smiley.el +++ b/lisp/smiley.el @@ -64,10 +64,10 @@ ;; two alists below. (defcustom smiley-deformed-regexp-alist - '(("\\(\\^_?\\^;;;\\)\\W" 1 "WideFaceAse3.xbm") - ("\\(\\^_?\\^;;\\)\\W" 1 "WideFaceAse2.xbm") - ("\\(\\^_?\\^;\\)\\W" 1 "WideFaceAse1.xbm") - ("\\(\\^_?\\^\\)\\W" 1 "WideFaceSmile.xbm") + '(("\\(\\^_\\^;;;\\)\\W" 1 "WideFaceAse3.xbm") + ("\\(\\^_\\^;;\\)\\W" 1 "WideFaceAse2.xbm") + ("\\(\\^_\\^;\\)\\W" 1 "WideFaceAse1.xbm") + ("\\(\\^_\\^\\)\\W" 1 "WideFaceSmile.xbm") ("\\(;_;\\)\\W" 1 "WideFaceWeep.xbm") ("\\(T_T\\)\\W" 1 "WideFaceWeep.xbm") ("\\(:-*[<(I+(B]+\\)\\W" 1 "FaceAngry.xpm") diff --git a/texi/ChangeLog b/texi/ChangeLog index de3983b..eb55f64 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,6 +1,135 @@ +2002-01-20 Patric Mueller + + * gnus.texi (Group Timestamp): Typo fix. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.texi (Selecting a Group): Addition. + +2002-01-19 Lars Magne Ingebrigtsen + + * gnus.texi (Mail Spool): Note that the .marks files can be + removed. + +2002-01-17 Paul Jarc + + * gnus.texi (Choosing a Mail Back End): mention nnmaildir. + (Comparing Mail Backends): briefly describe nnmaildir. + +2002-01-17 ShengHuo ZHU + + * gnus.texi (Agent Commands): Use gnus-agent-batch instead of + gnus-agent-batch-fetch. + +2002-01-15 Tue Jari Aalto + + * gnus.texi (Really Various Summary Commands): Added commands how + to create nnvirtual group and and how to modify the nnvirtual + regexp + +2002-01-12 ShengHuo ZHU + + * gnus.texi (Agent Caveats): Add agent cache. + (Agent Variables): Addition. + +2002-01-12 Simon Josefsson + + * gnus.texi (Conformity): Fix typo. + + * emacs-mime.texi (Flowed text, Standards): Add. + +2002-01-11 ShengHuo ZHU + + * message.texi (Mailing Lists): Addition. + * gnus.texi (Group Parameters): Addition. + From Sriram Karra . + +2002-01-10 Colin Marquardt + + * gnus.texi (Changing Servers): Addition. + +2002-01-06 ShengHuo ZHU + + * gnus.texi (Archived Messages): Rename + gnus-inews-mark-gcc-as-read to gnus-gcc-mark-as-read. + + * Makefile.in (clean): Clean thumb*. + +2002-01-05 Harry Putnam + + * gnus.texi (Score Variables): Clarify. + +2002-01-05 Lars Magne Ingebrigtsen + + * gnus.texi (Agent Expiry): Addition. + (Sorting the Summary Buffer): Addition. + +2002-01-05 Simon Josefsson + + * gnus.texi (Conformity): Add MIME and Disposition Notifications. + + * message.texi (Header Commands): Fix. Add m-goto-from. + (Insertion): Add m-i-disposition-notification-to. + +2002-01-05 ShengHuo ZHU + + * Makefile.in (.latexi.pdf-x): Use thumbpdf. + + * gnus.texi (Advanced Formatting): Double @'s. Use thumbpdf. + colorlinks=true. + +2002-01-05 Norman Walsh + + * gnus-faq.texi: Fix typo. + +2002-01-05 Lars Magne Ingebrigtsen + + * gnus.texi (Sorting the Summary Buffer): Addition. + +2002-01-04 Lars Magne Ingebrigtsen + + * gnus.texi (Virtual Groups): Addition. + +2002-01-03 Lars Magne Ingebrigtsen + + * gnus.texi (Article Keymap): Addition. + (Summary Mail Commands): Fix. + +2002-01-02 Lars Magne Ingebrigtsen + + * gnus.texi (Group Timestamp): Addition. Example from Andras + BALI. + (X-Face): Addition. + (Advanced Formatting): Add example. + +2002-01-01 Simon Josefsson + + * gnus.texi (Conformity): Add and fix. + + * message.texi (Security): Mention gpg-temp-directory. + + * gnus.texi (Article Washing): Link to Security section. + (Security): Fix. + (Signing and Encrypting): Renamed from Using GPG. + (IMAP): Fixes. + +2002-01-01 Simon Josefsson + + * gnus.texi (Customizing Articles): Add crossreference links. Add + gnus-body-boundary-delimiter. + 2002-01-01 Lars Magne Ingebrigtsen * gnus.texi (Choosing Commands): Addition. + (Article Display): Update. + (Article Display): Addition. + (Article Header): New. + (Slow Terminal Connection): Addition. + (Predicate Specifiers): New. + (To From Newsgroups): Addition. + (Topic Commands): Addition. + Update the menus. + Fix some references b0rked up by the menu fixing. 2001-12-31 Rui Zhu diff --git a/texi/Makefile.in b/texi/Makefile.in index 76428ac..5c546cd 100644 --- a/texi/Makefile.in +++ b/texi/Makefile.in @@ -97,12 +97,12 @@ refcard.pdf: refcard.tex gnuslogo-refcard.eps gnusref.tex TEXINPUTS=$(srcdir):$$TEXINPUTS $(PDFLATEX) refcard.tex clean: - rm -f gnus.*.bak *.ky *.cp *.fn *.cps *.kys *.log *.aux *.dvi *.vr \ - *.pdf *.tp *.toc *.pg gnus.latexi *.aux *.[cgk]idx \ - gnus.ilg gnus.ind gnus.[cgk]ind gnus.idx \ - gnustmp.texi *.tmplatexi gnus.tmplatexi1 texput.log *.orig *.rej \ - gnus.latexi*~* xface.tex picons.tex smiley.tex *.latexi *.dvi-x \ - *.pdf-x gnus.out + rm -f *.[cgk]idx *.aux *.cp *.cps *.dvi *.dvi-x *.fn *.ky \ + *.kys *.latexi *.log *.orig *.pdf *.pdf-x *.pg *.rej \ + *.tmplatexi *.toc *.tp *.vr gnus.*.bak gnus.[cgk]ind gnus.idx \ + gnus.ilg gnus.ind gnus.latexi*~* gnus.out gnus.tmplatexi1 \ + gnustmp.texi picons.tex smiley.tex texput.log thumb*.png \ + thumbdta.tex xface.tex makeinfo: makeinfo -o gnus gnus.texi @@ -150,6 +150,7 @@ gnus.latexi gnus-faq.latexi message.latexi emacs-mime.latexi sieve.latexi: $(src egrep -v "end\{document\}" $< > gnus.tmplatexi cat $(srcdir)/postamble.tex >> gnus.tmplatexi TEXINPUTS=$(srcdir):$$TEXINPUTS $(PDFLATEX) gnus.tmplatexi + thumbpdf gnus.pdf TEXINPUTS=$(srcdir):$$TEXINPUTS $(PDFLATEX) gnus.tmplatexi mv gnus.pdf $@ diff --git a/texi/emacs-mime.texi b/texi/emacs-mime.texi index 16ed3f8..12a4862 100644 --- a/texi/emacs-mime.texi +++ b/texi/emacs-mime.texi @@ -18,7 +18,7 @@ This file documents the Emacs MIME interface functionality. -Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or @@ -1116,6 +1116,7 @@ string containing the @sc{mime} message. * Advanced MML Example:: Another example MML document. * Charset Translation:: How charsets are mapped from @sc{mule} to MIME. * Conversion:: Going from @sc{mime} to MML and vice versa. +* Flowed text:: Soft and hard newlines. @end menu @@ -1428,6 +1429,27 @@ other. The resulting contents of the message should remain equivalent, if not identical. +@node Flowed text +@section Flowed text +@cindex format=flowed + +The Emacs @sc{mime} library will respect the @code{use-hard-newlines} +variable (@pxref{Hard and Soft Newlines, ,Hard and Soft Newlines, +emacs, Emacs Manual}) when encoding a message, and the +``format=flowed'' Content-Type parameter when decoding a message. + +On encoding text, lines terminated by soft newline characters are +filled together and wrapped after the column decided by +@code{fill-flowed-encode-column}. This variable controls how the text +will look in a client that does not support flowed text, the default +is to wrap after 66 characters. If hard newline characters are not +present in the buffer, no flow encoding occurs. + +On decoding flowed text, lines with soft newline characters are filled +together and wrapped after the column decided by +@code{fill-flowed-display-column}. The default is to wrap after +@code{fill-column}. + @node Standards @chapter Standards @@ -1481,6 +1503,9 @@ Administrative Messages Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field +@item RFC2646 +Documentation of the text/plain format parameter for flowed text. + @end table diff --git a/texi/gnus-faq.texi b/texi/gnus-faq.texi index c3159d4..d6b5fb0 100644 --- a/texi/gnus-faq.texi +++ b/texi/gnus-faq.texi @@ -1,6 +1,6 @@ @c Insert "\input texinfo" at 1st line before texing this file alone. @c -*-texinfo-*- -@c Copyright (C) 1995, 2001 Free Software Foundation, Inc. +@c Copyright (C) 1995, 2001, 2002 Free Software Foundation, Inc. @setfilename gnus-faq.info @node Frequently Asked Questions @@ -262,7 +262,7 @@ being responded to. These commands are also selectable as @i{Followup and Yank} and @i{Reply and Yank} in the Post menu. @kbd{C-c C-y} grabs the previous message and prefixes each line with -@code{ail-indentation-spaces} spaces or @code{mail-yank-prefix} if that is +@code{message-indentation-spaces} spaces or @code{message-yank-prefix} if that is non-nil, unless you have set your own @code{mail-citation-hook}, which will be called to do the job. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index f37b188..246ccb5 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -25,14 +25,15 @@ \ifx\pdfoutput\undefined \else -\usepackage[pdftex,bookmarks]{hyperref} +\usepackage[pdftex,bookmarks,colorlinks=true]{hyperref} +\usepackage{thumbpdf} \pdfcompresslevel=9 \fi \makeindex \begin{document} -\newcommand{\gnusversionname}{T-gnus v.} +\newcommand{\gnusversionname}{T-gnus v6.15} \newcommand{\gnuschaptername}{} \newcommand{\gnussectionname}{} @@ -286,7 +287,7 @@ \thispagestyle{empty} -Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -334,7 +335,7 @@ This file documents gnus, the GNU Emacs newsreader. $B$3$N%U%!%$%k$O(B GNU Emacs $B$N%K%e!<%9%j!<%@$G$"$k(B gnus $B$K4X$9$k@bL@=q$G$9!#(B -Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -382,7 +383,7 @@ license to the document, as described in section 6 of the license. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -574,7 +575,7 @@ Summary Buffer * Choosing Articles:: $B5-;v$rFI$`(B * Paging the Article:: $BFI$s$G$$$k5-;v$r%9%/%m!<%k$9$k(B * Reply Followup and Post:: $B5-;v$rEj9F$9$k(B -* Delayed Articles:: +* Delayed Articles:: * Marking Articles:: $B5-;v$K4{FI$d4|8B@Z$l:o=|2DG=Ey$N0u$rIU$1(B $B$k(B * Limiting:: $B35N,%P%C%U%!$K@)8B$r2C$($k$3$H$,$G$-$k(B @@ -628,7 +629,7 @@ Reply, Followup and Post * Summary Mail Commands:: $B%a!<%k$rAw$k(B * Summary Post Commands:: $B%K%e!<%9$rAw$k(B * Summary Message Commands:: $BB>$N%a%C%;!<%84XO"$NL?Na(B -* Canceling and Superseding:: +* Canceling and Superseding:: Marking Articles @@ -680,9 +681,11 @@ Article Treatment * Article Hiding:: $BFCDj$N>pJs$O>C$75n$j$?$$$H$b;W$&(B * Article Washing:: $B?M@8$r$b$C$H$h$/$9$k$?$/$5$s$N5$$NMx$$$?(B $B4X?t(B +* Article Header:: $B%X%C%@!<$r$$$m$$$mJQ7A$5$;$k(B * Article Buttons:: URL $B$d(B Message-ID $B$d(B $B%"%I%l%9$J$I$r%/%j%C(B $B%/$9$k(B * Article Date:: $B$0$:$0$:8@$&$J!"@$3&;~$@(B! +* Article Display:: X-Face, Picons, Smileys $B$rI=<($9$k(B * Article Signature:: $B=pL>$C$F2?(B? * Article Miscellania:: $BB>$N$$$m$$$m$J$b$N(B @@ -695,7 +698,7 @@ Various Summary Stuff * Summary Group Information:: $B>pJs;X8~$NL?Na(B * Searching for Articles:: $BJ#?t5-;vL?Na(B -* Summary Generation Commands:: +* Summary Generation Commands:: * Really Various Summary Commands:: $B$"$N$d$C$+$$$JB>$KE,9g$7$J$$L?Na(B Article Buffer @@ -718,7 +721,7 @@ Composing Messages * Drafts:: $B%a%C%;!<%8$N1d4|$H5qH]$5$l$?%a%C%;!<%8(B * Rejected Articles:: $B%5!<%P!<$,$"$J$?$N5-;v$r9%$-$G$J$$$H$-$K(B $B2?$,5/$3$k(B? -@c * Using GPG:: How to use GPG and MML to sign and encrypt messages +@c * Signing and encrypting:: How to compose secure messages. Select Methods @@ -774,7 +777,6 @@ Getting Mail * Not Reading Mail:: $BB>$N%U%!%$%k$rFI$`$?$a$K%a!<%k%P%C%/%((B $B%s%I$r;H$&(B * Choosing a Mail Back End:: Gnus $B$O?'!9$J%a!<%kMM<0$rFI$`;v$,$G$-$k(B -* Archiving Mail:: $B%a!<%k$r%P%C%/%"%C%W$9$k$K$O(B Mail Sources @@ -795,6 +797,7 @@ Choosing a Mail Back End Browsing the Web +* Archiving Mail:: * Web Searches:: $BJ8;zNs$K%^%C%A$9$k5-;v$+$i%0%k!<%W$r:n$k(B * Slashdot:: Slashdot $B$N%3%a%s%H$rFI$`(B * Ultimate:: Ultimate Bulletin Board $B%7%9%F%`(B @@ -860,9 +863,9 @@ Agent Categories Agent Commands -* Group Agent Commands:: -* Summary Agent Commands:: -* Server Agent Commands:: +* Group Agent Commands:: +* Summary Agent Commands:: +* Server Agent Commands:: Scoring @@ -926,6 +929,7 @@ Various $B$-$k(B * NoCeM:: Spam $B$dB>$NB@$j$d$9$$?);v$rHr$1$kJ}K!(B * Undo:: $B$$$/$D$+$NF0:n$O85$KLa$9;v$,$G$-$k(B +* Predicate Specifiers:: $B=R8l$r@_Dj$9$k(B * Moderation:: $B$"$J$?$,%b%G%l!<%?!<$@$C$?$i$I$&$9$k$+(B * Image Enhancements:: $B:G?7$N(B Emacs/XEmacs $B$O3($rI=<($G$-$k(B * Fuzzy Matching:: $BBg$-$JLJLS$C$F2?(B? @@ -945,11 +949,12 @@ Formatting Variables * Tabulation:: $B=PNO$N@0Ns(B * Wide Characters:: $BI}$,9-$$J8;z$r07$&(B -XEmacs Enhancements +Image Enhancements * Picons:: $B$"$J$?$,FI$s$G$$$k$b$N$N3($rI=<($9$kJ}K!(B * Smileys:: $BI=<($5$l$k$Y$/@8$^$l$?9,$;$=$&$J4i$rI=<((B $B$9$kJ}K!(B +* X-Face:: $B%U%!%s%-!<$J$A$C$A$c$JGr9u$N3($rI=<($9$k(B * Toolbar:: $B%/%j%C%/1n(B * XVarious:: $B$=$NB>$N(B XEmacs $B$G(B Gnus $B$JJQ?t(B @@ -966,6 +971,7 @@ Picons Appendices +* XEmacs:: XEmacs $B$G%$%s%9%H!<%k$9$k$?$a$NMW7o(B * History:: $B$I$&$d$C$F(B gnus $B$,:#F|$N$h$&$K$J$C$?$+(B * On Writing Manuals:: $B$J$<$3$l$,=i?4C5n$9$k$3$H$,$G$-$^$9!#$3$N%3%^%s%I$OCm0U$7$F;H$C$F$/$@$5$$!#(B +@kindex M-x gnus-group-clear-data +@findex gnus-group-clear-data +$B8=:_$N%0%k!<%W$NA4$F$N%G!<%?$r%/%j%"$7$^$9!=!=%^!<%/$H4{FI5-;v$N%j%9%H$r(B +$B>C$75n$j$^$9(B (@code{gnus-group-clear-data})$B!#(B + $B%5!<%P!<$rJQ99$7$?8e$G!"%-%c%C%7%e3,AX$r0\F0$5$;$J$1$l$P(B@strong{$B$J$j$^$;(B $B$s(B}$B!#$H$$$&$N$O!"%-%c%C%7%e5-;v$O4V0c$C$?5-;vHV9f$K$J$C$F$*$j!"$=$l(B $B$O(B gnus $B$,$I$N5-;v$rFI$s$@$H$_$J$9$+$K1F6A$7$^$9!#(B +@code{gnus-group-clear-data-on-native-groups} $B$O$=$l$r<+F0$G9T$J$C$F$7$^(B +$B$&$+$I$&$+$r?R$M$^$9!#(B@code{gnus-group-clear-data} $B$G(B +$B$O(B @kbd{M-x gnus-cache-move-cache} $B$,;H$($^$9(B ($B$G$b5$$rIU$1$F!"$=$l$O$9(B +$B$Y$F$N%0%k!<%W$N%-%c%C%7%e$r0\F0$7$F$7$^$$$^$9$+$i(B)$B!#(B @node Startup Files @section $B5/F0%U%!%$%k(B @@ -2201,6 +2216,10 @@ Gnus $B$O(B @code{gnus-user-format-function-}@samp{X} $B4X?t$r8F$S=P$7$^$9!#$ @item unseen $B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B +@item unseen-or-unread +$B$^$@FI$^$l$?$3$H$,L5$$:G=i$N5-;v$,$"$l$P!"$=$N5-;v$NI=Bj$N9T$K%]%$%s%H$r(B +$B0\F0$5$;!"L5$+$C$?$i:G=i$NL$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B + @item best $B%9%3%"$,:G$b9b$$L$FI5-;v$NI=Bj$N9T$K%]%$%s%H$r0\F0$5$;$^$9!#(B @end table @@ -2765,6 +2784,17 @@ kiboze $B%0%k!<%W$r:n@.$7$^$9!#%W%m%s%W%H$GL>A0$H!"(Bkiboze $B%0%k!<%W$K!V4^$ @code{gnus-parameter-to-list-alist} $B$b;2>H$7$F2<$5$$!#(B +@item subscribed +@cindex subscribed +$B$b$7$3$N%Q%i%a!<%?$,(B @code{t} $B$K@_Dj$5$l$F$$$k$H!"(Bgnus $B$O$"$J$?$,$3$N%0(B +$B%k!<%W$r(B to-address $B$H(B to-list $B%Q%i%a!<%?$N%"%I%l%9$G9XFI$7$F$$$k%a!<%j(B +$B%s%0%j%9%H$G$"$k$H2rpJs$r(B gnus $B$KM?$($k$3$H$O!"$"$J$?$,$=(B +$B$l$i$N%a!<%j%s%0%j%9%H$KEj9F$9$k$H$-$K!"@5$7$$(B Mail-Followup-To $B%X%C%@!<(B +$B$r@8@.$9$kLr$KN)$A$^$9!#(B + +@code{gnus-find-subscribed-addresses} $B$b;2>H$7$F2<$5$$!#$3$N4X?t$O$3$N%0(B +$B%k!<%W%Q%i%a!<%?$rD>@\$K;H$$$^$9!#(B + @item visible @cindex visible $B%0%k!<%W%Q%i%a!<%?$N%j%9%HCf$K(B @code{(visible . t)} $B$H$$$&MWAG$,$"$l$P!"(B @@ -3669,6 +3699,16 @@ Gnus Gnus $B$,CN$C$F$$$k%H%T%C%/2=$5$l$?%0%k!<%W$rA4$FI=<($7$^(B $B$9(B (@code{gnus-topic-list-active})$B!#(B +@item T M-n +@kindex T M-n ($B%H%T%C%/(B) +@findex gnus-topic-goto-next-topic +$B$_$J$i!"%f!<%6!e5-$NCM$O(B gnus $B$N%G%#%U%)%k%HCM$G$9!#$"$J$?$NLr$KN)$D$h$&$KJQ$($F2<$5(B +$B$$!#(B) + $B$5$F!"$3$l$O:n@.$5$l$k(B @sc{nov} $B%U%!%$%k$rA`:n$G$-$k%a!<%k%0%k!<%W$G$O$?(B $B$$$F$$$N>l9gLrN)$A$^$9!#$7$+$7!"0J2<$N$b$N$r(B @file{overview.fmt} $B%U%!%$(B $B%k$N:G8e$KDI2C$9$k$h$&$K(B nntp $B4IM}H$7$F2<$5$$!#(B * Summary Mail Commands:: $B%a!<%k$rAw$k(B * Summary Post Commands:: $B%K%e!<%9$rAw$k(B * Summary Message Commands:: $BB>$N%a%C%;!<%84XO"$NL?Na(B -* Canceling and Superseding:: +* Canceling and Superseding:: @end menu @node Summary Mail Commands @@ -6459,13 +6515,18 @@ gnus $B$OA4$F$N5-;v$N40A4$J(B @code{References} $BMs$r8+$F!"F1$8%9%l%C%I$KB0$ @findex gnus-thread-sort-by-author @findex gnus-thread-sort-by-number @vindex gnus-thread-sort-functions +@findex gnus-thread-sort-by-most-recent-thread $B$b$7%9%l%C%I$N35N,I=<($r;H$C$F$$$k$N$G$"$l$P!"(B @code{gnus-thread-sort-functions} $B$r@_Dj$9$k$3$H$G%9%l%C%I$rJB$SBX$($k$3(B $B$H$,$G$-$^$9!#$=$l$O!"C1FH$N4X?t!"4X?t$N%j%9%H!"4X?t$H(B @code{($B4X?t$G$J$$(B $B$b$N(B)} $B$NMWAG$G$"$k$3$H$,$G$-$^$9!#%G%#%U%)%k%H$G$O!"JB$SBX$($O5-;vHV9f(B $B$K$h$C$F$J$5$l$^$9!#4{$K:n$i$l$F$$$kJB$SBX$(=R8l4X?t(B -$B$O(B @code{gnus-thread-sort-by-number}, @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject}, @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score} $B$H(B @code{gnus-thread-sort-by-total-score} $B$G(B -$B$9!#(B +$B$O(B @code{gnus-thread-sort-by-number}$B!"(B@code{gnus-thread-sort-by-author}$B!"(B +@code{gnus-thread-sort-by-subject}$B!"(B@code{gnus-thread-sort-by-date}$B!"(B +@code{gnus-thread-sort-by-score}$B!"(B +@code{gnus-thread-sort-by-most-recent-number}$B!"(B +@code{gnus-thread-sort-by-most-recent-date} $B$*$h$S(B +@code{gnus-thread-sort-by-total-score} $B$G$9!#(B $B3F4X?t$OFs$D$N%9%l%C%I$r$H$j!":G=i$N%9%l%C%I$,B>$N%9%l%C%I$h$j@h$KJB$SBX(B $B$($i$l$k$Y$-$G$"$l$P!"(B@code{nil} $B$G$J$$CM$r$+$($7$^$9!#IaDL!"JB$SBX$($O(B @@ -6691,6 +6752,11 @@ gnus $B$OJ*;v$r@5$7$/$9$k$?$a$KFs$D$N4X?t$r$*4+$a$7$^$9!#(B $B$r(B ($B:F(B) $B:n@.$7!"(B@kbd{gnus-cache-generate-active} $B$O%"%/%F%#%V%U%!%$%k(B $B$r(B ($B:F(B) $B:n@.$7$^$9!#(B +@findex gnus-cache-move-cache +@code{gnus-cache-move-cache} $B$O$9$Y$F$N(B @code{gnus-cache-directory} $B$r$I(B +$B$3$+JL$N>l=j$K0\F0$7$^$9!#$"$J$?$O$I$3$K0\F0$5$;$k$+$r?R$M$i$l$^$9!#$=$l$C(B +$B$F$+$C$3$$$$$G$7$g(B? + @node Persistent Articles @section $B1JB35-;v(B @cindex persistent articles @@ -7430,6 +7496,7 @@ Gnus $B$O%U%!%$%k$r1\Mw$9$k$N$r7hDj$9$k$N$K(B@dfn{$B5,B'JQ?t(B}$B$rMQ$$$^$9 * Article Hiding:: $BFCDj$N>pJs$O>C$75n$j$?$$$H$b;W$&(B * Article Washing:: $B?M@8$r$b$C$H$h$/$9$k$?$/$5$s$N5$$NMx$$$?(B $B4X?t(B +* Article Header:: $B%X%C%@!<$r$$$m$$$mJQ7A$5$;$k(B * Article Buttons:: URL $B$d(B Message-ID $B$d(B $B%"%I%l%9$J$I$r%/%j%C(B $B%/$9$k(B * Article Date:: $B$0$:$0$:8@$&$J!"@$3&;~$@(B! @@ -7935,19 +8002,7 @@ HZ $B$^$?$O(B HZP $B$r=hM}$7$^$9!#(BHZ ($B$^$?$O(B HZP) $B$OCf9q8l$N5-;v$ @c @kindex W s (Summary) @c @findex gnus-summary-force-verify-and-decrypt @c Verify a signed (PGP, PGP/MIME or S/MIME) message -@c (@code{gnus-summary-force-verify-and-decrypt}). - -@item W u -@kindex W u ($B35N,(B) -@findex gnus-article-treat-unfold-headers -$B@^$jJV$5$l$?%X%C%@!<9T$r0l9T$K$7$^(B -$B$9(B (@code{gnus-article-treat-unfold-headers})$B!#(B - -@item W n -@kindex W n ($B35N,(B) -@findex gnus-article-treat-fold-newsgroups -@code{Newsgroups} $B$H(B @code{Followup-To} $B%X%C%@!<$r@^$jJV$7$^(B -$B$9(B (@code{gnus-article-treat-fold-newsgroups})$B!#(B +@c (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}. @item W W H @kindex W W H ($B35N,(B) @@ -7999,6 +8054,31 @@ HZ $B$^$?$O(B HZP $B$r=hM}$7$^$9!#(BHZ ($B$^$?$O(B HZP) $B$OCf9q8l$N5-;v$ $B5-;v$N@vBu$r<+F0E*$K$9$k$?$a$NJ}K!$O(B @xref{Customizing Articles} $B$r;2>H(B $B$7$F2<$5$$!#(B +@node Article Header +@subsection $B5-;v%X%C%@!<(B + +$B$3$l$i$N%3%^%s%I$O5-;v%X%C%@!<$r$$$m$$$mJQ7A$5$;$^$9!#(B + +@table @kbd +@item W G u +@kindex W G u ($B35N,(B) +@findex gnus-article-treat-unfold-headers +$B@^$jJV$5$l$?%X%C%@!<9T$r0l9T$K$7$^(B +$B$9(B (@code{gnus-article-treat-unfold-headers})$B!#(B + +@item W G n +@kindex W G n ($B35N,(B) +@findex gnus-article-treat-fold-newsgroups +@code{Newsgroups} $B$H(B @code{Followup-To} $B%X%C%@!<$r@^$jJV$7$^(B +$B$9(B (@code{gnus-article-treat-fold-newsgroups})$B!#(B + +@item W G f +@kindex W G f ($B35N,(B) +@findex gnus-article-treat-fold-header +$B$9$Y$F$N%a%C%;!<%8%X%C%@!<$r@^$jJV$7$^(B +$B$9(B (@code{gnus-article-treat-fold-headers})$B!#(B +@end table + @node Article Buttons @subsection $B5-;v$N%\%?%s(B @cindex buttons @@ -8192,8 +8272,8 @@ gnus $B$G%a!<%k$rFI$`$3$H$NM-Mx$JE@$O!"C1=c$J%P%0$rAG@2$i$7$$IT>rM}$KCV$-(B @item W D s @kindex W D s ($B35N,(B) -@findex gnus-article-toggle-smiley -$B%9%^%$%j!<$NI=<($r%H%0%k$7$^$9(B (@code{gnus-article-toggle-smiley})$B!#(B +@findex gnus-treat-smiley +$B%9%^%$%j!<$rI=<($7$^$9(B (@code{gnus-treat-smiley})$B!#(B @item W D f @kindex W D f ($B35N,(B) @@ -8212,6 +8292,12 @@ gnus $B$G%a!<%k$rFI$`$3$H$NM-Mx$JE@$O!"C1=c$J%P%0$rAG@2$i$7$$IT>rM}$KCV$-(B $B$9$Y$F$N%K%e!<%9%X%C%@!<(B ($B$9$J$o(B $B$A(B @code{Newsgroups} $B$H(B @code{Followup-To}) $B$r(B Picon $B2=$7$^(B $B$9(B (@code{gnus-treat-from-picon})$B!#(B + +@item W D D +@kindex W D D ($B35N,(B) +@findex gnus-article-remove-images +$B5-;v%P%C%U%!$+$i$9$Y$F$N2hA|$r:o=|$7$^(B +$B$9(B (@code{gnus-article-remove-images})$B!#(B @end table @node Article Signature @@ -8845,7 +8931,7 @@ Line Formatting})$B!#%G%#%U%)%k%H$O(B @samp{Gnus: %%b %S %Z} $B$G$9!#;HMQ2DG= @menu * Summary Group Information:: $B>pJs;X8~$NL?Na(B * Searching for Articles:: $BJ#?t5-;vL?Na(B -* Summary Generation Commands:: +* Summary Generation Commands:: * Really Various Summary Commands:: $B$"$N$d$C$+$$$JB>$KE,9g$7$J$$L?Na(B @end menu @@ -9305,23 +9391,22 @@ Gnus $B$K$$$D$G$b@5$7$$(B @code{Xref} $B$rpJs$O(B @pxref{Canceling and @@ -10118,8 +10252,8 @@ Gnus $B$O30$X=P$F9T$/A4$F$N%a%C%;!<%8$K!"0l$D$+$=$l0J>e$N$=$N%5!<%P!<$N%0(B $B$3$NJQ?t$O(B @code{gnus-message-archive-group} $B$NBe$o$j$K;H$&;v$,$G$-$^$9(B $B$,!"8ee$N$=$N%5!<%P!<$N%0(B $B$j$^$9!#(B @ignore -@node Using GPG -@section Using GPG +@node Signing and encrypting +@section Signing and encrypting @cindex using gpg +@cindex using s/mime +@cindex using smime -Gnus has an ALPHA support to GPG that's provided by @file{gpg.el}. See -@code{mm-verify-option} and @code{mm-decrypt-option} to enable Gnus to -verify or decrypt messages accordingly. +Gnus can digitally sign and encrypt your messages, using vanilla PGP +format or PGP/MIME or S/MIME. For decoding such messages, see the +@code{mm-verify-option} and @code{mm-decrypt-option} options +(@pxref{Security}). -To use this correctly with GPG, you'll need the following lisp code in your -@file{~/.emacs} or @file{~/.gnus}: +For PGP, Gnus supports two external libraries, @sc{gpg.el} and +@sc{Mailcrypt}, you need to install at least one of them. The S/MIME +support in Gnus requires the external program OpenSSL. -@lisp -(require 'gpg) -(setq mml2015-use 'gpg) -(setq mml1991-use 'gpg) -(setq gpg-temp-directory (expand-file-name "~/.gnupg/tmp")) -@end lisp +Instructing MML to perform security operations on a MIME part is done +using the @code{C-c C-m s} key map for signing and the @code{C-c C-m +c} key map for encryption, as follows. + +@table @kbd + +@item C-c C-m s s +@kindex C-c C-m s s +@findex mml-secure-sign-smime + +Digitally sign current MIME part using S/MIME. + +@item C-c C-m s o +@kindex C-c C-m s o +@findex mml-secure-sign-pgp + +Digitally sign current MIME part using PGP. -The @code{gpg-temp-directory} need to point to a directory with permissions set -to 700, for your own safety. +@item C-c C-m s p +@kindex C-c C-m s p +@findex mml-secure-sign-pgp -To sign or encrypt your message you may choose to use the MML Security -menu or @kbd{C-c C-m s p} to sign your message using PGP/MIME, -@kbd{C-c C-m s s} to sign your message using S/MIME. There's also -@kbd{C-c C-m c p} to encrypt your message with PGP/MIME and @kbd{C-c -C-m c s} to encrypt using S/MIME. @xref{Security, ,Security, message, -The Message Manual}. +Digitally sign current MIME part using PGP/MIME. -Gnus will ask for your passphrase and then it will send your message, if -you've typed it correctly. +@item C-c C-m c s +@kindex C-c C-m c s +@findex mml-secure-encrypt-smime + +Digitally encrypt current MIME part using S/MIME. + +@item C-c C-m c o +@kindex C-c C-m c o +@findex mml-secure-encrypt-pgp + +Digitally encrypt current MIME part using PGP. + +@item C-c C-m c p +@kindex C-c C-m c p +@findex mml-secure-encrypt-pgpmime + +Digitally encrypt current MIME part using PGP/MIME. + +@end table + +Also @xref{Security, ,Security, message, Message Manual}. @end ignore @node Select Methods @@ -11306,7 +11470,6 @@ Emacs $B$N%;%C%7%g%sA4BN$r%i%C%W$7$F!"%G%#%U%)%k%H$N%a%=%C%I$r;H$&$H$$$&$N(B * Not Reading Mail:: $BB>$N%U%!%$%k$rFI$`$?$a$K%a!<%k%P%C%/%((B $B%s%I$r;H$&(B * Choosing a Mail Back End:: Gnus $B$O?'!9$J%a!<%kMM<0$rFI$`;v$,$G$-$k(B -* Archiving Mail:: $B%a!<%k$r%P%C%/%"%C%W$9$k$K$O(B @end menu @node Mail in a Newsreader @@ -12763,9 +12926,12 @@ Gnus $B$O%a!<%k%0%k!<%W$rF0:n$9$k$h$&$K$9$k$H%a!<%k%9%W!<%k$rFI$_9~$_$^$9!#(B $B%a!<%k%U%!%$%k$O$^$:$"$J$?$N%[!<%`%G%#%l%/%H%j!<$KJ#A0!#4{DjCM(B $B$,2DG=$G!"(B($B%P%C%/%"%C%W$r(B nnml $B%G%#%l%/%$%H%j$KLa$7$?8e$G(B) @kbd{G m} $B%-!<(B $B$r;H$C$F$=$N%0%k!<%W$r85$KLa$7$^$9!#(B +$B$b$72?$i$+$NM}M3$K$h$C$F(B @file{.marks} $B%U%!%$%k$,$*$+$7$/$J$C$F$$$k$H;W$C(B +$B$?$H$-$O!"C1$K$=$l$iA4It$r>C$7$F$7$^$&$3$H$,$G$-$^$9!#(Bgnus $B$Oe$N%5!<%P!<$N@_Dj(B: @table @code @@ -13178,6 +13348,61 @@ Rand MH $B%a!<%k1\Mw%7%9%F%`$O(B UNIX $B%7%9%F%`$K$+$J$jD9$$4VB8:_$7$F$$$^$9! @code{nnfolder} $B$O:GA1$NA*Br$G$O$"$j$^$;$s$,!"$=$l$J$j$NNL$N%a!<%k$7$+$l$N%a%C%;!<%8$OJL!9$N%U%!%$%k$K3JG<$5$l$^$9$,!"%U%!%$(B +$B%kL>$O(B gnus $B$N5-;vHV9f$H4X78$,$"$j$^$;$s!#$^(B +$B$?(B @code{nnmaildir} $B$O(B @code{nnml} $B$N(B overview $B$KAjEv$9$k%U%!%$%k$r5-;v(B +$B$4$H$K0l$D3JG<$9$k$N$G!"(B@code{nnml} $B$NLsFsG\$NNL$N(B i$B%N!<%I$r;H$$$^$9!#(B +(@code{df -i} $B$r;H$C$F(B i$B%N!<%I$N3d$jEv$F$,$I$l$[$I$?$/$5$s$"$k$+$rD4$Y$F(B +$B2<$5$$!#(B) $B$=$N$?$a$KCY$/$J$C$?$jB?$/$N>l=j$r$NHs%V%m%C%/9=B$$N%U%!%$%k(B +$B%7%9%F%`$X$NE>49$r8!F$$7$F2<$5$$!#(B + +maildir $B$O@\JN,$G$-$k$3$H$r0UL#$7$^$9!#(B@code{mail-sources} $B$K$*$1(B +$B$k(B @code{directory} $B$N9`$K$O;w$?8z2L$,$"$j$^$9$,!"G[Aw$5$l$F$/$k%a!<%k$r(B +$B%9%W!<%k$9$k$?$a$N%a!<%k%\%C%/%9$N0lB7$$(B (mbox $B7A<0$G$O$=$N$?$a$K%a%C%;!<(B +$B%8$NK\J8$,2u$l$k(B) $B$H!"B>$N(B ($B2?$G$"$l$"$J$?$N9%$_$N7A<0$N(B) $B%0%k!<%W$H$7$F(B +$B;H$o$l$kAH$,I,MW$G$9!#(Bmaildir $B$O(B @code{new/} $B%5%V%G%#%l%/%H%j$KCV$+$l$k(B +$BAH$_9~$_%9%W!<%k$G$9!#%a!<%kJ,3d$,Fs=E%A%'%C%/$N$h$&$J07$$$r$5$l$^$9!#$3$N$h$&$K$7$F(B +$B5-;vHV9f$NHO0OFb$K7d4V$,L5$/$J$j!"$^$?Bg$-$$%0%k!<%W$KF~$k$H$-$O!"(Bgnus +$B$O$h$j@53N$J5-;v?t$rEA$($F$/$l$k$G$7$g$&!#Be=~$H$7$F(B @code{nnmaildir} $B$O(B +$B%-%c%C%7%e$d%(!<%8%'%s%H$G$OF0:n$7$^$;$s!#$3$l$O$*$=$i$/>-Mh$OJQ$o$k$G$7$g(B +$B$&!#(B + +@code{nnmaildir} $B$O%0%k!<%W$N5-;v$N0u$r!"$=$l$KBP1~$9$k(B maildir $B$K3JG<$7(B +$B$^$9!#(Bgnus $B$N30$+$i$=$l$i$r4JC1$KA`:n$G$-$k$h$&$K$9$k$?$a$K!"$=$N$h$&$K(B +$B:n$i$l$F$$$k$N$G$9!#(Bmaildir $B$r(B tar $B$G$^$H$a$F$+$iJL$N$I$3$+$GE83+$7$F$b!"(B +$B0u$O$=$N$^$^$G$9!#(B@code{nnml} $B$b0u$r3JG<$7$^$9$,!"(B +@code{nnmaildir} $B$G(B gnus $B$N30$+$i$=$l$i$r;H$&$h$&$K4JC1$G$O$"$j$^$;$s!#(B + +$B4|8B@Z$l>C5n$dB>$N$b$N$r@_Dj$9$k$?$a$K(B @code{nnmaildir} $B$O%0%k!<%W%Q%i%a!<(B +$B%?$r;H$$$^$9$,!"B>$N%a!<%k%P%C%/%(%s%I$H$O>/$70c$$$^$9!#(B + +@code{nnmaildir} $B$OB.EY$r>e$2$k$?$a$K$+$J$j$NNL$N%a%b%j$r;H$$$^$9!#(B +(@code{nnml} $B$N>l9g$O%U%!%$%k$K3JG<$7!"(B@code{nnmh} $B$G$O2?EY$b5-;v%U%!%$(B +$B%k$r2r@O$7$FF@$k$b$N$4$H$r!"$=$l$O%a%b%j>e$KJ];}$7$^$9!#(B) $B$3$l$,$"$J$?$K(B +$B$H$C$FLdBj$J$i$P!"(B@code{nov-cache-size} $B%0%k!<%W%Q%i%a!<%?$r2?$+>.$5$J(B +$BCM(B (0 $B$O$*$=$i$/$@$a$@$,(B 1 $B$@$C$?$i$?$V$sF0$/(B) $B$K@_Dj$9$k$3$H$K$h$C$F!"(B +$B>/$J$$%a%b%j$r;H$&$h$&$K$9$k$3$H$,$G$-$^$9!#(B + +$B5/F0$H=*N;$OB>$N%P%C%/%(%s%I$h$j$b(B @code{nnmaildir} $B$,CY$$$G$7$g$&!#$=$N(B +$B4V$K$"$k$9$Y$F$N%U%!%$%k%7%9%F%`$K0MB8$7$F$$$kItJ,$OB.$$$G$7$g$&!#(B + +@code{nnmaildir} $B$O(B @code{nnoo} $B$r;H$o$J$$$N$G!"(B@code{nnmaildir} $B$+$iGI(B +$B@8$7$?%P%C%/%(%s%I$r=q$/$N$K(B @code{nnoo} $B$O;H$($^$;$s!#(B @end table @node Browsing the Web @@ -13206,6 +13431,7 @@ Gnus $B$O$3$l$i$N%=!<%9$X$N3&LL$rDs6!$9$k%P%C%/%(%s%I72$r>/$7Hw$($D$D$"$j(B $B$^$9!#(B @menu +* Archiving Mail:: * Web Searches:: $BJ8;zNs$K%^%C%A$9$k5-;v$+$i%0%k!<%W$r:n$k(B * Slashdot:: Slashdot $B$N%3%a%s%H$rFI$`(B * Ultimate:: Ultimate Bulletin Board $B%7%9%F%`(B @@ -13826,22 +14052,24 @@ IMAP $B$O%a!<%k(B ($B$b$7$/$O!"%K%e!<%9!"$b$7$/$O(B ...) $B$rFI$`$?$a$N%M%C @sc{imap} $B$K$OFs$D$NFCH$7$F2<$5$$!#(B @sc{imap} $B$r%a!<%k$rCyB"$9$k%W%m%H%3%k$H$7$F;H$$$?$$$H$-$O!"(B -gnus-secondary-select-methods $B$K(B nnimap $B$rEPO?$7$F2<$5$$!#$3$l$K$h$C(B -$B$F(B gnus $B$O(B @sc{imap} $B%5!<%P!<$KCyB"$5$l$F$$$k%a!<%k$rA`:n$9$k$h$&$K$J$j(B -$B$^$9!#$3$l$,$3$3$G@bL@$9$k;H$$J}$G$9!#(B +@code{gnus-secondary-select-methods} $B$K(B nnimap $B$rEPO?$7$F2<$5$$!#$3$l$K(B +$B$h$C$F(B gnus $B$O(B @sc{imap} $B%5!<%P!<$KCyB"$5$l$F$$$k%a!<%k$rA`:n$9$k$h$&$K(B +$B$J$j$^$9!#$3$l$,$3$3$G@bL@$9$k;H$$J}$G$9!#(B -$B$$$/$D$+$N(B @sc{imap} $B%5!<%P!<$r(B @code{~/.gnus} $B$G@_Dj$9$k$H!"$?$V$s$3$N(B -$B$h$&$J$b$N$K$J$k$G$7$g$&(B: +$B$$$/$D$+$N(B @sc{imap} $B%5!<%P!<$r(B @code{~/.gnus} $B$G@_Dj$9$k$H!"$?$V$s0J2<(B +$B$N$h$&$J$b$N$K$J$k$G$7$g$&!#(B($BCm(B: SSL/TLS $B$G$O30It%W%m%0%i%`$H%i%$%V%i%j(B +$B$,I,MW$G$9!#0J2<$r;2>H$7$F2<$5$$!#(B) @lisp (setq gnus-secondary-select-methods @@ -13867,9 +14095,6 @@ gnus-secondary-select-methods $B$K(B nnimap $B$rEPO?$7$F2<$5$$!#$3$l$K$h$C(B (nnimap-stream ssl)))) @end lisp -(SSL/TLS $B$r;H$&$K$O30It%i%$%V%i%j(B @samp{ssl.el} $B$,I,MW$G$9!#0J2<$r;2>H$7(B -$B$F2<$5$$!#(B) - $B0J2<$NJQ?t$O2>A[(B @code{nnimap} $B%5!<%P!<$r:n@.$9$k$?$a$K;H$&$3$H$,$G$-$^(B $B$9!#(B @@ -13931,10 +14156,10 @@ gnus-secondary-select-methods $B$K(B nnimap $B$rEPO?$7$F2<$5$$!#$3$l$K$h$C(B @itemize @bullet @item -@dfn{gssapi:} GSSAPI ($BIaDL$O(B kerberos 5) $B$r;H$$$^$9!#(B@samp{imtest} $B%W%m(B +@dfn{gssapi:} GSSAPI ($BIaDL$O(B Kerberos 5) $B$r;H$$$^$9!#(B@samp{imtest} $B%W%m(B $B%0%i%`$,I,MW$G$9!#(B @item -@dfn{kerberos4:} kerberos 4 $B$r;H$$$^$9!#(B@samp{imtest} $B%W%m%0%i%`$,I,MW$G(B +@dfn{kerberos4:} Kerberos 4 $B$r;H$$$^$9!#(B@samp{imtest} $B%W%m%0%i%`$,I,MW$G(B $B$9!#(B @item @dfn{starttls:} STARTTLS (SSL $B$KN`;w(B) $B$r;H$$$^$9!#30It%i%$%V%i(B @@ -13993,11 +14218,11 @@ nnimap $B$O$=$l$b%5%]!<%H$7$^$9!#$7$+$7!"(BSSLeay $B$N:G?7HG$G$"$k(B 0.9.x  @itemize @bullet @item -@dfn{gssapi:} GSSAPI ($BIaDL$O(B kerberos 5) $BG'>Z$G$9!#30It%W%m%0%i(B +@dfn{gssapi:} GSSAPI ($BIaDL$O(B Kerberos 5) $BG'>Z$G$9!#30It%W%m%0%i(B $B%`(B @code{imtest} $B$,I,MW$G$9!#(B @item -@dfn{kerberos4:} Kerberos $BG'>Z$G$9!#30It%W%m%0%i%`(B @code{imtest} $B$,I,MW(B -$B$G$9!#(B +@dfn{kerberos4:} Kerberos 4 $B$K$h$kG'>Z$G$9!#30It%W%m%0%i(B +$B%`(B @code{imtest} $B$,I,MW$G$9!#(B @item @dfn{digest-md5:} DIGEST-MD5 $B$G0E9f2=$5$l$?(B $BMxMQ(B/$B%Q%9%o!<%I(B $B$G$9!#30(B $BIt%i%$%V%i%j(B @code{digest-md5.el} $B$,I,MW$G$9!#(B @@ -14990,6 +15215,10 @@ nnvirtual $B%0%k!<%W(B (@dfn{nnvirtual group}) $B$O$N%0%k!<%W$N=89g0J>e $B$l$^$9!#$D$^$j!"$b$72>A[%0%k!<%WFb$G5-;v$K2D;k5-;v$N0u$r$D$1$k$H!"$=$N5-(B $B;v$O$b$H$b$H$N9=@.%0%k!<%W$NCf$G$b2D;k5-;v$K$J$j$^$9!#(B($B$=$7$F5U$b@.$jN)(B $B$A$^$9(B --- $B9=@.%0%k!<%WFb$GIU$1$?0u$O2>A[%0%k!<%WFb$G$bI=<($5$l$^$9!#(B) +$B6u$N2>A[%0%k!<%W$r:n$k$K$O!"%0%k!<%W%P%C%U%!$G(B @kbd{G V} +(@code{gnus-group-make-empty-virtual}) $B$r$N%0%k!<%W$N=89g0J>e $B$3$N$h$&$J>l9g$O!"%a%C%;!<%8%P%C%U%!$G$N(B @kbd{C-c C-n} $B$,1~Ez$7$h$&$H$7(B $B$F$$$k5-;v$+$i(B @code{Newsgroups} $B9T$rH4$-=P$7$FA^F~$7$^$9!#(B +@code{nnvirtual} $B%0%k!<%W$O!"9=@.%0%k!<%W$+$i5-;v$H0u0J30$O7Q>5$7$^$;$s!#(B +$BNc$($P%0%k!<%W%Q%i%a!<%?$b$=$&$J$N$G$9$,!"$=$l$i$O7Q>5$5$l$^$;$s!#(B + @node Kibozed Groups @subsection Kiboze $B%0%k!<%W(B @cindex nnkiboze @@ -15694,17 +15926,17 @@ file $B$GF0:n$7!"(Bgnus $B%(!<%8%'%s%H$N@Z$jN%$7(B/$B:9$79~$_>uBV$r@Z$jBX$($^$9!#(B @menu -* Group Agent Commands:: -* Summary Agent Commands:: -* Server Agent Commands:: +* Group Agent Commands:: +* Summary Agent Commands:: +* Server Agent Commands:: @end menu -$B40A4$J0l3g$G(B) $BCfCG$9$k$3$H$b$"(B $B$^$jNI$$$3$H$G$O$"$j$^$;$s!#(B +@code{gnus-agent-expire-days} $B$O@55,I=8=(B/$BF|?t$N%Z%"$N%j%9%H$G$"$C$F$b9=(B +$B$$$^$;$s!#@55,I=8=$O%0%k!<%WL>$K%^%C%A$7!"0[$J$k%0%k!<%W$G0[$J$k4|8B@Z$l(B +$B>C5n$r9T$J$&$3$H$r2DG=$K$7$^$9!#(B + +@lisp +(setq gnus-agent-expire-days + '(("alt\\." 7) + (".*binary" 1) + ("." 21))) +@end lisp + +$B$b$7%j%9%H$N7A<0$r;H$&>l9g$O!":G8e$NMWAG$O%G%#%U%)%k%H$N%a%=%C%I!"$9$J$o(B +$B$A$9$Y$F$N%0%k!<%W$K%^%C%A$9$k$b$N$K$7$J$1$l$P$J$j$^$;$s!#(B + @vindex gnus-agent-expire-all @code{gnus-agent-expire-all} $B$,(B @code{nil} $B$G$J$1$l$P!"$3$NL?Na$OA4$F$N(B $B5-;v(B --- $BL$FI!"4{FI!"2D;k!"J]N15-;v$r>C5n$7$^$9!#$b$7(B @code{nil} ($B$3$l$,(B @@ -15914,6 +16160,23 @@ Gnus $B%(!<%8%'%s%H$,%U%!%$%k$r3JG<$9$k>l=j!#=i4|@_DjCM(B @item gnus-agent-unplugged-hook @vindex gnus-agent-unplugged-hook $B%M%C%H%o!<%/$+$i@ZCG$5$l$?$H$-$KuBV$N%5!<%P!<$r%*%s%i%$%s>uBV$K$7$^$;$s!#(B@code{ask} $B$@$C$?$i!"$=$l(B +$B$,%G%#%U%)%k%H$G$9$,!"%(!<%8%'%s%H$O:F@\B3$9$k$H$-$K%*%U%i%$%s>uBV$N%5!<(B +$B%P!<$r%*%s%i%$%s>uBV$K$9$k$+$I$&$+$r?R$M$^$9!#$=$l0J30$NCM$@$C$?$i!"%*%U(B +$B%i%$%s>uBV$N%5!<%P!<$O<+F0E*$K%*%s%i%$%s>uBV$K$J$j$^$9!#(B @end table @node Example Setup @@ -16068,16 +16331,18 @@ Gnus Agent $B$O$h$/$"$kB>$N%*%U%i%$%s%K%e!<%9%j!<%@!<$N$h$&$K$OF0:n$7$^$;(B @table @dfn @item $B@\B3$5$l$F$$$k$H$-$K5-;v$rFI$s$@$i!"$=$l$O(B Agent $B$KF~$k$N$G$9$+(B? -@strong{$B$$$$$(!#(B} +@strong{$B$$$$$((B}$B!#(B @item $B@\B3$5$l$F$$$k$H$-$K5-;v$rFI$s$G!"(BAgent $B$K5-;v$,B8:_$7$F$$$k>l9g!"(B $B$b$&0l2s%@%&%s%m!<%I$5$l$k$N$G$9$+(B? -@strong{$B$O$$!#(B} +@strong{$B$$$$$((B}$B!"$?$@$7(B @code{gnus-agent-cache} $B$,(B `nil' $B$G$J$+$C$?$i!"(B +$B$G$9$,!#(B @end table -$BMWLs$9$k$H!"(Bgnus $B$,@Z$jN%$5$l$F$$$k$H$-$O!"%m!<%+%k$KJ]B8$5$l$?5-;v$r8+(B -$B$k$@$1$G$9!#@\B3$5$l$F$$$k$H$-$O!"(BISP $B$HOC$9$@$1$G$9!#(B +$BMWLs$9$k$H!"(Bgnus $B$,@Z$jN%$5$l$F$$$k$H$-$O%m!<%+%k$KJ]B8$5$l$?5-;v$r8+$k(B +$B$@$1$G$9!#@\B3$5$l$F$$$k$H$-$O(B ISP $B$HOC$9$@$1$G!"$+$D%m!<%+%k$K;}$C$F$$(B +$B$k5-;v$r;H$$$^$9!#(B @node Scoring @chapter $B%9%3%"(B @@ -16527,11 +16792,11 @@ Gnus $B$O0lHLE*$J%9%3%"%U%!%$%k$rFCDj$N%9%3%"%U%!%$%k8~$1$N$b$N$h$jA0$KE,(B @item gnus-update-score-entry-dates @vindex gnus-update-score-entry-dates -$B$3$NJQ?t$,(B @code{nil} $B$G$J$$$H!"9gCW$9$k%9%3%"EPO?$OF|IU$,99?7$5$l$^$9!#(B -($B$3$l$O(B gnus $B$,4|8B@Z$l>C5n$rA`:n$7$F$$$kJ}K!$G$9(B---$BA4$F$N9gCW$7$J$$EPO?(B -$B$O8E$/$J$j$9$.!"9gCW$9$kEPO?$r?7A/$GLL$9$k;v$K$J$k$G$7$g$&!#(B +$B$3$NJQ?t$,(B @code{nil} $B$G$J$$$H!"0l;~E*$K9gCW$7$?%9%3%"EPO?$OF|IU$,99?7$5(B +$B$l$^$9!#(B($B$3$l$O(B gnus $B$,4|8B@Z$l>C5n$rA`:n$7$F$$$kJ}K!$G$9(B---$BA4$F$N9gCW$7(B +$B$J$$EPO?$O8E$/$J$j$9$.!"9gCW$9$kEPO?$r?7A/$GLL$9$k;v$K$J$k$G$7$g$&!#(B @item gnus-score-after-write-file-function @vindex gnus-score-after-write-file-function @@ -17874,6 +18139,7 @@ Gnus $B$O0lF|$K0l2s%9%3%"$rIeGT$5$;$h$&$H$7$^$9!#Nc$($P!"$b$7(B gnus $B$r;MF| $B$-$k(B * NoCeM:: Spam $B$dB>$NB@$j$d$9$$?);v$rHr$1$kJ}K!(B * Undo:: $B$$$/$D$+$NF0:n$O85$KLa$9;v$,$G$-$k(B +* Predicate Specifiers:: $B=R8l$r@_Dj$9$k(B * Moderation:: $B$"$J$?$,%b%G%l!<%?!<$@$C$?$i$I$&$9$k$+(B * Image Enhancements:: $B:G?7$N(B Emacs/XEmacs $B$O3($rI=<($G$-$k(B * Fuzzy Matching:: $BBg$-$JLJLS$C$F2?(B? @@ -18111,6 +18377,12 @@ Emacs $B$,(B @samp{%b} $B$r.7?$N(B ISO0861 $BMM(B @@ -19005,6 +19277,31 @@ Gnus $B$O!"MxMQo$N(B Emacs $B$N(B @code{undo} $BL?Na$K$A$g$C$H$@$1;w$F$$$k$H;W$o$l$k$G$7$g$&!#(B +@node Predicate Specifiers +@section $B=R8l$N@_Dj(B +@cindex predicate specifiers + +$B$$$/$D$+$N(B gnus $B$NJQ?t(B +$B$O(B @dfn{$B=R8l;X<(;R(B} (@dfn{predicate specifiers}) $B$G$9!#$3$l$O=R8l$N;EMM(B +$B$KM;DL$r8z$+$;$k$3$H$,$G$-$kFCJL$J7A<0$G$9!#(B + +$B$3$l$i$N;X<(;R$O4X?t$K$h$k%j%9%H!"%7%s%\%k$^$?$O%j%9%H$G$9!#(B + +$B$3$l$ONc$G$9(B: + +@lisp +(or gnus-article-unseen-p + gnus-article-unread-p) +@end lisp + +$BMxMQ$G$-$k%7%s%\%k$O(B @code{or}$B!"(B@code{and} $B$*$h$S(B @code{not} $B$G$9!#4X?t(B +$B$O$9$Y$F0l$D$N%Q%i%a!<%?$r$N$b$N$rI=<($9$k$3$H$,$G$-$k$N$G!" gnus $B$O$3$l$rMxMQ$9$k$3$H$K$7$^$9!#(B @menu -* Picons:: $B$"$J$?$,FI$s$G$$$k$b$N$N3($rI=<($9$kJ}K!(B -* Smileys:: $BI=<($5$l$k$Y$/@8$^$l$?9,$;$=$&$J4i$rI=<($9$kJ}K!(B -* X-Face:: $B%U%!%s%-!<$J$A$C$A$c$JGr9u$N3($rI=<($9$k(B -* Toolbar:: $B%/%j%C%/1n(B -* XVarious:: $B$=$NB>$N(B XEmacs $B$G(B Gnus $B$JJQ?t(B +* Picons:: $B$"$J$?$,FI$s$G$$$k$b$N$N3($rI=<($9$kJ}K!(B +* Smileys:: $BI=<($5$l$k$Y$/@8$^$l$?9,$;$=$&$J4i$rI=<((B + $B$9$kJ}K!(B +* X-Face:: $B%U%!%s%-!<$J$A$C$A$c$JGr9u$N3($rI=<($9$k(B +* Toolbar:: $B%/%j%C%/1n(B +* XVarious:: $B$=$NB>$N(B XEmacs $B$G(B Gnus $B$JJQ?t(B @end menu @node Picons @@ -19400,8 +19698,8 @@ Gnus $B$r=*N;$9$k$H$-$K(B picon $B%-%c%C%7%e$r>C$75n$k$+$I$&$+!#(BGnus $B$O @cindex x-face @code{X-Face} $B%X%C%@!<$O!"%a%C%;!<%8$NCx$K$O(B @code{xface} $B$G$O$J$/(B @code{x-face} $B$,;H$o$l$^$9!#(B) +gnus $B$O!"30$K=P$9%a%C%;!<%8$K(B X-Face $B%X%C%@!<$r4JC1$KA^F~$9$k$?$a$N!"JX(B +$BMx$J4X?t$HJQ?t$r>/$7$P$+$jDs6!$7$^$9!#(B + +@findex gnus-random-x-face +@code{gnus-random-x-face} $B$O(B @code{gnus-x-face-directory} $B$K$"$k$9$Y$F(B +$B$N(B @samp{pbm} $B$r$/$^$J$/C5$7$F%i%s%@%`$K0l$D$rA*$S/99?7$5(B +$B$l$F$$$^$9!#(BRFC 2195 $B$O(B IMAP $B$N(B CRAM-MD5 $BG'>Z$K$D$$$F=R$Y$F$$$^$9!#(BRFC +2086 $B$O(B IMAP $B$N;HMQ@)8B0lMw(B (ACL) $B$K$D$$$F=R$Y$F$$$^$9!#(BRFC +2359 $B$O(B IMAP $B$N%W%m%H%3%k$N3HD%$K$D$$$F=R$Y$F$$$^$9!#(BRFC 2595 $B$O(B IMAP $B$K(B +$B$*$1$kE,@Z$J(B TLS $B$NE}9g(B (STARTTLS) $B$K$D$$$F=R$Y$F$$$^$9!#(BRFC +1731 $B$O(B IMAP $B$N(B GSSAPI/Kerberos4 $B$Ne$K=q$+$l$F$$$kJ8>O$K4X$9$k;v$G!"(BGnus $B$,$=$l$rK~$?$7$F$$$J$$$h$&$JF0:n(B @@ -21473,6 +21842,21 @@ Gnus $B$,>o$K35N,%P%C%U%!$rCf?4:F@_Dj$r$9$k$3$H$r6X;_$9$k$?$a$K$3$l(B $B$3$l$,(B @code{nil} $B$G$J$1$l$P!"A4$F$N35N,%P%C%U%!$N%9%l%C%I$O=i$a$K1#$5$l(B $B$^$9!#(B +$B$3$l$O=R8l;X<(;R$G$"$k$3$H$b$G$-$^$9(B (@pxref{Predicate Specifiers})$B!#Mx(B +$BMQ$G$-$k=R8l(B +$B$O(B @code{gnus-article-unread-p} $B$H(B @code{gnus-article-unseen-p} $B$G$9!#(B + +$B$3$l$ONc$G$9(B: + +@lisp +(setq gnus-thread-hide-subtree + '(or gnus-article-unread-p + gnus-article-unseen-p)) +@end lisp + +($B$3$l$O$+$J$j$P$+$2$?Nc$G$9!#$J$<$J$i$9$Y$F$N$^$@FI$^$l$?$3$H$,L5$$5-;v(B +$B$OL$FI$G$b$"$k$+$i$J$N$G$9$,!"pJs$rF~$l$^$;$s(B $B$N$G!";~4V$r@aLs$G$-$k$G$7$g$&!#(B @@ -21820,8 +22204,8 @@ Gnus $B$O%0%k!<%WL>$H5-;vHV9f$K$h$C$F$=$l$>$l$N%a%C%;!<%8$rFCDj$7$^$9!#$=(B @cindex @code{nnchoke} @menu -* Required Back End Functions:: $B