From e4cd2c48b6a75de831dbe75d76ea3107c7062ba6 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 13 Mar 2000 13:50:38 +0000 Subject: [PATCH] * gnus-sum.el (gnus-summary-move-article): Only delete article when moving junk. (gnus-deaden-summary): Bury the buffer. * nnmail.el (nnmail-group-pathname): Ditto. * nnheader.el (nnheader-group-pathname): Use expand-file-name. --- lisp/ChangeLog | 20 ++++++++++++++++++++ lisp/gnus-sum.el | 11 ++++++----- lisp/gnus-topic.el | 18 +++++++++++++++--- lisp/message.el | 5 ++++- lisp/nnheader.el | 11 +++++------ lisp/nnmail.el | 12 ++++++------ 6 files changed, 56 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79fc2bc6e..3a6a3486a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2000-03-13 13:51:38 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-move-article): Only delete article + when moving junk. + (gnus-deaden-summary): Bury the buffer. + + * nnmail.el (nnmail-group-pathname): Ditto. + + * nnheader.el (nnheader-group-pathname): Use expand-file-name. + +2000-03-10 14:57:58 Lars Magne Ingebrigtsen + + * message.el (message-send-mail): Protect against unloaded Gnus. + + * gnus-topic.el (gnus-topic-update-topic-line): Don't update the + parent. + (gnus-topic-update-topic-line): Yes, do. + (gnus-topic-goto-missing-group): Tally the correct number of + unread articles before inserting the topic line. + 2000-03-01 09:55:26 Lars Magne Ingebrigtsen * nnultimate.el (nnultimate-retrieve-headers): Ignore errors. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 710010ee9..ff55b9648 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -5538,7 +5538,8 @@ The state which existed when entering the ephemeral is reset." (rename-buffer (concat (substring name 0 (match-beginning 0)) "Dead " (substring name (match-beginning 0))) - t)))) + t) + (bury-buffer)))) (defun gnus-kill-or-deaden-summary (buffer) "Kill or deaden the summary BUFFER." @@ -7395,10 +7396,10 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (gnus-message 1 "Couldn't %s article %s: %s" (cadr (assq action names)) article (nnheader-get-report (car to-method)))) - ((and (eq art-group 'junk) - (eq action 'move)) - (gnus-summary-mark-article article gnus-canceled-mark) - (gnus-message 4 "Deleted article %s" article)) + ((eq art-group 'junk) + (when (eq action 'move) + (gnus-summary-mark-article article gnus-canceled-mark) + (gnus-message 4 "Deleted article %s" article))) (t (let* ((pto-group (gnus-group-prefixed-name (car art-group) to-method)) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 34f5a7b4c..5c94034d0 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -608,8 +608,20 @@ articles in the topic and its subtopics." (when (and unfound topic (not (gnus-topic-goto-missing-topic topic))) - (gnus-topic-insert-topic-line - topic t t (car (gnus-topic-find-topology topic)) nil 0))))) + (let* ((top (gnus-topic-find-topology topic)) + (children (cddr top)) + (type (cadr top)) + (unread 0) + (entries (gnus-topic-find-groups + (car type) (car gnus-group-list-mode) + (cdr gnus-group-list-mode)))) + (while children + (incf unread (gnus-topic-unread (caar (pop children))))) + (while (setq entry (pop entries)) + (when (numberp (car entry)) + (incf unread (car entry)))) + (gnus-topic-insert-topic-line + topic t t (car (gnus-topic-find-topology topic)) nil unread)))))) (defun gnus-topic-goto-missing-topic (topic) (if (gnus-topic-goto-topic topic) @@ -620,7 +632,7 @@ articles in the topic and its subtopics." (tp (reverse (cddr top)))) (if (not top) (gnus-topic-insert-topic-line - topic t t (car (gnus-topic-find-topology topic)) nil 0) + topic t t (car (gnus-topic-find-topology topic)) nil unread) (while (not (equal (caaar tp) topic)) (setq tp (cdr tp))) (pop tp) diff --git a/lisp/message.el b/lisp/message.el index 3fb0afe61..7056b1b1a 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2134,7 +2134,10 @@ It should typically alter the sending method in some way or other." (news (message-news-p)) (mailbuf (current-buffer)) (message-this-is-mail t) - (message-posting-charset (gnus-setup-posting-charset nil))) + (message-posting-charset + (if (fboundp 'gnus-setup-posting-charset) + (gnus-setup-posting-charset nil) + message-posting-charset))) (save-restriction (message-narrow-to-headers) ;; Insert some headers. diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 9f8d267ea..48e639b63 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -730,13 +730,12 @@ without formatting." (let ((dir (file-name-as-directory (expand-file-name dir)))) ;; If this directory exists, we use it directly. (if (file-directory-p (concat dir group)) - (concat dir group "/") + (expand-file-name group dir) ;; If not, we translate dots into slashes. - (concat dir - (mm-encode-coding-string - (nnheader-replace-chars-in-string group ?. ?/) - nnheader-pathname-coding-system) - "/"))) + (expand-file-name (mm-encode-coding-string + (nnheader-replace-chars-in-string group ?. ?/) + nnheader-pathname-coding-system) + dir))) (cond ((null file) "") ((numberp file) (int-to-string file)) (t file)))) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 718156978..67f517d7a 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -470,13 +470,13 @@ parameter. It should return nil, `warn' or `delete'." ;; If this directory exists, we use it directly. (if (or nnmail-use-long-file-names (file-directory-p (concat dir group))) - (concat dir group "/") + (expand-file-name group dir) ;; If not, we translate dots into slashes. - (concat dir - (mm-encode-coding-string - (nnheader-replace-chars-in-string group ?. ?/) - nnmail-pathname-coding-system) - "/"))) + (expand-file-name + (mm-encode-coding-string + (nnheader-replace-chars-in-string group ?. ?/) + nnmail-pathname-coding-system) + dir))) (or file ""))) (defun nnmail-get-active () -- 2.25.1