From 3699e65ce9be0c9372c6cd490164d69fab3dd2e7 Mon Sep 17 00:00:00 2001 From: shuhei-k Date: Thu, 16 Jul 1998 10:04:47 +0000 Subject: [PATCH] Sync up with Gnus 5.6.24. --- ChangeLog | 6 ++ GNUS-NEWS | 2 + lisp/ChangeLog | 94 +++++++++++++++++ lisp/gnus-agent.el | 6 +- lisp/gnus-int.el | 7 +- lisp/gnus-msg.el | 74 +++++++++++++ lisp/gnus-range.el | 2 +- lisp/gnus-salt.el | 60 +++++++---- lisp/gnus-sum.el | 45 ++++++-- lisp/gnus-topic.el | 2 + lisp/gnus-util.el | 94 +++++++++-------- lisp/gnus-win.el | 5 + lisp/gnus.el | 9 +- lisp/message.el | 50 ++++----- lisp/nnmail.el | 178 +++++++++++++++++-------------- lisp/nntp.el | 53 ++++++---- texi/ChangeLog | 20 ++++ texi/gnus.texi | 299 ++++++++++++++++++++++++++++------------------------ texi/message.texi | 6 +- 19 files changed, 660 insertions(+), 352 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21f0fd6..c4491a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-07-16 Shuhei KOBAYASHI + + * lisp/gnus.el (gnus-version-number): Update to 6.8.1. + + * Sync up with Gnus 5.6.24. + 1998-07-10 Keiichi Suzuki * lisp/gnus-ems.el (gnus-mule-cite-add-face): Fix problem when multi diff --git a/GNUS-NEWS b/GNUS-NEWS index 71e58c7..0c5b11a 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -98,3 +98,5 @@ updated by the `gnus-start-date-timer' command. *** Old dejanews archives can now be read by nnweb. *** Byte-compilation of user-specs now works under XEmacs. + +*** `gnus-posting-styles' has been re-activated. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68e3957..252c5dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,97 @@ +Sat Jul 11 03:03:53 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.24 is released. + +Fri Jul 10 04:23:24 1998 Hallvard B. Furuseth + + * gnus-util.el (gnus-parse-netrc): Allow "default" values. + +Fri Jul 10 04:15:35 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-server-opened-hook): Doc change. + +Fri Jul 10 03:03:48 1998 François Pinard + + * gnus-sum.el (gnus-summary-respool-trace): New command and + keystroke. + +Fri Jul 10 02:18:01 1998 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-prin1): Bind print-escape-multibyte to nil. + +Mon Jul 6 01:02:59 1998 Simon Josefsson + + * gnus-range.el (gnus-sorted-complement): Fix comments. + +Thu Jul 2 11:16:14 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-iterate): New macro. + + * message.el (message-pop-to-buffer): Clone locals. + + * gnus-msg.el (gnus-posting-styles): Reinstated. + (gnus-posting-style-alist): Ditto. + +Wed Jul 1 18:02:31 1998 Lars Magne Ingebrigtsen + + * gnus-int.el (gnus-get-function): Set funct to nil. + +1998-07-01 16:57:38 Simon Josefsson + + * gnus-int.el (gnus-get-function): returned non-nil when + function wasn't bound, if noerror=t + +Wed Jul 1 17:30:41 1998 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-mode-map): Bind TAB and M-TAB. + + * gnus-sum.el (gnus-build-sparse-threads): Make sure no dates are + nil. + (gnus-summary-limit-mark-excluded-as-read): Use the intersection. + + * gnus-msg.el (gnus-setup-message): Clone all local variables from + the summary buffer. + +Wed Jul 1 14:03:52 1998 Richard Stallman + + * message.el (message-cite-original): Use mail-citation-hook. + (message-cite-function): Ditto. + +Wed Jul 1 14:00:53 1998 Rajappa Iyer + + * gnus-salt.el (gnus-pick-mode-map): Changed keymap. + +Wed Jul 1 13:33:26 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.23 is released. + +Wed Jul 1 12:52:32 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-record-command): Give more precise time info. + (nntp-next-result-arrived-p): Look for the end of error lines. + +Wed Jul 1 12:24:06 1998 François Pinard + + * gnus-util.el (gnus-delete-if): Would do the opposite. + +Wed Jul 1 01:53:31 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-build-sparse-threads): Didn't work at all. + +Tue Jun 30 15:56:54 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-send-authinfo): Store the user name. + (nntp-authinfo-user): New variable. + + * gnus-sum.el (gnus-summary-limit-mark-excluded-as-read): Would + mark some articles as unread. + + * gnus-agent.el (gnus-agent-expire): Don't sort lines. + +Tue Jun 30 15:56:31 1998 Mike McEwan + + * gnus-agent.el (gnus-agent-expire): Use a fresh hash table. + Mon Jun 29 22:49:49 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.22 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 7d40b82..2a01d85 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1265,13 +1265,13 @@ The following commands are available: (interactive) (let ((methods gnus-agent-covered-methods) (day (- (gnus-time-to-day (current-time)) gnus-agent-expire-days)) - (expiry-hashtb (gnus-make-hashtable 1023)) gnus-command-method sym group articles history overview file histories elem art nov-file low info unreads marked article) (save-excursion (setq overview (get-buffer-create " *expire overview*")) (while (setq gnus-command-method (pop methods)) + (let ((expiry-hashtb (gnus-make-hashtable 1023))) (gnus-agent-open-history) (set-buffer (setq gnus-agent-current-history @@ -1330,7 +1330,7 @@ The following commands are available: (< art article))) (if (file-exists-p (gnus-agent-article-name - (number-to-string article) group)) + (number-to-string art) group)) (forward-line 1) ;; Remove old NOV lines that have no articles. (gnus-delete-line))) @@ -1373,7 +1373,7 @@ The following commands are available: (gnus-delete-line)) (gnus-agent-save-history) (gnus-agent-close-history)) - (gnus-message 4 "Expiry...done"))))) + (gnus-message 4 "Expiry...done")))))) ;;;###autoload (defun gnus-agent-batch () diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index 3246bb4..6a641aa 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -150,9 +150,10 @@ If it is down, start it up (again)." ;; Maybe complain if there is no function. (unless (fboundp func) (require (car method)) - (when (and (not (fboundp func)) - (not noerror)) - (error "No such function: %s" func))) + (when (not (fboundp func)) + (if noerror + (setq func nil) + (error "No such function: %s" func)))) func)) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 0c830cb..5e318a9 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -98,6 +98,17 @@ the second with the current group name.") (defvar gnus-bug-create-help-buffer t "*Should we create the *Gnus Help Bug* buffer?") +(defvar gnus-posting-styles nil + "*Alist of styles to use when posting.") + +(defvar gnus-posting-style-alist + '((organization . message-user-organization) + (signature . message-signature) + (signature-file . message-signature-file) + (address . user-mail-address) + (name . user-full-name)) + "*Mapping from style parameters to variables.") + ;;; Internal variables. (defvar gnus-message-buffer "*Mail Gnus*") @@ -178,6 +189,7 @@ Thank you for your help in stamping out bugs. (copy-sequence message-header-setup-hook))) (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc) (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc) + (add-hook 'message-mode-hook 'gnus-configure-posting-styles) (unwind-protect (progn ,@forms) @@ -1004,6 +1016,68 @@ this is a reply." (insert " "))) (insert "\n"))))))) +;;; Posting styles. + +(defun gnus-configure-posting-styles () + "Configure posting styles according to `gnus-posting-styles'." + (let ((styles gnus-posting-styles) + (gnus-newsgroup-name (or gnus-newsgroup-name "")) + style match variable attribute value value-value) + ;; Go through all styles and look for matches. + (while styles + (setq style (pop styles) + match (pop style)) + (when (cond ((stringp match) + ;; Regexp string match on the group name. + (string-match match gnus-newsgroup-name)) + ((or (symbolp match) + (gnus-functionp match)) + (cond ((gnus-functionp match) + ;; Function to be called. + (funcall match)) + ((boundp match) + ;; Variable to be checked. + (symbol-value match)))) + ((listp match) + ;; This is a form to be evaled. + (eval match))) + ;; We have a match, so we set the variables. + (while style + (setq attribute (pop style) + value (cadr attribute) + variable nil) + ;; We find the variable that is to be modified. + (if (and (not (stringp (car attribute))) + (not (setq variable (cdr (assq (car attribute) + gnus-posting-style-alist))))) + (message "Couldn't find attribute %s" (car attribute)) + ;; We get the value. + (setq value-value + (cond ((stringp value) + value) + ((or (symbolp value) + (gnus-functionp value)) + (cond ((gnus-functionp value) + (funcall value)) + ((boundp value) + (symbol-value value)))) + ((listp value) + (eval value)))) + (if variable + (progn + ;; This is an ordinary variable. + (make-local-variable variable) + (set variable value-value)) + ;; This is a header to be added to the headers when + ;; posting. + (when value-value + (make-local-variable message-required-mail-headers) + (make-local-variable message-required-news-headers) + (push (cons (car attribute) value-value) + message-required-mail-headers) + (push (cons (car attribute) value-value) + message-required-news-headers))))))))) + ;;; Allow redefinition of functions. (gnus-ems-redefine) diff --git a/lisp/gnus-range.el b/lisp/gnus-range.el index 799e883..672e726 100644 --- a/lisp/gnus-range.el +++ b/lisp/gnus-range.el @@ -55,7 +55,7 @@ list1)) (defun gnus-sorted-complement (list1 list2) - "Return a list of elements of LIST1 that do not appear in LIST2. + "Return a list of elements that are in LIST1 or LIST2 but not both. Both lists have to be sorted over <." (let (out) (if (or (null list1) (null list2)) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index c8280b2..00ca021 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -73,21 +73,10 @@ It accepts the same format specs that `gnus-summary-line-format' does." (gnus-define-keys gnus-pick-mode-map " " gnus-pick-next-page - "u" gnus-summary-unmark-as-processable - "." gnus-pick-article + "u" gnus-pick-unmark-article-or-thread + "." gnus-pick-article-or-thread gnus-down-mouse-2 gnus-pick-mouse-pick-region "\r" gnus-pick-start-reading - "t" gnus-uu-mark-thread - "T" gnus-uu-unmark-thread - "U" gnus-summary-unmark-all-processable - "v" gnus-uu-mark-over - "r" gnus-uu-mark-region - "R" gnus-uu-unmark-region - "e" gnus-uu-mark-by-regexp - "E" gnus-uu-mark-by-regexp - "b" gnus-uu-mark-buffer - "B" gnus-uu-unmark-buffer - "X" gnus-pick-start-reading )) (defun gnus-pick-make-menu-bar () @@ -172,21 +161,48 @@ If given a prefix, mark all unpicked articles as read." (gnus-summary-next-group))) (error "No articles have been picked")))) +(defun gnus-pick-goto-article (arg) + "Go to the article number indicated by ARG. If ARG is an invalid +article number, then stay on current line." + (let (pos) + (save-excursion + (goto-char (point-min)) + (when (zerop (forward-line (1- (prefix-numeric-value arg)))) + (setq pos (point)))) + (if (not pos) + (gnus-error 2 "No such line: %s" arg) + (goto-char pos)))) + (defun gnus-pick-article (&optional arg) - "Pick the article on the current line. + "Pick the article on the current line. If ARG, pick the article on that line instead." (interactive "P") (when arg - (let (pos) - (save-excursion - (goto-char (point-min)) - (when (zerop (forward-line (1- (prefix-numeric-value arg)))) - (setq pos (point)))) - (if (not pos) - (gnus-error 2 "No such line: %s" arg) - (goto-char pos)))) + (gnus-pick-goto-article arg)) (gnus-summary-mark-as-processable 1)) +(defun gnus-pick-article-or-thread (&optional arg) + "If gnus-thread-hide-subtree is t, then pick the thread on the current line. +Otherwise pick the article on the current line. +If ARG, pick the article/thread on that line instead." + (interactive "P") + (when arg + (gnus-pick-goto-article arg)) + (if gnus-thread-hide-subtree + (gnus-uu-mark-thread) + (gnus-summary-mark-as-processable 1))) + +(defun gnus-pick-unmark-article-or-thread (&optional arg) + "If gnus-thread-hide-subtree is t, then unmark the thread on current line. +Otherwise unmark the article on current line. +If ARG, unmark thread/article on that line instead." + (interactive "P") + (when arg + (gnus-pick-goto-article arg)) + (if gnus-thread-hide-subtree + (gnus-uu-unmark-thread) + (gnus-summary-unmark-as-processable 1))) + (defun gnus-pick-mouse-pick (e) (interactive "e") (mouse-set-point e) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 0a20c92..280138a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1435,6 +1435,7 @@ increase the score of each group you read." "c" gnus-summary-copy-article "B" gnus-summary-crosspost-article "q" gnus-summary-respool-query + "t" gnus-summary-respool-trace "i" gnus-summary-import-article "p" gnus-summary-article-posted-p) @@ -1556,6 +1557,7 @@ increase the score of each group you read." (gnus-check-backend-function 'request-expire-articles gnus-newsgroup-name)] ["Query respool" gnus-summary-respool-query t] + ["Trace respool" gnus-summary-respool-trace t] ["Delete expirable articles" gnus-summary-expire-articles-now (gnus-check-backend-function 'request-expire-articles gnus-newsgroup-name)]) @@ -2948,6 +2950,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (defun gnus-build-sparse-threads () (let ((headers gnus-newsgroup-headers) + (gnus-summary-ignore-duplicates t) header references generation relations cthread subject child end pthread relation new-child date) ;; First we create an alist of generations/relations, where @@ -2966,12 +2969,14 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." generation 0) (while (search-backward ">" nil t) (setq end (1+ (point))) - (if (search-backward "<" nil t) - (push (list (incf generation) - child (setq child new-child) - subject date) - relations))) - (push (list (1+ generation) child nil subject) relations) + (when (search-backward "<" nil t) + (setq new-child (buffer-substring (point) end)) + (push (list (incf generation) + child (setq child new-child) + subject date) + relations))) + (when child + (push (list (1+ generation) child nil subject) relations)) (erase-buffer))) (kill-buffer (current-buffer))) ;; Sort over trustworthiness. @@ -2980,7 +2985,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (when (gnus-dependencies-add-header (make-full-mail-header gnus-reffed-article-number - (nth 3 relation) "" (nth 4 relation) + (nth 3 relation) "" (or (nth 4 relation) "") (nth 1 relation) (or (nth 2 relation) "") 0 0 "") gnus-newsgroup-dependencies nil) @@ -4659,6 +4664,19 @@ current article will be taken into consideration." ;; Just return the current article. (list (gnus-summary-article-number)))))) +(defmacro gnus-summary-iterate (arg &rest forms) + "Iterate over the process/prefixed articles and do FORMS. +ARG is the interactive prefix given to the command. FORMS will be +executed with point over the summary line of the articles." + (let ((articles (make-symbol "gnus-summary-iterate-articles"))) + `(let ((,articles (gnus-summary-work-articles ,arg))) + (while ,articles + (gnus-summary-goto-subject (car ,articles)) + ,@forms)))) + +(put 'gnus-summary-iterate 'lisp-indent-function 1) +(put 'gnus-summary-iterate 'edebug-form-spec '(form body)) + (defun gnus-summary-save-process-mark () "Push the current set of process marked articles on the stack." (interactive) @@ -6059,7 +6077,8 @@ If ALL, mark even excluded ticked and dormants as read." '<) (sort gnus-newsgroup-limit '<))) article) - (setq gnus-newsgroup-unreads gnus-newsgroup-limit) + (setq gnus-newsgroup-unreads + (gnus-intersection gnus-newsgroup-unreads gnus-newsgroup-limit)) (if all (setq gnus-newsgroup-dormant nil gnus-newsgroup-marked nil @@ -7368,7 +7387,7 @@ groups." ;;; Respooling -(defun gnus-summary-respool-query (&optional silent) +(defun gnus-summary-respool-query (&optional silent trace) "Query where the respool algorithm would put this article." (interactive) (let (gnus-mark-article-hook) @@ -7377,7 +7396,7 @@ groups." (set-buffer gnus-original-article-buffer) (save-restriction (message-narrow-to-head) - (let ((groups (nnmail-article-group 'identity))) + (let ((groups (nnmail-article-group 'identity trace))) (unless silent (if groups (message "This message would go to %s" @@ -7385,6 +7404,12 @@ groups." (message "This message would go to no groups")) groups)))))) +(defun gnus-summary-respool-trace () + "Trace where the respool algorithm would put this article. +Display a buffer showing all fancy splitting patterns which matched." + (interactive) + (gnus-summary-respool-query nil t)) + ;; Summary marking commands. (defun gnus-summary-kill-same-subject-and-select (&optional unmark) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 6880f63..e9f7ee5 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -904,6 +904,8 @@ articles in the topic and its subtopics." "Gp" gnus-topic-edit-parameters "#" gnus-topic-mark-topic "\M-#" gnus-topic-unmark-topic + [tab] gnus-topic-indent + [M-tab] gnus-topic-unindent gnus-mouse-2 gnus-mouse-pick-topic) ;; Define a new submap. diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 82e7f94..23dd313 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -580,6 +580,7 @@ Timezone package is used." Bind `print-quoted' and `print-readably' to t while printing." (let ((print-quoted t) (print-readably t) + (print-escape-multibyte nil) print-level print-length) (prin1 form (current-buffer)))) @@ -878,50 +879,59 @@ ARG is passed to the first function." "password" "account" "macdef" "force")) alist elem result pair) (nnheader-set-temp-buffer " *netrc*") - (set-syntax-table gnus-netrc-syntax-table) - (insert-file-contents file) - (goto-char (point-min)) - ;; Go through the file, line by line. - (while (not (eobp)) - (narrow-to-region (point) (gnus-point-at-eol)) - ;; For each line, get the tokens and values. - (while (not (eobp)) - (skip-chars-forward "\t ") - (unless (eobp) - (setq elem (buffer-substring - (point) (progn (forward-sexp 1) (point)))) - (cond - ((equal elem "macdef") - ;; We skip past the macro definition. + (unwind-protect + (progn + (set-syntax-table gnus-netrc-syntax-table) + (insert-file-contents file) + (goto-char (point-min)) + ;; Go through the file, line by line. + (while (not (eobp)) + (narrow-to-region (point) (gnus-point-at-eol)) + ;; For each line, get the tokens and values. + (while (not (eobp)) + (skip-chars-forward "\t ") + (unless (eobp) + (setq elem (buffer-substring + (point) (progn (forward-sexp 1) (point)))) + (cond + ((equal elem "macdef") + ;; We skip past the macro definition. + (widen) + (while (and (zerop (forward-line 1)) + (looking-at "$"))) + (narrow-to-region (point) (point))) + ((member elem tokens) + ;; Tokens that don't have a following value are ignored, + ;; except "default". + (when (and pair (or (cdr pair) + (equal (car pair) "default"))) + (push pair alist)) + (setq pair (list elem))) + (t + ;; Values that haven't got a preceding token are ignored. + (when pair + (setcdr pair elem) + (push pair alist) + (setq pair nil)))))) + (if alist + (push (nreverse alist) result)) + (setq alist nil + pair nil) (widen) - (while (and (zerop (forward-line 1)) - (looking-at "$"))) - (narrow-to-region (point) (point))) - ((member elem tokens) - ;; Tokens that don't have a following value are ignored. - (when (and pair (cdr pair)) - (push pair alist)) - (setq pair (list elem))) - (t - ;; Values that haven't got a preceding token are ignored. - (when pair - (setcdr pair elem) - (push pair alist) - (setq pair nil)))))) - (push alist result) - (setq alist nil - pair nil) - (widen) - (forward-line 1)) - result)))) + (forward-line 1)) + (nreverse result)) + (kill-buffer " *netrc*")))))) (defun gnus-netrc-machine (list machine) - "Return the netrc values from LIST for MACHINE." - (while (and list - (not (equal (cdr (assoc "machine" (car list))) machine))) - (pop list)) - (when list - (car list))) + "Return the netrc values from LIST for MACHINE or for the default entry." + (let ((rest list)) + (while (and list + (not (equal (cdr (assoc "machine" (car list))) machine))) + (pop list)) + (car (or list + (progn (while (and rest (not (assoc "default" (car rest)))) + (pop rest)) + rest))))) (defun gnus-netrc-get (alist type) "Return the value of token TYPE from ALIST." @@ -949,7 +959,7 @@ ARG is passed to the first function." "Delete elements from LIST that satisfy PREDICATE." (let (out) (while list - (when (funcall predicate (car list)) + (unless (funcall predicate (car list)) (push (car list) out)) (pop list)) (nreverse out))) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index 5c4eb52..803d2ea 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -154,6 +154,10 @@ (vertical 1.0 (summary 0.5 point) ("*Score Words*" 1.0))) + (split-trace + (vertical 1.0 + (summary 0.5 point) + ("*Split Trace*" 1.0))) (category (vertical 1.0 (category 1.0))) @@ -185,6 +189,7 @@ See the Gnus manual for an explanation of the syntax used.") (picons . gnus-picons-buffer-name) (tree . gnus-tree-buffer) (score-trace . "*Score Trace*") + (split-trace . "*Split Trace*") (info . gnus-info-buffer) (category . gnus-category-buffer) (article-copy . gnus-article-copy) diff --git a/lisp/gnus.el b/lisp/gnus.el index fe6072e..f24d205 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,11 +250,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.8.0" +(defconst gnus-version-number "6.8.1" "Version number for this version of gnus.") (defconst gnus-version - (format "Chao-gnus %s (based on Gnus 5.6.22; for SEMI 1.8/FLIM 1.8)" + (format "Chao-gnus %s (based on Gnus 5.6.24; for SEMI 1.8/FLIM 1.8)" gnus-version-number) "Version string for this version of gnus.") @@ -1624,8 +1624,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-uu-decode-binhex gnus-uu-decode-uu-view gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view - gnus-uu-decode-binhex-view) - ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh) + gnus-uu-decode-binhex-view gnus-uu-unmark-thread) + ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh + gnus-uu-unmark-thread) ("gnus-msg" (gnus-summary-send-map keymap) gnus-article-mail gnus-copy-article-buffer gnus-extended-version) ("gnus-msg" :interactive t diff --git a/lisp/message.el b/lisp/message.el index 013df8f..839b565 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -476,16 +476,12 @@ Used by `message-yank-original' via `message-yank-cite'." :type 'integer) ;;;###autoload -(defcustom message-cite-function - (if (and (boundp 'mail-citation-hook) - mail-citation-hook) - mail-citation-hook - 'message-cite-original) +(defcustom message-cite-function 'message-cite-original "*Function for citing an original message. -Pre-defined functions include `message-cite-original' and -`message-cite-original-without-signature'." +Predefined functions include `message-cite-original' and +`message-cite-original-without-signature'. +Note that `message-cite-original' uses `mail-citation-hook' if that is non-nil." :type '(radio (function-item message-cite-original) - (function-item message-cite-original-without-signature) (function-item sc-cite-original) (function :tag "Other")) :group 'message-insertion) @@ -1756,19 +1752,22 @@ prefix, and don't delete any headers." (defun message-cite-original () "Cite function in the standard Message manner." - (let ((start (point)) - (functions - (when message-indent-citation-function - (if (listp message-indent-citation-function) - message-indent-citation-function - (list message-indent-citation-function))))) - (goto-char start) - (while functions - (funcall (pop functions))) - (when message-citation-line-function - (unless (bolp) - (insert "\n")) - (funcall message-citation-line-function)))) + (if (and (boundp 'mail-citation-hook) + mail-citation-hook) + (run-hooks 'mail-citation-hook) + (let ((start (point)) + (functions + (when message-indent-citation-function + (if (listp message-indent-citation-function) + message-indent-citation-function + (list message-indent-citation-function))))) + (goto-char start) + (while functions + (funcall (pop functions))) + (when message-citation-line-function + (unless (bolp) + (insert "\n")) + (funcall message-citation-line-function))))) (defun message-insert-citation-line () "Function that inserts a simple citation line." @@ -3243,7 +3242,8 @@ Headers already prepared in the buffer are not modified." (defun message-pop-to-buffer (name) "Pop to buffer NAME, and warn if it already exists and is modified." - (let ((buffer (get-buffer name))) + (let ((buffer (get-buffer name)) + (cur (current-buffer))) (if (and buffer (buffer-name buffer)) (progn @@ -3252,9 +3252,9 @@ Headers already prepared in the buffer are not modified." (not (y-or-n-p "Message already being composed; erase? "))) (error "Message being composed"))) - (set-buffer (pop-to-buffer name)))) - (erase-buffer) - (message-mode)) + (set-buffer (pop-to-buffer name))) + (erase-buffer) + (message-mode))) (defun message-do-send-housekeeping () "Kill old message buffers." diff --git a/lisp/nnmail.el b/lisp/nnmail.el index e761868..e70b065 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -468,6 +468,9 @@ parameter. It should return nil, `warn' or `delete'." (defvar nnmail-internal-password nil) +(defvar nnmail-split-tracing nil) +(defvar nnmail-split-trace nil) + (defconst nnmail-version "nnmail 1.0" @@ -1043,7 +1046,7 @@ FUNC will be called with the buffer narrowed to each mail." (funcall exit-func)) (kill-buffer (current-buffer))))) -(defun nnmail-article-group (func) +(defun nnmail-article-group (func &optional trace) "Look at the headers and return an alist of groups that match. FUNC will be called with the group name to determine the article number." (let ((methods nnmail-split-methods) @@ -1082,6 +1085,8 @@ FUNC will be called with the group name to determine the article number." ;; Allow washing. (goto-char (point-min)) (run-hooks 'nnmail-split-hook) + (when (setq nnmail-split-tracing trace) + (setq nnmail-split-trace nil)) (if (and (symbolp nnmail-split-methods) (fboundp nnmail-split-methods)) (let ((split @@ -1141,6 +1146,18 @@ FUNC will be called with the group name to determine the article number." (setq group-art (list (cons (car method) (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))) + (nnheader-set-temp-buffer "*Split Trace*") + (gnus-add-current-to-buffer-list) + (while trace + (insert (car trace) "\n") + (setq trace (cdr trace))) + (goto-char (point-min)) + (gnus-configure-windows 'split-trace) + (set-buffer restore))) ;; See whether the split methods returned `junk'. (if (equal group-art '(junk)) nil @@ -1237,81 +1254,87 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (defun nnmail-split-it (split) ;; Return a list of groups matching SPLIT. - (cond - ;; nil split - ((null split) - nil) - - ;; A group name. Do the \& and \N subs into the string. - ((stringp split) - (list (nnmail-expand-newtext split))) - - ;; Junk the message. - ((eq split 'junk) - (list 'junk)) - - ;; Builtin & operation. - ((eq (car split) '&) - (apply 'nconc (mapcar 'nnmail-split-it (cdr split)))) - - ;; Builtin | operation. - ((eq (car split) '|) - (let (done) - (while (and (not done) (cdr split)) - (setq split (cdr split) - done (nnmail-split-it (car split)))) - done)) - - ;; Builtin : operation. - ((eq (car split) ':) - (nnmail-split-it (save-excursion (eval (cdr split))))) - - ;; Check the cache for the regexp for this split. - ;; FIX FIX FIX could avoid calling assq twice here - ((assq split nnmail-split-cache) - (goto-char (point-max)) - ;; FIX FIX FIX problem with re-search-backward is that if you have - ;; a split: (from "foo-\\(bar\\|baz\\)@gnus.org "mail.foo.\\1") - ;; and someone mails a message with 'To: foo-bar@gnus.org' and - ;; 'CC: foo-baz@gnus.org', we'll pick 'mail.foo.baz' as the group - ;; if the cc line is a later header, even though the other choice - ;; is probably better. Also, this routine won't do a crosspost - ;; when there are two different matches. - ;; I guess you could just make this more determined, and it could - ;; look for still more matches prior to this one, and recurse - ;; on each of the multiple matches hit. Of course, then you'd - ;; want to make sure that nnmail-article-group or nnmail-split-fancy - ;; removed duplicates, since there might be more of those. - ;; I guess we could also remove duplicates in the & split case, since - ;; that's the only thing that can introduce them. - (when (re-search-backward (cdr (assq split nnmail-split-cache)) nil t) - ;; Someone might want to do a \N sub on this match, so get the - ;; correct match positions. - (goto-char (match-end 0)) - (let ((value (nth 1 split))) - (re-search-backward (if (symbolp value) - (cdr (assq value nnmail-split-abbrev-alist)) - value) - (match-end 1))) - (nnmail-split-it (nth 2 split)))) - - ;; Not in cache, compute a regexp for the field/value pair. - (t - (let* ((field (nth 0 split)) - (value (nth 1 split)) - (regexp (concat "^\\(\\(" - (if (symbolp field) - (cdr (assq field nnmail-split-abbrev-alist)) - field) - "\\):.*\\)\\<\\(" - (if (symbolp value) - (cdr (assq value nnmail-split-abbrev-alist)) - value) - "\\)\\>"))) - (push (cons split regexp) nnmail-split-cache) - ;; Now that it's in the cache, just call nnmail-split-it again - ;; on the same split, which will find it immediately in the cache. - (nnmail-split-it split))))) + (let (cached-pair) + (cond + ;; nil split + ((null split) + nil) + + ;; A group name. Do the \& and \N subs into the string. + ((stringp split) + (when nnmail-split-tracing + (push (format "\"%s\"" split) nnmail-split-trace)) + (list (nnmail-expand-newtext split))) + + ;; Junk the message. + ((eq split 'junk) + (when nnmail-split-tracing + (push "junk" nnmail-split-trace)) + (list 'junk)) + + ;; Builtin & operation. + ((eq (car split) '&) + (apply 'nconc (mapcar 'nnmail-split-it (cdr split)))) + + ;; Builtin | operation. + ((eq (car split) '|) + (let (done) + (while (and (not done) (cdr split)) + (setq split (cdr split) + done (nnmail-split-it (car split)))) + done)) + + ;; Builtin : operation. + ((eq (car split) ':) + (nnmail-split-it (save-excursion (eval (cdr split))))) + + ;; Check the cache for the regexp for this split. + ((setq cached-pair (assq split nnmail-split-cache)) + (goto-char (point-max)) + ;; FIX FIX FIX problem with re-search-backward is that if you have + ;; a split: (from "foo-\\(bar\\|baz\\)@gnus.org "mail.foo.\\1") + ;; and someone mails a message with 'To: foo-bar@gnus.org' and + ;; 'CC: foo-baz@gnus.org', we'll pick 'mail.foo.baz' as the group + ;; if the cc line is a later header, even though the other choice + ;; is probably better. Also, this routine won't do a crosspost + ;; when there are two different matches. + ;; I guess you could just make this more determined, and it could + ;; look for still more matches prior to this one, and recurse + ;; on each of the multiple matches hit. Of course, then you'd + ;; want to make sure that nnmail-article-group or nnmail-split-fancy + ;; removed duplicates, since there might be more of those. + ;; I guess we could also remove duplicates in the & split case, since + ;; that's the only thing that can introduce them. + (when (re-search-backward (cdr cached-pair) nil t) + (when nnmail-split-tracing + (push (cdr cached-pair) nnmail-split-trace)) + ;; Someone might want to do a \N sub on this match, so get the + ;; correct match positions. + (goto-char (match-end 0)) + (let ((value (nth 1 split))) + (re-search-backward (if (symbolp value) + (cdr (assq value nnmail-split-abbrev-alist)) + value) + (match-end 1))) + (nnmail-split-it (nth 2 split)))) + + ;; Not in cache, compute a regexp for the field/value pair. + (t + (let* ((field (nth 0 split)) + (value (nth 1 split)) + (regexp (concat "^\\(\\(" + (if (symbolp field) + (cdr (assq field nnmail-split-abbrev-alist)) + field) + "\\):.*\\)\\<\\(" + (if (symbolp value) + (cdr (assq value nnmail-split-abbrev-alist)) + value) + "\\)\\>"))) + (push (cons split regexp) nnmail-split-cache) + ;; Now that it's in the cache, just call nnmail-split-it again + ;; on the same split, which will find it immediately in the cache. + (nnmail-split-it split)))))) (defun nnmail-expand-newtext (newtext) (let ((len (length newtext)) @@ -1755,8 +1778,7 @@ If ARGS, PROMPT is used as an argument to `format'." (defun nnmail-purge-split-history (group) "Remove all instances of GROUP from `nnmail-split-history'." - (let ((history nnmail-split-history) - prev) + (let ((history nnmail-split-history)) (while history (setcar history (gnus-delete-if (lambda (e) (string= (car e) group)) (car history))) diff --git a/lisp/nntp.el b/lisp/nntp.el index 67eafb7..970f56b 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -45,13 +45,11 @@ (defvoo nntp-server-opened-hook '(nntp-send-mode-reader) "*Hook used for sending commands to the server at startup. The default value is `nntp-send-mode-reader', which makes an innd -server spawn an nnrpd server. Another useful function to put in this -hook might be `nntp-send-authinfo', which will prompt for a password -to allow posting from the server. Note that this is only necessary to -do on servers that use strict access control.") +server spawn an nnrpd server.") (defvoo nntp-authinfo-function 'nntp-send-authinfo - "Function used to send AUTHINFO to the server.") + "Function used to send AUTHINFO to the server. +It is called with no parameters.") (defvoo nntp-server-action-alist '(("nntpd 1\\.5\\.11t" @@ -197,6 +195,7 @@ server there that you can connect to. See also (defvoo nntp-last-command-time nil) (defvoo nntp-last-command nil) (defvoo nntp-authinfo-password nil) +(defvoo nntp-authinfo-user nil) (defvar nntp-connection-list nil) @@ -234,8 +233,10 @@ server there that you can connect to. See also (save-excursion (set-buffer (get-buffer-create "*nntp-log*")) (goto-char (point-max)) - (insert (format-time-string "%Y%m%dT%H%M%S" (current-time)) - " " nntp-address " " string "\n"))) + (let ((time (current-time))) + (insert (format-time-string "%Y%m%dT%H%M%S" time) + "." (format "%03d" (/ (nth 2 time) 1000)) + " " nntp-address " " string "\n")))) (defsubst nntp-wait-for (process wait-for buffer &optional decode discard) "Wait for WAIT-FOR to arrive from PROCESS." @@ -392,18 +393,22 @@ server there that you can connect to. See also (nnoo-define-basics nntp) (defsubst nntp-next-result-arrived-p () - (let ((point (point))) - (cond - ((eq (following-char) ?2) - (if (re-search-forward "\n\\.\r?\n" nil t) - t - (goto-char point) - nil)) - ((looking-at "[34]") - (forward-line 1) - t) - (t - nil)))) + (cond + ;; A result that starts with a 2xx code is terminated by + ;; a line with only a "." on it. + ((eq (following-char) ?2) + (if (re-search-forward "\n\\.\r?\n" nil t) + t + nil)) + ;; A result that startx with a 3xx or 4xx code is terminated + ;; by a newline. + ((looking-at "[34]") + (if (search-forward "\n" nil t) + t + nil)) + ;; No result here. + (t + nil))) (deffoo nntp-retrieve-headers (articles &optional group server fetch-old) "Retrieve the headers of ARTICLES." @@ -742,7 +747,10 @@ reading." "Send the AUTHINFO to the nntp server. It will look in the \"~/.authinfo\" file for matching entries. If nothing suitable is found there, it will prompt for a user name -and a password." +and a password. + +If SEND-IF-FORCE, only send authinfo to the server if the +.authinfo file has the FORCE token." (let* ((list (gnus-parse-netrc nntp-authinfo-file)) (alist (gnus-netrc-machine list nntp-address)) (force (gnus-netrc-get alist "force")) @@ -752,7 +760,10 @@ and a password." force) (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" - (or user (read-string (format "NNTP (%s) user name: " nntp-address)))) + (or user + nntp-authinfo-user + (setq nntp-authinfo-user + (read-string (format "NNTP (%s) user name: " nntp-address))))) (nntp-send-command "^2.*\r?\n" "AUTHINFO PASS" (or passwd diff --git a/texi/ChangeLog b/texi/ChangeLog index 980c667..f54aabe 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,23 @@ +Fri Jul 10 04:26:23 1998 Lars Magne Ingebrigtsen + + * gnus.texi (NNTP): Addition. + +Sat Jul 4 14:24:29 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Gnus Utility Functions): Addition. + +Thu Jul 2 11:37:51 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Posting Styles): Ununcommented. + +Wed Jul 1 17:57:54 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Topic Commands): Addition. + +Tue Jun 30 16:11:27 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Topic Commands): Addition. + Mon Jun 29 21:46:13 1998 Lars Magne Ingebrigtsen * gnus.texi (Article Keymap): Typo. diff --git a/texi/gnus.texi b/texi/gnus.texi index 7e88b02..628f149 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.8.0 Manual +@settitle Semi-gnus 6.8.1 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -316,7 +316,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.8.0 Manual +@title Semi-gnus 6.8.1 Manual @author by Lars Magne Ingebrigtsen @page @@ -359,7 +359,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-Gnus 6.8.0 +This manual corresponds to Semi-Gnus 6.8.1. @end ifinfo @@ -2662,8 +2662,13 @@ convention (@pxref{Process/Prefix}). @findex gnus-topic-remove-group Remove a group from the current topic (@code{gnus-topic-remove-group}). This command is mainly useful if you have the same group in several -topics and wish to remove it from one of the topics. -The command uses the process/prefix convention +topics and wish to remove it from one of the topics. You may also +remove a group from all topics, but in that case, Gnus will add it to +the root topic the next time you start Gnus. In fact, all new groups +(which, naturally, don't belong to any topic) will show up in the root +topic. + +This command uses the process/prefix convention (@pxref{Process/Prefix}). @item T M @@ -2708,12 +2713,20 @@ toggling command on topics. In addition, if you give a numerical prefix, group on that level (and lower) will be displayed. @item T TAB +@itemx TAB @kindex T TAB (Topic) +@kindex TAB (Topic) @findex gnus-topic-indent ``Indent'' the current topic so that it becomes a sub-topic of the previous topic (@code{gnus-topic-indent}). If given a prefix, ``un-indent'' the topic instead. +@item M-TAB +@kindex M-TAB (Topic) +@findex gnus-topic-unindent +``Un-indent'' the current topic so that it becomes a sub-topic of the +parent of its current parent (@code{gnus-topic-unindent}). + @item C-k @kindex C-k (Topic) @findex gnus-topic-kill-group @@ -6864,10 +6877,13 @@ Here are the available keystrokes when using pick mode: @table @kbd @item . @kindex . (Pick) -@findex gnus-summary-mark-as-processable -Pick the article on the current line -(@code{gnus-summary-mark-as-processable}). If given a numerical prefix, -go to that article and pick it. (The line number is normally displayed +@findex gnus-pick-article-or-thread +Pick the article or thread on the current line +(@code{gnus-pick-article-or-thread}). If the variable +@code{gnus-thread-hide-subtree} is true, then this key selects the +entire thread when used at the first article of the thread. Otherwise, +it selects just the article. If given a numerical prefix, go to that +thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) @item SPACE @@ -6878,53 +6894,13 @@ at the end of the buffer, start reading the picked articles. @item u @kindex u (Pick) -@findex gnus-summary-unmark-as-processable -Unpick the article (@code{gnus-summary-unmark-as-processable}). - -@item U -@kindex U (Pick) -@findex gnus-summary-unmark-all-processable -Unpick all articles (@code{gnus-summary-unmark-all-processable}). - -@item t -@kindex t (Pick) -@findex gnus-uu-mark-thread -Pick the thread (@code{gnus-uu-mark-thread}). - -@item T -@kindex T (Pick) -@findex gnus-uu-unmark-thread -Unpick the thread (@code{gnus-uu-unmark-thread}). - -@item r -@kindex r (Pick) -@findex gnus-uu-mark-region -Pick the region (@code{gnus-uu-mark-region}). - -@item R -@kindex R (Pick) -@findex gnus-uu-unmark-region -Unpick the region (@code{gnus-uu-unmark-region}). - -@item e -@kindex e (Pick) -@findex gnus-uu-mark-by-regexp -Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). - -@item E -@kindex E (Pick) -@findex gnus-uu-unmark-by-regexp -Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). - -@item b -@kindex b (Pick) -@findex gnus-uu-mark-buffer -Pick the buffer (@code{gnus-uu-mark-buffer}). - -@item B -@kindex B (Pick) -@findex gnus-uu-unmark-buffer -Unpick the buffer (@code{gnus-uu-unmark-buffer}). +@findex gnus-pick-unmark-article-or-thread. +Unpick the thread or article +(@code{gnus-pick-unmark-article-or-thread}). If the variable +@code{gnus-thread-hide-subtree} is true, then this key unpicks the +thread if used at the first article of the thread. Otherwise it unpicks +just the article. You can give this key a numerical prefix to unpick +the thread or article at that line. @item RET @kindex RET (Pick) @@ -6937,6 +6913,11 @@ will still be visible when you are reading. @end table +All the normal summary mode commands are still available in the +pick-mode, with the exception of @kbd{u}. However @kbd{!} is available +which is mapped to the same function +@code{gnus-summary-tick-article-forward}. + If this sounds like a good idea to you, you could say: @lisp @@ -7211,6 +7192,12 @@ If you want to re-spool an article, you might be curious as to what group the article will end up in before you do the re-spooling. This command will tell you (@code{gnus-summary-respool-query}). +@item B t +@kindex B t (Summary) +@findex gnus-summary-respool-trace +Similarly, this command will display all fancy splitting patterns used +when repooling, if any (@code{gnus-summary-respool-trace}). + @item B p @kindex B p (Summary) @findex gnus-summary-article-posted-p @@ -8038,6 +8025,7 @@ to make gnus try to post using the foreign server. * Posting Server:: What server should you post via? * Mail and Post:: Mailing and posting at the same time. * Archived Messages:: Where gnus stores the messages you've sent. +* Posting Styles:: An easier way to specify who you are. * Drafts:: Postponing messages and rejected messages. * Rejected Articles:: What happens if the server doesn't like your article? @end menu @@ -8293,83 +8281,83 @@ but the latter is the preferred method. @end table -@c @node Posting Styles -@c @section Posting Styles -@c @cindex posting styles -@c @cindex styles -@c -@c All them variables, they make my head swim. -@c -@c So what if you want a different @code{Organization} and signature based -@c on what groups you post to? And you post both from your home machine -@c and your work machine, and you want different @code{From} lines, and so -@c on? -@c -@c @vindex gnus-posting-styles -@c One way to do stuff like that is to write clever hooks that change the -@c variables you need to have changed. That's a bit boring, so somebody -@c came up with the bright idea of letting the user specify these things in -@c a handy alist. Here's an example of a @code{gnus-posting-styles} -@c variable: -@c -@c @lisp -@c ((".*" -@c (signature . "Peace and happiness") -@c (organization . "What me?")) -@c ("^comp" -@c (signature . "Death to everybody")) -@c ("comp.emacs.i-love-it" -@c (organization . "Emacs is it"))) -@c @end lisp -@c -@c As you might surmise from this example, this alist consists of several -@c @dfn{styles}. Each style will be applicable if the first element -@c ``matches'', in some form or other. The entire alist will be iterated -@c over, from the beginning towards the end, and each match will be -@c applied, which means that attributes in later styles that match override -@c the same attributes in earlier matching styles. So -@c @samp{comp.programming.literate} will have the @samp{Death to everybody} -@c signature and the @samp{What me?} @code{Organization} header. -@c -@c The first element in each style is called the @code{match}. If it's a -@c string, then Gnus will try to regexp match it against the group name. -@c If it's a function symbol, that function will be called with no -@c arguments. If it's a variable symbol, then the variable will be -@c referenced. If it's a list, then that list will be @code{eval}ed. In -@c any case, if this returns a non-@code{nil} value, then the style is said -@c to @dfn{match}. -@c -@c Each style may contain a arbitrary amount of @dfn{attributes}. Each -@c attribute consists of a @var{(name . value)} pair. The attribute name -@c can be one of @code{signature}, @code{organization} or @code{from}. The -@c attribute name can also be a string. In that case, this will be used as -@c a header name, and the value will be inserted in the headers of the -@c article. -@c -@c The attribute value can be a string (used verbatim), a function (the -@c return value will be used), a variable (its value will be used) or a -@c list (it will be @code{eval}ed and the return value will be used). -@c -@c So here's a new example: -@c -@c @lisp -@c (setq gnus-posting-styles -@c '((".*" -@c (signature . "~/.signature") -@c (from . "user@@foo (user)") -@c ("X-Home-Page" . (getenv "WWW_HOME")) -@c (organization . "People's Front Against MWM")) -@c ("^rec.humor" -@c (signature . my-funny-signature-randomizer)) -@c ((equal (system-name) "gnarly") -@c (signature . my-quote-randomizer)) -@c (posting-from-work-p -@c (signature . "~/.work-signature") -@c (from . "user@@bar.foo (user)") -@c (organization . "Important Work, Inc")) -@c ("^nn.+:" -@c (signature . "~/.mail-signature")))) -@c @end lisp +@node Posting Styles +@section Posting Styles +@cindex posting styles +@cindex styles + +All them variables, they make my head swim. + +So what if you want a different @code{Organization} and signature based +on what groups you post to? And you post both from your home machine +and your work machine, and you want different @code{From} lines, and so +on? + +@vindex gnus-posting-styles +One way to do stuff like that is to write clever hooks that change the +variables you need to have changed. That's a bit boring, so somebody +came up with the bright idea of letting the user specify these things in +a handy alist. Here's an example of a @code{gnus-posting-styles} +variable: + +@lisp +((".*" + (signature "Peace and happiness") + (organization "What me?")) + ("^comp" + (signature "Death to everybody")) + ("comp.emacs.i-love-it" + (organization "Emacs is it"))) +@end lisp + +As you might surmise from this example, this alist consists of several +@dfn{styles}. Each style will be applicable if the first element +``matches'', in some form or other. The entire alist will be iterated +over, from the beginning towards the end, and each match will be +applied, which means that attributes in later styles that match override +the same attributes in earlier matching styles. So +@samp{comp.programming.literate} will have the @samp{Death to everybody} +signature and the @samp{What me?} @code{Organization} header. + +The first element in each style is called the @code{match}. If it's a +string, then Gnus will try to regexp match it against the group name. +If it's a function symbol, that function will be called with no +arguments. If it's a variable symbol, then the variable will be +referenced. If it's a list, then that list will be @code{eval}ed. In +any case, if this returns a non-@code{nil} value, then the style is said +to @dfn{match}. + +Each style may contain a arbitrary amount of @dfn{attributes}. Each +attribute consists of a @var{(name . value)} pair. The attribute name +can be one of @code{signature}, @code{signature-file}, +@code{organization}, @code{address} or @code{name}. The attribute name +can also be a string. In that case, this will be used as a header name, +and the value will be inserted in the headers of the article. + +The attribute value can be a string (used verbatim), a function (the +return value will be used), a variable (its value will be used) or a +list (it will be @code{eval}ed and the return value will be used). + +So here's a new example: + +@lisp +(setq gnus-posting-styles + '((".*" + (signature-file "~/.signature") + (name "User Name") + ("X-Home-Page" (getenv "WWW_HOME")) + (organization "People's Front Against MWM")) + ("^rec.humor" + (signature my-funny-signature-randomizer)) + ((equal (system-name) "gnarly") + (signature my-quote-randomizer)) + (posting-from-work-p + (signature-file "~/.work-signature") + (address "user@@bar.foo") + (organization "Important Work, Inc")) + ("^nn.+:" + (signature-file "~/.mail-signature")))) +@end lisp @node Drafts @section Drafts @@ -8942,10 +8930,11 @@ The file contains one or more line, each of which define one server. @item Each line may contain an arbitrary number of token/value pairs. The -valid tokens include @samp{machine}, @samp{login}, @samp{password}, and -@samp{force}. (The latter is not a valid @file{.netrc}/@code{ftp} -token, which is the only way the @file{.authinfo} file format deviates -from the @file{.netrc} file format.) +valid tokens include @samp{machine}, @samp{login}, @samp{password}, +@samp{default} and @samp{force}. (The latter is not a valid +@file{.netrc}/@code{ftp} token, which is the only way the +@file{.authinfo} file format deviates from the @file{.netrc} file +format.) @end enumerate @@ -8967,6 +8956,16 @@ user will be prompted for the password. The latter also has the @samp{force} tag) is to not send authinfo to the @var{nntp} server until the @var{nntp} server asks for it. +You can also add @samp{default} lines that will apply to all servers +that don't have matching @samp{machine} lines. + +@example +default force yes +@end example + +This will force sending @samp{AUTHINFO} commands to all servers not +previously mentioned. + Remember to not leave the @file{~/.authinfo} file world-readable. @item nntp-server-action-alist @@ -15376,7 +15375,10 @@ In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99 releases)) was released under the name ``Gnus 5.2'' (40 releases). On July 28th 1996 work on Red Gnus was begun, and it was released on -January 25th 1997 (after 84 releases) as ``Gnus 5.4''. +January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases). + +On September 13th 1997, Quassia Gnus was started and lasted 37 +releases. If was released as ``Gnus 5.6.24' on March 8th 1998. If you happen upon a version of Gnus that has a prefixed name -- ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'' -- @@ -15697,6 +15699,7 @@ Joao Cachopo, Zlatko Calusic, Massimo Campostrini, Castor, +David Charlap, Dan Christensen, Kevin Christian, Michael R. Cook, @@ -15852,7 +15855,7 @@ actually are people who are using Gnus. Who'd'a thunk it! * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus. * September Gnus:: The Thing Formally Known As Gnus 5.3/5.3. * Red Gnus:: Third time best---Gnus 5.4/5.5. -* Quassia Gnus:: Two times two is four, or Gnus 5.6.22. +* Quassia Gnus:: Two times two is four, or Gnus 5.6.24. @end menu These lists are, of course, just @emph{short} overviews of the @@ -16387,7 +16390,7 @@ Emphasized text can be properly fontisized: @node Quassia Gnus @subsubsection Quassia Gnus -New features in Gnus 5.6.22: +New features in Gnus 5.6.24: @itemize @bullet @@ -17700,6 +17703,9 @@ topics for displaying. with unread articles, even if that group is hidden in a topic. @item +gnus-posting-styles doesn't work in drafts. + +@item Solve the halting problem. @c TODO @@ -18228,6 +18234,19 @@ Takes an unprefixed group name and a select method, and returns the full @findex gnus-get-info Returns the group info list for @var{group}. +@item gnus-group-unread +@findex gnus-group-unread +The number of unread articles in @var{group}, or @code{t} if that is +unknown. + +@item gnus-active +@findex gnus-active +The active entry for @var{group}. + +@item gnus-set-active +@findex gnus-set-active +Set the active entry for @var{group}. + @item gnus-add-current-to-buffer-list @findex gnus-add-current-to-buffer-list Adds the current buffer to the list of buffers to be killed on Gnus diff --git a/texi/message.texi b/texi/message.texi index adb37c1..9aa2df7 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.22 Manual +@settitle Message 5.6.24 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 5.6.22 Manual +@title Message 5.6.24 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Message 5.6.22. Message is distributed with +This manual corresponds to Message 5.6.24. Message is distributed with the Gnus distribution bearing the same version number as this manual has. -- 1.7.10.4