diff options
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/gnus-art.el | 15 | ||||
-rw-r--r-- | lisp/gnus/gnus-msg.el | 9 | ||||
-rw-r--r-- | lisp/gnus/gnus-salt.el | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 9 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 28 | ||||
-rw-r--r-- | lisp/gnus/gnus-topic.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 4 | ||||
-rw-r--r-- | lisp/gnus/message.el | 132 | ||||
-rw-r--r-- | lisp/gnus/mml.el | 98 | ||||
-rw-r--r-- | lisp/gnus/nndoc.el | 20 | ||||
-rw-r--r-- | lisp/gnus/nnimap.el | 6 |
11 files changed, 204 insertions, 123 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index e1af859516c..43e1231914c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -251,7 +251,12 @@ This can also be a list of the above values." (integer :value 200) (number :value 4.0) function - (regexp :value ".*")) + (regexp :value ".*") + (repeat (choice (const nil) + (integer :value 200) + (number :value 4.0) + function + (regexp :value ".*")))) :group 'gnus-article-signature) (defcustom gnus-hidden-properties @@ -6841,17 +6846,21 @@ then we display only bindings that start with that prefix." (let ((keymap (copy-keymap gnus-article-mode-map)) (map (copy-keymap gnus-article-send-map)) (sumkeys (where-is-internal 'gnus-article-read-summary-keys)) + (summap (make-sparse-keymap)) parent agent draft) (define-key keymap "S" map) (define-key map [t] nil) + (define-key summap [t] 'undefined) (with-current-buffer gnus-article-current-summary + (dolist (key sumkeys) + (define-key summap key (key-binding key (current-local-map)))) (set-keymap-parent keymap (if (setq parent (keymap-parent gnus-article-mode-map)) (prog1 (setq parent (copy-keymap parent)) - (set-keymap-parent parent (current-local-map))) - (current-local-map))) + (set-keymap-parent parent summap)) + summap)) (set-keymap-parent map (key-binding "S")) (let (key def gnus-pick-mode) (while sumkeys diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 19111171198..a193ab41348 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -546,7 +546,8 @@ instead." (gnus-setup-message 'message (message-mail to subject other-headers continue nil yank-action send-actions return-action))) - (setq gnus-newsgroup-name group-name)) + (with-current-buffer buf + (setq gnus-newsgroup-name group-name))) (when switch-action (setq mail-buf (current-buffer)) (switch-to-buffer buf) @@ -1534,11 +1535,7 @@ If YANK is non-nil, include the original article." (message-pop-to-buffer "*Gnus Bug*")) (let ((message-this-is-mail t)) (message-setup `((To . ,gnus-maintainer) - (Subject . "") - (X-Debbugs-Package - . ,(format "%s" gnus-bug-package)) - (X-Debbugs-Version - . ,(format "%s" (gnus-continuum-version)))))) + (Subject . "")))) (when gnus-bug-create-help-buffer (push `(gnus-bug-kill-buffer) message-send-actions)) (goto-char (point-min)) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 5361c2b86fc..7037328b7a4 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -131,9 +131,7 @@ It accepts the same format specs that `gnus-summary-line-format' does." (defvar gnus-pick-line-number 1) (defun gnus-pick-line-number () "Return the current line number." - (if (bobp) - (setq gnus-pick-line-number 1) - (incf gnus-pick-line-number))) + (incf gnus-pick-line-number)) (defun gnus-pick-start-reading (&optional catch-up) "Start reading the picked articles. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 47e33af96e8..be46339cd38 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2801,8 +2801,13 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-run-hooks 'gnus-save-newsrc-hook) (if gnus-slave (gnus-slave-save-newsrc) - ;; Save .newsrc. - (when gnus-save-newsrc-file + ;; Save .newsrc only if the select method is an NNTP method. + ;; The .newsrc file is for interoperability with other + ;; newsreaders, so saving non-NNTP groups there doesn't make + ;; much sense. + (when (and gnus-save-newsrc-file + (eq (car (gnus-server-to-method gnus-select-method)) + 'nntp)) (gnus-message 8 "Saving %s..." gnus-current-startup-file) (gnus-gnus-to-newsrc-format) (gnus-message 8 "Saving %s...done" gnus-current-startup-file)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 72e902a11f8..2631514e425 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1895,6 +1895,7 @@ increase the score of each group you read." "\C-c\C-s\C-m\C-n" gnus-summary-sort-by-most-recent-number "\C-c\C-s\C-l" gnus-summary-sort-by-lines "\C-c\C-s\C-c" gnus-summary-sort-by-chars + "\C-c\C-s\C-m\C-m" gnus-summary-sort-by-marks "\C-c\C-s\C-a" gnus-summary-sort-by-author "\C-c\C-s\C-t" gnus-summary-sort-by-recipient "\C-c\C-s\C-s" gnus-summary-sort-by-subject @@ -2748,6 +2749,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["Sort by score" gnus-summary-sort-by-score t] ["Sort by lines" gnus-summary-sort-by-lines t] ["Sort by characters" gnus-summary-sort-by-chars t] + ["Sort by marks" gnus-summary-sort-by-marks t] ["Randomize" gnus-summary-sort-by-random t] ["Original sort" gnus-summary-sort-by-original t]) ("Help" @@ -3976,6 +3978,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." ;; The group was successfully selected. (t (gnus-set-global-variables) + (when (boundp 'gnus-pick-line-number) + (setq gnus-pick-line-number 0)) (when (boundp 'spam-install-hooks) (spam-initialize)) ;; Save the active value in effect when the group was entered. @@ -4037,6 +4041,9 @@ If SELECT-ARTICLES, only select those articles from GROUP." (when kill-buffer (gnus-kill-or-deaden-summary kill-buffer)) (gnus-summary-auto-select-subject) + ;; Don't mark any articles as selected if we haven't done that. + (when no-article + (setq overlay-arrow-position nil)) ;; Show first unread article if requested. (if (and (not no-article) (not no-display) @@ -4941,6 +4948,16 @@ using some other form will lead to serious barfage." (gnus-article-sort-by-chars (gnus-thread-header h1) (gnus-thread-header h2))) +(defsubst gnus-article-sort-by-marks (h1 h2) + "Sort articles by octet length." + (< (gnus-article-mark (mail-header-number h1)) + (gnus-article-mark (mail-header-number h2)))) + +(defun gnus-thread-sort-by-marks (h1 h2) + "Sort threads by root article octet length." + (gnus-article-sort-by-marks + (gnus-thread-header h1) (gnus-thread-header h2))) + (defsubst gnus-article-sort-by-author (h1 h2) "Sort articles by root author." (gnus-string< @@ -11925,6 +11942,12 @@ Argument REVERSE means reverse order." (interactive "P") (gnus-summary-sort 'chars reverse)) +(defun gnus-summary-sort-by-mark (&optional reverse) + "Sort the summary buffer by article marks. +Argument REVERSE means reverse order." + (interactive "P") + (gnus-summary-sort 'marks reverse)) + (defun gnus-summary-sort-by-original (&optional reverse) "Sort the summary buffer using the default sorting method. Argument REVERSE means reverse order." @@ -11970,7 +11993,10 @@ save those articles instead. The variable `gnus-default-article-saver' specifies the saver function. If the optional second argument NOT-SAVED is non-nil, articles saved -will not be marked as saved." +will not be marked as saved. + +The `gnus-prompt-before-saving' variable says how prompting is +performed." (interactive "P") (require 'gnus-art) (let* ((articles (gnus-summary-work-articles n)) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 8ab8f462885..6d6e20dc129 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1564,7 +1564,7 @@ If UNINDENT, remove an indentation." (parent (gnus-topic-parent-topic topic)) (grandparent (gnus-topic-parent-topic parent))) (unless grandparent - (error "Nothing to indent %s into" topic)) + (error "Can't unindent %s further" topic)) (when topic (gnus-topic-goto-topic topic) (gnus-topic-kill-group) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index ef6bd89c36e..bbf85fe584a 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2654,10 +2654,6 @@ such as a mark that says whether an article is stored in the cache "submit@debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") -(defconst gnus-bug-package - "gnus" - "The package to use in the bug submission.") - (defvar gnus-info-nodes '((gnus-group-mode "(gnus)Group Buffer") (gnus-summary-mode "(gnus)Summary Buffer") diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 4d4ba089434..ce0dad9cb05 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2286,13 +2286,15 @@ body, set `message-archive-note' to nil." "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP. With prefix-argument just set Follow-Up, don't cross-post." (interactive - (list ; Completion based on Gnus - (completing-read "Followup To: " - (if (boundp 'gnus-newsrc-alist) - gnus-newsrc-alist) - nil nil '("poster" . 0) - (if (boundp 'gnus-group-history) - 'gnus-group-history)))) + (list ; Completion based on Gnus + (replace-regexp-in-string + "\\`.*:" "" + (completing-read "Followup To: " + (if (boundp 'gnus-newsrc-alist) + gnus-newsrc-alist) + nil nil '("poster" . 0) + (if (boundp 'gnus-group-history) + 'gnus-group-history))))) (message-remove-header "Follow[Uu]p-[Tt]o" t) (message-goto-newsgroups) (beginning-of-line) @@ -2361,13 +2363,15 @@ been made to before the user asked for a Crosspost." "Crossposts message and set Followup-To to TARGET-GROUP. With prefix-argument just set Follow-Up, don't cross-post." (interactive - (list ; Completion based on Gnus - (completing-read "Followup To: " - (if (boundp 'gnus-newsrc-alist) - gnus-newsrc-alist) - nil nil '("poster" . 0) - (if (boundp 'gnus-group-history) - 'gnus-group-history)))) + (list ; Completion based on Gnus + (replace-regexp-in-string + "\\`.*:" "" + (completing-read "Followup To: " + (if (boundp 'gnus-newsrc-alist) + gnus-newsrc-alist) + nil nil '("poster" . 0) + (if (boundp 'gnus-group-history) + 'gnus-group-history))))) (when (fboundp 'gnus-group-real-name) (setq target-group (gnus-group-real-name target-group))) (cond ((not (or (null target-group) ; new subject not empty @@ -3108,18 +3112,29 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (looking-at "[ \t]*\n")) (expand-abbrev)) (push-mark) + (message-goto-body-1)) + +(defun message-goto-body-1 () + "Go to the body and return point." (goto-char (point-min)) (or (search-forward (concat "\n" mail-header-separator "\n") nil t) - (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))) + ;; If the message is mangled, find the end of the headers the + ;; hard way. + (progn + ;; Skip past all headers and continuation lines. + (while (looking-at "[^:]+:\\|[\t ]+[^\t ]") + (forward-line 1)) + ;; We're now at the first empty line, so perhaps move past it. + (when (and (eolp) + (not (eobp))) + (forward-line 1)) + (point)))) (defun message-in-body-p () "Return t if point is in the message body." (>= (point) (save-excursion - (goto-char (point-min)) - (or (search-forward (concat "\n" mail-header-separator "\n") nil t) - (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)) - (point)))) + (message-goto-body-1)))) (defun message-goto-eoh () "Move point to the end of the headers." @@ -3330,6 +3345,8 @@ of lines before the signature intact." "Insert four newlines, and then reformat if inside quoted text. Prefix arg means justify as well." (interactive (list (if current-prefix-arg 'full))) + (unless (message-in-body-p) + (error "This command only works in the body of the message")) (let (quoted point beg end leading-space bolp fill-paragraph-function) (setq point (point)) (beginning-of-line) @@ -4102,8 +4119,8 @@ It should typically alter the sending method in some way or other." (let ((inhibit-read-only t)) (put-text-property (point-min) (point-max) 'read-only nil)) (message-fix-before-sending) - (mml-secure-bcc-is-safe) (run-hooks 'message-send-hook) + (mml-secure-bcc-is-safe) (when message-confirm-send (or (y-or-n-p "Send message? ") (keyboard-quit))) @@ -4539,6 +4556,9 @@ This function could be useful in `message-setup-hook'." (forward-line 1) (unless (y-or-n-p "Send anyway? ") (error "Failed to send the message"))))) + ;; Fold too-long header lines. They should be no longer than + ;; 998 octets long. + (message--fold-long-headers) ;; Let the user do all of the above. (run-hooks 'message-header-hook)) (setq options message-options) @@ -4635,6 +4655,14 @@ If you always want Gnus to send messages in one piece, set (setq message-options options) (push 'mail message-sent-message-via))) +(defun message--fold-long-headers () + (goto-char (point-min)) + (while (not (eobp)) + (when (and (looking-at "[^:]+:") + (> (- (line-end-position) (point)) 998)) + (mail-header-fold-field)) + (forward-line 1))) + (defvar sendmail-program) (defvar smtpmail-smtp-server) (defvar smtpmail-smtp-service) @@ -5380,16 +5408,13 @@ Otherwise, generate and save a value for `canlock-password' first." "Process Fcc headers in the current buffer." (let ((case-fold-search t) (buf (current-buffer)) - list file - (mml-externalize-attachments message-fcc-externalize-attachments)) - (save-excursion - (save-restriction - (message-narrow-to-headers) - (setq file (message-fetch-field "fcc" t))) - (when file - (set-buffer (get-buffer-create " *message temp*")) - (erase-buffer) + (mml-externalize-attachments message-fcc-externalize-attachments) + (file (message-field-value "fcc" t)) + list) + (when file + (with-temp-buffer (insert-buffer-substring buf) + (message-clone-locals buf) (message-encode-message-body) (save-restriction (message-narrow-to-headers) @@ -5429,8 +5454,7 @@ Otherwise, generate and save a value for `canlock-password' first." (if (and (file-readable-p file) (mail-file-babyl-p file)) (rmail-output file 1 nil t) (let ((mail-use-rfc822 t)) - (rmail-output file 1 t t)))))) - (kill-buffer (current-buffer)))))) + (rmail-output file 1 t t)))))))))) (defun message-output (filename) "Append this article to Unix/babyl mail file FILENAME." @@ -5761,7 +5785,7 @@ give as trustworthy answer as possible." (not (string-match message-bogus-system-names message-user-fqdn))) ;; `message-user-fqdn' seems to be valid message-user-fqdn) - ((and (string-match message-bogus-system-names sysname)) + ((not (string-match message-bogus-system-names sysname)) ;; `system-name' returned the right result. sysname) ;; Try `mail-host-address'. @@ -6644,29 +6668,27 @@ OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether to continue editing a message already being composed. SWITCH-FUNCTION is a function used to switch to and display the mail buffer." (interactive) - (let ((message-this-is-mail t)) - (unless (message-mail-user-agent) - (message-pop-to-buffer - ;; Search for the existing message buffer if `continue' is non-nil. - (let ((message-generate-new-buffers - (when (or (not continue) - (eq message-generate-new-buffers 'standard) - (functionp message-generate-new-buffers)) - message-generate-new-buffers))) - (message-buffer-name "mail" to)) - switch-function)) - (message-setup - (nconc - `((To . ,(or to "")) (Subject . ,(or subject ""))) - ;; C-h f compose-mail says that headers should be specified as - ;; (string . value); however all the rest of message expects - ;; headers to be symbols, not strings (eg message-header-format-alist). - ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html - ;; We need to convert any string input, eg from rmail-start-mail. - (dolist (h other-headers other-headers) - (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) - yank-action send-actions continue switch-function - return-action))) + (let ((message-this-is-mail t) + message-buffers) + ;; Search for the existing message buffer if `continue' is non-nil. + (if (and continue + (setq message-buffers (message-buffers))) + (pop-to-buffer (car message-buffers)) + ;; Start a new buffer. + (unless (message-mail-user-agent) + (message-pop-to-buffer (message-buffer-name "mail" to) switch-function)) + (message-setup + (nconc + `((To . ,(or to "")) (Subject . ,(or subject ""))) + ;; C-h f compose-mail says that headers should be specified as + ;; (string . value); however all the rest of message expects + ;; headers to be symbols, not strings (eg message-header-format-alist). + ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html + ;; We need to convert any string input, eg from rmail-start-mail. + (dolist (h other-headers other-headers) + (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) + yank-action send-actions continue switch-function + return-action)))) ;;;###autoload (defun message-news (&optional newsgroups subject) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 6d13d892b5a..3a31349d378 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -486,7 +486,8 @@ be \"related\" or \"alternate\"." (equal (cdr (assq 'type (car cont))) "text/html")) (setq cont (mml-expand-html-into-multipart-related (car cont)))) (prog1 - (mm-with-multibyte-buffer + (with-temp-buffer + (set-buffer-multibyte nil) (setq message-options options) (cond ((and (consp (car cont)) @@ -605,28 +606,38 @@ be \"related\" or \"alternate\"." (intern (downcase charset)))))) (if (and (not raw) (member (car (split-string type "/")) '("text" "message"))) + ;; We have a text-like MIME part, so we need to do + ;; charset encoding. (progn (with-temp-buffer - (cond - ((cdr (assq 'buffer cont)) - (insert-buffer-substring (cdr (assq 'buffer cont)))) - ((and filename - (not (equal (cdr (assq 'nofile cont)) "yes"))) - (let ((coding-system-for-read coding)) - (mm-insert-file-contents filename))) - ((eq 'mml (car cont)) - (insert (cdr (assq 'contents cont)))) - (t - (save-restriction - (narrow-to-region (point) (point)) - (insert (cdr (assq 'contents cont))) - ;; Remove quotes from quoted tags. - (goto-char (point-min)) - (while (re-search-forward - "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)" - nil t) - (delete-region (+ (match-beginning 0) 2) - (+ (match-beginning 0) 3)))))) + (set-buffer-multibyte nil) + ;; First insert the data into the buffer. + (if (and filename + (not (equal (cdr (assq 'nofile cont)) "yes"))) + (mm-insert-file-contents filename) + (insert + (with-temp-buffer + (cond + ((cdr (assq 'buffer cont)) + (insert-buffer-substring (cdr (assq 'buffer cont)))) + ((eq 'mml (car cont)) + (insert (cdr (assq 'contents cont)))) + (t + (insert (cdr (assq 'contents cont))) + ;; Remove quotes from quoted tags. + (goto-char (point-min)) + (while (re-search-forward + "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)" + nil t) + (delete-region (+ (match-beginning 0) 2) + (+ (match-beginning 0) 3))))) + (setq charset + (mm-coding-system-to-mime-charset + (detect-coding-region + (point-min) (point-max) t))) + (encode-coding-region (point-min) (point-max) + charset) + (buffer-string)))) (cond ((eq (car cont) 'mml) (let ((mml-boundary (mml-compute-boundary cont)) @@ -667,21 +678,22 @@ be \"related\" or \"alternate\"." ;; insert a "; format=flowed" string unless the ;; user has already specified it. (setq flowed (null (assq 'format cont))))) - ;; Prefer `utf-8' for text/calendar parts. - (if (or charset - (not (string= type "text/calendar"))) - (setq charset (mm-encode-body charset)) - (let ((mm-coding-system-priorities - (cons 'utf-8 mm-coding-system-priorities))) - (setq charset (mm-encode-body)))) - (mm-disable-multibyte) + (unless charset + (setq charset + ;; Prefer `utf-8' for text/calendar parts. + (if (string= type "text/calendar") + 'utf-8 + (mm-coding-system-to-mime-charset + (detect-coding-region + (point-min) (point-max) t))))) (setq encoding (mm-body-encoding charset (cdr (assq 'encoding cont)))))) (setq coded (buffer-string))) (mml-insert-mime-headers cont type charset encoding flowed) (insert "\n") (insert coded)) - (mm-with-unibyte-buffer + (with-temp-buffer + (set-buffer-multibyte nil) (cond ((cdr (assq 'buffer cont)) (insert (string-as-unibyte @@ -690,11 +702,7 @@ be \"related\" or \"alternate\"." ((and filename (not (equal (cdr (assq 'nofile cont)) "yes"))) (let ((coding-system-for-read mm-binary-coding-system)) - (mm-insert-file-contents filename nil nil nil nil t)) - (unless charset - (setq charset (mm-coding-system-to-mime-charset - (mm-find-buffer-file-coding-system - filename))))) + (mm-insert-file-contents filename nil nil nil nil t))) (t (let ((contents (cdr (assq 'contents cont)))) (if (multibyte-string-p contents) @@ -1244,6 +1252,7 @@ If not set, `default-directory' will be used." (defun mml-minibuffer-read-file (prompt) (let* ((completion-ignored-extensions nil) + (buffer-file-name nil) (file (read-file-name prompt (or mml-default-directory default-directory) nil t))) @@ -1378,12 +1387,23 @@ content-type, a string of the form \"type/subtype\". DESCRIPTION is a one-line description of the attachment. The DISPOSITION specifies how the attachment is intended to be displayed. It can be either \"inline\" (displayed automatically within the message -body) or \"attachment\" (separate from the body)." +body) or \"attachment\" (separate from the body). + +If given a prefix interactively, no prompting will be done for +the TYPE, DESCRIPTION or DISPOSITION values. Instead defaults +will be computed and used." (interactive (let* ((file (mml-minibuffer-read-file "Attach file: ")) - (type (mml-minibuffer-read-type file)) - (description (mml-minibuffer-read-description)) - (disposition (mml-minibuffer-read-disposition type nil file))) + (type (if current-prefix-arg + (or (mm-default-file-encoding file) + "application/octet-stream") + (mml-minibuffer-read-type file))) + (description (if current-prefix-arg + nil + (mml-minibuffer-read-description))) + (disposition (if current-prefix-arg + (mml-content-disposition type file) + (mml-minibuffer-read-disposition type nil file)))) (list file type description disposition))) ;; If in the message header, attach at the end and leave point unchanged. (let ((head (unless (message-in-body-p) (point)))) diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index ede118d6eb6..7f7db8721db 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -356,14 +356,18 @@ from the document.") (setq nndoc-dissection-alist nil) (with-current-buffer nndoc-current-buffer (erase-buffer) - (if (and (stringp nndoc-address) - (string-match nndoc-binary-file-names nndoc-address)) - (let ((coding-system-for-read 'binary)) - (mm-insert-file-contents nndoc-address)) - (if (stringp nndoc-address) - (nnheader-insert-file-contents nndoc-address) - (insert-buffer-substring nndoc-address)) - (run-hooks 'nndoc-open-document-hook))))) + (condition-case error + (if (and (stringp nndoc-address) + (string-match nndoc-binary-file-names nndoc-address)) + (let ((coding-system-for-read 'binary)) + (mm-insert-file-contents nndoc-address)) + (if (stringp nndoc-address) + (nnheader-insert-file-contents nndoc-address) + (insert-buffer-substring nndoc-address)) + (run-hooks 'nndoc-open-document-hook)) + (file-error + (nnheader-report 'nndoc "Couldn't open %s: %s" + group error)))))) ;; Initialize the nndoc structures according to this new document. (when (and nndoc-current-buffer (not nndoc-dissection-alist)) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 700e86a0c57..2943c8dc7d2 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -67,7 +67,11 @@ back on `network'.") (if (listp imap-shell-program) (car imap-shell-program) imap-shell-program) - "ssh %s imapd")) + "ssh %s imapd") + "What command to execute to connect to an IMAP server. +This will only be used if the connection type is `shell'. See +the `open-network-stream' documentation for an explanation of +the format.") (defvoo nnimap-inbox nil "The mail box where incoming mail arrives and should be split out of. |