diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/ChangeLog | 80 | ||||
-rw-r--r-- | lisp/gnus/auth-source.el | 86 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 87 | ||||
-rw-r--r-- | lisp/gnus/gnus-bookmark.el | 8 | ||||
-rw-r--r-- | lisp/gnus/gnus-group.el | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus-registry.el | 200 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 13 | ||||
-rw-r--r-- | lisp/gnus/message.el | 96 | ||||
-rw-r--r-- | lisp/gnus/mm-decode.el | 24 | ||||
-rw-r--r-- | lisp/gnus/mm-view.el | 2 | ||||
-rw-r--r-- | lisp/gnus/mml.el | 29 | ||||
-rw-r--r-- | lisp/gnus/mml2015.el | 11 | ||||
-rw-r--r-- | lisp/net/imap.el | 1 | ||||
-rw-r--r-- | lisp/net/netrc.el | 2 |
14 files changed, 504 insertions, 139 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7cc373e435b..e86ac06e974 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,13 +1,40 @@ +2008-03-07 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-narrow-to-page): Position point properly. + (gnus-article-goto-prev-page): Work for articles having ^L's. + + * gnus-sum.el (gnus-summary-end-of-article): Remove needless narrowing. + + * mm-view.el (mm-w3m-standalone-supports-m17n-p): Fix typo. + 2008-03-07 Karl Fogel <kfogel@red-bean.com> * gnus-bookmark.el: Adjust for renames in bookmark.el. (gnus-bookmark-make-record): Was `gnus-bookmark-make-cell'. (gnus-bookmark-jump): Adjust some variable names. -2008-03-05 Reiner Steib <Reiner.Steib@gmx.de> +2008-03-06 Teodor Zlatanov <tzz@lifelogs.com> - * gnus-sum.el (gnus-print-buffer): Honor ps-print-color-p. - Suggested by <chris.anderton@zetnet.co.uk>. + * auth-source.el: New package. + (auth-source-choices): Add customization entry point variable. + + * gnus-registry.el (gnus-registry-user-format-function-M): Fix concat + bug. + +2008-03-05 Teodor Zlatanov <tzz@lifelogs.com> + + * gnus-registry.el (gnus-registry-install): Allow 'ask as an option. + (gnus-registry-initialize, gnus-registry-install-p): Use it. + (gnus-registry-install-shortcuts): Renamed from + gnus-registry-install-shortcuts-and-menus. Installs the shortcuts in + the `gnus-registry-mark-map' keymap dynamically from + `gnus-registry-marks'. The generated functions update the summary line + when a registry mark is added or deleted, and will call + `gnus-registry-install-p' (see the comments in the code). + (gnus-registry-user-format-function-M): Use concat intelligently. + + * gnus-sum.el (gnus-summary-make-menu-bar): Add menu entries for all + the registry mark functions. 2008-03-05 Glenn Morris <rgm@gnu.org> @@ -16,12 +43,34 @@ gnus-art. (top-level): No need to load own source when compiling. +2008-03-04 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus-sum.el (gnus-print-buffer): Honor ps-print-color-p. + Suggested by <chris.anderton@zetnet.co.uk>. + 2008-03-04 Glenn Morris <rgm@gnu.org> * gnus-sum.el (top-level): No need to require gnus when compiling, since unconditionally required near start of file. (gnus-summary-display-while-building): Move definition before use. +2008-03-04 Teodor Zlatanov <tzz@lifelogs.com> + + * gnus-registry.el (gnus-registry-user-format-function-M): Add + formatting function. + +2008-03-03 Teodor Zlatanov <tzz@lifelogs.com> + + * gnus-registry.el (gnus-registry-marks): Changed format to be nicer + with plists. + (gnus-registry-do-marks, gnus-registry-install-shortcuts-and-menus): + Use new format. + +2008-03-03 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-article-describe-bindings): Work for the version of + `where-is-internal' that returns a range of key sequences. + 2008-03-03 Stefan Monnier <monnier@iro.umontreal.ca> * mm-bodies.el (mm-decode-content-transfer-encoding): Simplify. @@ -36,6 +85,31 @@ * gnus-group.el (gnus-update-group-mark-positions): Use mm-string-to-multibyte. +2008-03-02 Reiner Steib <Reiner.Steib@gmx.de> + + * mml2015.el (mml2015-extract-cleartext-signature): Explain that it + doesn't handle NotDashEscaped. + + * mml.el (mml-menu): Improve help entries. Move Sign/Encrypt Part. + (mml-dnd-attach-options): Fix typo in custom choice. + + * gnus-group.el (gnus-group-read-ephemeral-gmane-group): Change + nndoc-article-type to mbox. + (gnus-group-read-ephemeral-gmane-group-url): Support permalink. + + * mm-decode.el (mm-text-html-renderer): Prefer w3m over w3. Fall back + to nil, instead of html2text. + + * imap.el (imap-debug): Add `imap-ping-server'. + + * gnus-bookmark.el: Add FIXMEs. + + * message.el (message-form-letter-separator) + (message-send-form-letter-delay): New variables. + (message-send-form-letter): Use them. New command to send form + letters. Requested by Uwe Siart. + (message-send-mail-function): Doc fix. Add "Other" custom option. + 2008-02-29 Andreas Seltenreich <andreas@gate450.dyndns.org> * nnweb.el (nnweb-google-parse-1): Fix date parsing on articles with diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el new file mode 100644 index 00000000000..116d8b4a6a1 --- /dev/null +++ b/lisp/gnus/auth-source.el @@ -0,0 +1,86 @@ +;;; auth-source.el --- authentication sources for Gnus and Emacs + +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +;; Author: Ted Zlatanov <tzz@lifelogs.com> +;; Keywords: news + +;; 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 3, 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 the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This is the auth-source.el package. It lets users tell Gnus how to +;; authenticate in a single place. Simplicity is the goal. Instead +;; of providing 5000 options, we'll stick to simple, easy to +;; understand options. +;;; Code: + +(eval-when-compile (require 'cl)) + +(defgroup auth-source nil + "Authentication sources." + :version "22.1" + :group 'gnus) + +(defcustom auth-source-choices nil + "List of authentication sources. + +Each entry is the authentication type with optional properties." + :group 'auth-source + :type '(repeat :tag "Authentication Sources" + (cons :tag "Source definition" + (group :tag "Select a source" :inline t + (const :format "" :value :source) + (choice :tag "Authentication information" + (const :tag "None" nil) + (file :tag "File"))) + (checklist :tag "Options" :greedy t + (group :inline t + (choice :tag "Choose the hosts" + (group :tag "Select host by name" :inline t + (const :format "" :value :host) + (string :tag "Host name")) + (group :tag "Select host by regular expression" :inline t + (const :format "" :value :host-regex) + (regexp :tag "Host regular expression")) + (group :tag "Use any host" :inline t + (const :format "" :value :host-any) + (const :tag "Any" t)) + (group :tag "Use if no other host matches" :inline t + (const :tag "Fallback" nil)))) + (group :tag "Choose the protocol" :inline t + (const :format "" :value :protocol) + (choice :tag "Protocol" + (const :tag "Any" t) + (const :tag "Fallback (used if no others match)" nil) + (const :tag "IMAP" imap) + (const :tag "POP3" pop3) + (const :tag "SSH" ssh) + (const :tag "SFTP" sftp) + (const :tag "SMTP" smtp))))))) + +;; temp for debugging +;; (customize-variable 'auth-source-choices) +;; (setq auth-source-choices nil) +;; (format "%S" auth-source-choices) + +(provide 'auth-source) + +;; arch-tag: ff1afe78-06e9-42c2-b693-e9f922cbe4ab +;;; auth-source.el ends here diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 0b3293f4bb9..9033ef1ff35 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5988,39 +5988,51 @@ If given a numerical ARG, move forward ARG pages." (interactive "P") (setq arg (if arg (prefix-numeric-value arg) 0)) (with-current-buffer gnus-article-buffer - (goto-char (point-min)) (widen) ;; Remove any old next/prev buttons. (when (gnus-visual-p 'page-marker) (let ((inhibit-read-only t)) (gnus-remove-text-with-property 'gnus-prev) (gnus-remove-text-with-property 'gnus-next))) - (if - (cond ((< arg 0) - (re-search-backward page-delimiter nil 'move (1+ (abs arg)))) - ((> arg 0) - (re-search-forward page-delimiter nil 'move arg))) - (goto-char (match-end 0)) - (save-excursion - (goto-char (point-min)) - (setq gnus-page-broken - (and (re-search-forward page-delimiter nil t) t)))) - (when gnus-page-broken - (narrow-to-region - (point) - (if (re-search-forward page-delimiter nil 'move) - (match-beginning 0) - (point))) - (when (and (gnus-visual-p 'page-marker) - (> (point-min) (save-restriction (widen) (point-min)))) - (save-excursion - (goto-char (point-min)) - (gnus-insert-prev-page-button))) - (when (and (gnus-visual-p 'page-marker) - (< (point-max) (save-restriction (widen) (point-max)))) - (save-excursion - (goto-char (point-max)) - (gnus-insert-next-page-button)))))) + (let (st nd pt) + (when (save-excursion + (cond ((< arg 0) + (if (re-search-backward page-delimiter nil 'move (abs arg)) + (prog1 + (setq nd (match-beginning 0) + pt nd) + (when (re-search-backward page-delimiter nil t) + (setq st (match-end 0)))) + (when (re-search-forward page-delimiter nil t) + (setq nd (match-beginning 0) + pt (point-min))))) + ((> arg 0) + (if (re-search-forward page-delimiter nil 'move arg) + (prog1 + (setq st (match-end 0) + pt st) + (when (re-search-forward page-delimiter nil t) + (setq nd (match-beginning 0)))) + (when (re-search-backward page-delimiter nil t) + (setq st (match-end 0) + pt (point-max))))) + (t + (when (re-search-backward page-delimiter nil t) + (goto-char (setq st (match-end 0)))) + (when (re-search-forward page-delimiter nil t) + (setq nd (match-beginning 0))) + (or st nd)))) + (setq gnus-page-broken t) + (when pt (goto-char pt)) + (narrow-to-region (or st (point-min)) (or nd (point-max))) + (when (gnus-visual-p 'page-marker) + (save-excursion + (when nd + (goto-char nd) + (gnus-insert-next-page-button)) + (when st + (goto-char st) + (gnus-insert-prev-page-button)))))))) ;; Article mode commands @@ -6035,7 +6047,7 @@ If given a numerical ARG, move forward ARG pages." (defun gnus-article-goto-prev-page () "Show the previous page of the article." (interactive) - (if (bobp) + (if (save-restriction (widen) (bobp)) ;; Real beginning-of-buffer? (gnus-article-read-summary-keys nil (gnus-character-to-event ?p)) (gnus-article-prev-page nil))) @@ -6395,10 +6407,21 @@ then we display only bindings that start with that prefix." (define-key map [t] nil) (with-current-buffer gnus-article-current-summary (set-keymap-parent map (key-binding "S")) - (let (def gnus-pick-mode) - (dolist (key sumkeys) - (when (setq def (key-binding key)) - (define-key keymap key def)))) + (let (key def gnus-pick-mode) + (while sumkeys + (setq key (pop sumkeys)) + (cond ((and (vectorp key) (= (length key) 1) + (consp (setq def (aref key 0))) + (numberp (car def)) (numberp (cdr def))) + (when (< (max (car def) (cdr def)) 128) + (setq sumkeys + (append (mapcar + #'vector + (nreverse (gnus-uncompress-range def))) + sumkeys)))) + ((setq def (key-binding key)) + (unless (eq def 'undefined) + (define-key keymap key def)))))) (when (boundp 'gnus-agent-summary-mode) (setq agent gnus-agent-summary-mode)) (when (boundp 'gnus-draft-mode) diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 41b124e697a..076ac52406d 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -62,6 +62,14 @@ ;; (define-key global-map "\C-crj" 'gnus-bookmark-jump) ;; (define-key global-map "\C-crl" 'gnus-bookmark-bmenu-list) +;; FIXME: Add keybindings, see +;; http://thread.gmane.org/gmane.emacs.gnus.general/63101/focus=63379 +;; http://thread.gmane.org/v9fxx9fkm4.fsf@marauder.physik.uni-ulm.de + +;; FIXME: Check if `gnus-bookmark.el' should use +;; `bookmark-make-cell-function'. +;; Cf. http://article.gmane.org/gmane.emacs.gnus.general/66076 + (defgroup gnus-bookmark nil "Setting, annotation and jumping to Gnus bookmarks." :group 'gnus) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 466a846c675..8e2f82b5402 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2363,7 +2363,7 @@ specified by `gnus-group-gmane-group-download-format'." (gnus-group-read-ephemeral-group (format "%s.start-%s.range-%s" group start range) `(nndoc ,tmpfile - (nndoc-article-type guess)))) + (nndoc-article-type mbox)))) (delete-file tmpfile))) (defun gnus-group-read-ephemeral-gmane-group-url (url) @@ -2397,7 +2397,7 @@ Valid input formats include: ;; URLs providing `group' and `start': ((or (string-match ;; http://article.gmane.org/gmane.comp.gnu.make.bugs/3584 - "^http://\\(?:thread\\|article\\)\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" + "^http://\\(?:thread\\|article\\|permalink\\)\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" url) (string-match ;; Don't advertize these in the doc string yet: diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 2803cd9db6d..5141a5e2d32 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -80,20 +80,20 @@ (defcustom gnus-registry-marks '((Important - (char . ?i) - (image . "summary_important")) + :char ?i + :image "summary_important") (Work - (char . ?w) - (image . "summary_work")) + :char ?w + :image "summary_work") (Personal - (char . ?p) - (image . "summary_personal")) + :char ?p + :image "summary_personal") (To-Do - (char . ?t) - (image . "summary_todo")) + :char ?t + :image "summary_todo") (Later - (char . ?l) - (image . "summary_later"))) + :char ?l + :image "summary_later")) "List of registry marks and their options. @@ -106,14 +106,16 @@ line display and for keyboard shortcuts. Each entry must have an image string to be useful for visual display." :group 'gnus-registry - :type '(alist :key-type symbol - :value-type (set :tag "Mark details" - (cons :tag "Shortcut" - (const :tag "Character code" char) - character) - (cons :tag "Visual" - (const :tag "Image" image) - string)))) + :type '(repeat :tag "Registry Marks" + (cons :tag "Mark" + (symbol :tag "Name") + (checklist :tag "Options" :greedy t + (group :inline t + (const :format "" :value :char) + (character :tag "Character code")) + (group :inline t + (const :format "" :value :image) + (string :tag "Image")))))) (defcustom gnus-registry-default-mark 'To-Do "The default mark. Should be a valid key for `gnus-registry-marks'." @@ -130,10 +132,12 @@ references.'" :group 'gnus-registry :type '(repeat regexp)) -(defcustom gnus-registry-install nil +(defcustom gnus-registry-install 'ask "Whether the registry should be installed." :group 'gnus-registry - :type 'boolean) + :type '(choice (const :tag "Never Install" nil) + (const :tag "Always Install" t) + (const :tag "Ask Me" ask))) (defcustom gnus-registry-clean-empty t "Whether the empty registry entries should be deleted. @@ -700,24 +704,22 @@ Consults `gnus-registry-unfollowed-groups' and FUNCTION should take two parameters, a mark symbol and the cell value." (dolist (mark-info gnus-registry-marks) - (let ((mark (car-safe mark-info)) - (data (cdr-safe mark-info))) - (dolist (cell data) - (let ((cell-type (car-safe cell)) - (cell-data (cdr-safe cell))) - (when (equal type cell-type) - (funcall function mark cell-data))))))) + (let* ((mark (car-safe mark-info)) + (data (cdr-safe mark-info)) + (cell-data (plist-get data type))) + (when cell-data + (funcall function mark cell-data))))) ;;; this is ugly code, but I don't know how to do it better -;;; TODO: clear the gnus-registry-mark-map before running -(defun gnus-registry-install-shortcuts-and-menus () +(defun gnus-registry-install-shortcuts () "Install the keyboard shortcuts and menus for the registry. Uses `gnus-registry-marks' to find what shortcuts to install." - (gnus-registry-do-marks - 'char - (lambda (mark data) - (let ((function-format - (format "gnus-registry-%%s-article-%s-mark" mark))) + (let (keys-plist) + (gnus-registry-do-marks + :char + (lambda (mark data) + (let ((function-format + (format "gnus-registry-%%s-article-%s-mark" mark))) ;;; The following generates these functions: ;;; (defun gnus-registry-set-article-Important-mark (&rest articles) @@ -729,44 +731,69 @@ Uses `gnus-registry-marks' to find what shortcuts to install." ;;; (interactive (gnus-summary-work-articles current-prefix-arg)) ;;; (gnus-registry-set-article-mark-internal 'Important articles t t)) - (dolist (remove '(t nil)) - (let* ((variant-name (if remove "remove" "set")) - (function-name (format function-format variant-name)) - (shortcut (format "%c" data)) - (shortcut (if remove (upcase shortcut) shortcut))) - (unintern function-name) - (eval - `(defun - ;; function name - ,(intern function-name) - ;; parameter definition - (&rest articles) - ;; documentation - ,(format - "%s the %s mark over process-marked ARTICLES." - (upcase-initials variant-name) - mark) - ;; interactive definition - (interactive - (gnus-summary-work-articles current-prefix-arg)) - ;; actual code - (gnus-registry-set-article-mark-internal - ;; all this just to get the mark, I must be doing it wrong - (intern ,(symbol-name mark)) - articles ,remove t)))))))) - ;; I don't know how to do this inside the loop above, because - ;; gnus-define-keys is a macro - (gnus-define-keys (gnus-registry-mark-map "M" gnus-summary-mark-map) - "i" gnus-registry-set-article-Important-mark - "I" gnus-registry-remove-article-Important-mark - "w" gnus-registry-set-article-Work-mark - "W" gnus-registry-remove-article-Work-mark - "l" gnus-registry-set-article-Later-mark - "L" gnus-registry-remove-article-Later-mark - "p" gnus-registry-set-article-Personal-mark - "P" gnus-registry-remove-article-Personal-mark - "t" gnus-registry-set-article-To-Do-mark - "T" gnus-registry-remove-article-To-Do-mark)) + (dolist (remove '(t nil)) + (let* ((variant-name (if remove "remove" "set")) + (function-name (format function-format variant-name)) + (shortcut (format "%c" data)) + (shortcut (if remove (upcase shortcut) shortcut))) + (unintern function-name) + (eval + `(defun + ;; function name + ,(intern function-name) + ;; parameter definition + (&rest articles) + ;; documentation + ,(format + "%s the %s mark over process-marked ARTICLES." + (upcase-initials variant-name) + mark) + ;; interactive definition + (interactive + (gnus-summary-work-articles current-prefix-arg)) + ;; actual code + + ;; if this is called and the user doesn't want the + ;; registry enabled, we'll ask anyhow + (when (eq gnus-registry-install nil) + (setq gnus-registry-install 'ask)) + + ;; now the user is asked if gnus-registry-install is 'ask + (when (gnus-registry-install-p) + (gnus-registry-set-article-mark-internal + ;; all this just to get the mark, I must be doing it wrong + (intern ,(symbol-name mark)) + articles ,remove t) + (dolist (article articles) + (gnus-summary-update-article + article + (assoc article (gnus-data-list nil))))))) + (push (intern function-name) keys-plist) + (push shortcut keys-plist) + (gnus-message + 9 + "Defined mark handling function %s" + function-name)))))) + (gnus-define-keys-1 + '(gnus-registry-mark-map "M" gnus-summary-mark-map) + keys-plist))) + +;;; use like this: +;;; (defalias 'gnus-user-format-function-M +;;; 'gnus-registry-user-format-function-M) +(defun gnus-registry-user-format-function-M (headers) + (let* ((id (mail-header-message-id headers)) + (marks (when id (gnus-registry-fetch-extra-marks id)))) + (apply 'concat (mapcar (lambda(mark) + (let ((c + (plist-get + (cdr-safe + (assoc mark gnus-registry-marks)) + :char))) + (if c + (list c) + nil))) + marks)))) (defun gnus-registry-read-mark () "Read a mark name from the user with completion." @@ -1033,10 +1060,12 @@ Returns the first place where the trail finds a group name." ;;;###autoload (defun gnus-registry-initialize () +"Initialize the Gnus registry." (interactive) - (setq gnus-registry-install t) + (gnus-message 5 "Initializing the registry") + (setq gnus-registry-install t) ; in case it was 'ask or nil (gnus-registry-install-hooks) - (gnus-registry-install-shortcuts-and-menus) + (gnus-registry-install-shortcuts) (gnus-registry-read)) ;;;###autoload @@ -1068,11 +1097,24 @@ Returns the first place where the trail finds a group name." (add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook) -(when gnus-registry-install - (gnus-registry-install-hooks) - (gnus-registry-read)) - -;; TODO: a lot of things +(defun gnus-registry-install-p () + (interactive) + (when (eq gnus-registry-install 'ask) + (setq gnus-registry-install + (gnus-y-or-n-p + (concat "Enable the Gnus registry? " + "See the variable `gnus-registry-install' " + "to get rid of this query permanently. "))) + (when gnus-registry-install + ;; we just set gnus-registry-install to t, so initialize the registry! + (gnus-registry-initialize))) +;;; we could call it here: (customize-variable 'gnus-registry-install) + gnus-registry-install) + +(when (gnus-registry-install-p) + (gnus-registry-initialize)) + +;; TODO: a few things (provide 'gnus-registry) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 48232ae53f7..d6abbd6c131 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2582,6 +2582,17 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["Set expirable mark" gnus-summary-mark-as-expirable t] ["Set bookmark" gnus-summary-set-bookmark t] ["Remove bookmark" gnus-summary-remove-bookmark t]) + ("Registry Mark" + ["Important" gnus-registry-set-article-Important-mark t] + ["Not Important" gnus-registry-remove-article-Important-mark t] + ["Work" gnus-registry-set-article-Work-mark t] + ["Not Work" gnus-registry-remove-article-Work-mark t] + ["Later" gnus-registry-set-article-Later-mark t] + ["Not Later" gnus-registry-remove-article-Later-mark t] + ["Personal" gnus-registry-set-article-Personal-mark t] + ["Not Personal" gnus-registry-remove-article-Personal-mark t] + ["To Do" gnus-registry-set-article-To-Do-mark t] + ["Not To Do" gnus-registry-remove-article-To-Do-mark t]) ("Limit to" ["Marks..." gnus-summary-limit-to-marks t] ["Subject..." gnus-summary-limit-to-subject t] @@ -9210,8 +9221,6 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead." (goto-char (point-max)) (recenter -3) (when gnus-break-pages - (when (re-search-backward page-delimiter nil t) - (narrow-to-region (match-end 0) (point-max))) (gnus-narrow-to-page)))) (defun gnus-summary-print-truncate-and-quote (string &optional len) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 32f191d918b..44c282bbd36 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -652,7 +652,8 @@ Valid values include `message-send-mail-with-sendmail' `message-send-mail-with-mh', `message-send-mail-with-qmail', `message-smtpmail-send-it', `smtpmail-send-it', `feedmail-send-it' and `message-send-mail-with-mailclient'. The -default is system dependent. +default is system dependent and determined by the function +`message-send-mail-function'. See also `send-mail-function'." :type '(radio (function-item message-send-mail-with-sendmail) @@ -661,7 +662,6 @@ See also `send-mail-function'." (function-item message-smtpmail-send-it) (function-item smtpmail-send-it) (function-item feedmail-send-it) - (function :tag "Other") (function-item message-send-mail-with-mailclient :tag "Use Mailclient package") (function :tag "Other")) @@ -7807,6 +7807,98 @@ From headers in the original article." (delete-region start end) (insert match))))) +;; To send pre-formatted letters like the example below, you can use +;; `message-send-form-letter': +;; --8<---------------cut here---------------start------------->8--- +;; To: alice@invalid.invalid +;; Subject: Verification of your contact information +;; From: Contact verification <admin@foo.invalid> +;; --text follows this line-- +;; Hi Alice, +;; please verify that your contact information is still valid: +;; Alice A, A avenue 11, 1111 A town, Austria +;; ----------next form letter message follows this line---------- +;; To: bob@invalid.invalid +;; Subject: Verification of your contact information +;; From: Contact verification <admin@foo.invalid> +;; --text follows this line-- +;; Hi Bob, +;; please verify that your contact information is still valid: +;; Bob, B street 22, 22222 Be town, Belgium +;; ----------next form letter message follows this line---------- +;; To: charlie@invalid.invalid +;; Subject: Verification of your contact information +;; From: Contact verification <admin@foo.invalid> +;; --text follows this line-- +;; Hi Charlie, +;; please verify that your contact information is still valid: +;; Charlie Chaplin, C plaza 33, 33333 C town, Chile +;; --8<---------------cut here---------------end--------------->8--- + +;; FIXME: What is the most common term (circular letter, form letter, serial +;; letter, standard letter) for such kind of letter? See also +;; <http://en.wikipedia.org/wiki/Form_letter> + +;; FIXME: Maybe extent message-mode's font-lock support to recognize +;; `message-form-letter-separator', i.e. highlight each message like a single +;; message. + +(defcustom message-form-letter-separator + "\n----------next form letter message follows this line----------\n" + "Separator for `message-send-form-letter'." + ;; :group 'message-form-letter + :group 'message-various + :version "23.1" ;; No Gnus + :type 'string) + +(defcustom message-send-form-letter-delay 1 + "Delay in seconds when sending a message with `message-send-form-letter'. +Only used when `message-send-form-letter' is called with non-nil +argument `force'." + ;; :group 'message-form-letter + :group 'message-various + :version "23.1" ;; No Gnus + :type 'integer) + +(defun message-send-form-letter (&optional force) + "Sent all form letter messages from current buffer. +Unless FORCE, prompt before sending. + +The messages are separated by `message-form-letter-separator'. +Header and body are separated by `mail-header-separator'." + (interactive "P") + (let ((sent 0) (skipped 0) + start end text + buff + to done) + (goto-char (point-min)) + (while (not done) + (setq start (point) + end (if (search-forward message-form-letter-separator nil t) + (- (point) (length message-form-letter-separator) -1) + (setq done t) + (point-max))) + (setq text + (buffer-substring-no-properties start end)) + (setq buff (generate-new-buffer "*mail - form letter*")) + (with-current-buffer buff + (insert text) + (message-mode) + (setq to (message-fetch-field "To")) + (switch-to-buffer buff) + (when force + (sit-for message-send-form-letter-delay)) + (if (or force + (y-or-n-p (format "Send message to `%s'? " to))) + (progn + (setq sent (1+ sent)) + (message-send-and-exit)) + (message (format "Message to `%s' skipped." to)) + (setq skipped (1+ skipped))) + (when (buffer-live-p buff) + (kill-buffer buff)))) + (message "%s message(s) sent, %s skipped." sent skipped))) + (when (featurep 'xemacs) (require 'messagexmas) (message-xmas-redefine)) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 98d444665b2..46bf4b8d8fe 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -106,31 +106,33 @@ ,disposition ,description ,cache ,id)) (defcustom mm-text-html-renderer - (cond ((locate-library "w3") 'w3) - ((executable-find "w3m") (if (locate-library "w3m") - 'w3m - 'w3m-standalone)) + (cond ((executable-find "w3m") + (if (locate-library "w3m") + 'w3m + 'w3m-standalone)) ((executable-find "links") 'links) ((executable-find "lynx") 'lynx) - (t 'html2text)) + ((locate-library "w3") 'w3) + ((locate-library "html2text") 'html2text) + (t nil)) "Render of HTML contents. It is one of defined renderer types, or a rendering function. The defined renderer types are: -`w3' : use Emacs/W3; `w3m' : use emacs-w3m; `w3m-standalone': use w3m; `links': use links; `lynx' : use lynx; +`w3' : use Emacs/W3; `html2text' : use html2text; -nil : use external viewer." - :version "22.1" +nil : use external viewer (default web browser)." + :version "23.0" ;; No Gnus :type '(choice (const w3) - (const w3m) - (const w3m-standalone) + (const w3m :tag "emacs-w3m") + (const w3m-standalone :tag "standalone w3m" ) (const links) (const lynx) (const html2text) - (const nil) + (const nil :tag "External viewer") (function)) :group 'mime-display) diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 5abeea16812..9e9414f8fe2 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -289,7 +289,7 @@ (let ((coding-system-for-write 'iso-2022-jp) (coding-system-for-read 'iso-2022-jp) (str (mm-decode-coding-string "\ -\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t#s!!#m#1#7#n!)\e(B" 'iso-2022-jp))) +\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t!!#m#1#7#n!)\e(B" 'iso-2022-jp))) (mm-with-multibyte-buffer (insert str) (call-process-region diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index c703e1365f6..0a7aac29ed9 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1017,6 +1017,14 @@ If HANDLES is non-nil, use it instead reparsing the buffer." (define-key main "\C-c\C-m" map) main)) +;; (defun mml-toggle-gcc-externalize-attachments () +;; (interactive) +;; (prog1 +;; (setq gnus-gcc-externalize-attachments +;; (not gnus-gcc-externalize-attachments)) +;; (message "gnus-gcc-externalize-attachments is `%s'." +;; gnus-gcc-externalize-attachments))) + (easy-menu-define mml-menu mml-mode-map "" `("Attachments" @@ -1025,10 +1033,18 @@ If HANDLES is non-nil, use it instead reparsing the buffer." '(:help "Attach a file at point"))] ["Attach Buffer..." mml-attach-buffer ,@(if (featurep 'xemacs) '(t) - '(:help "Attach a buffer to the outgoing MIME message"))] + '(:help "Attach a buffer to the outgoing message"))] ["Attach External..." mml-attach-external ,@(if (featurep 'xemacs) '(t) - '(:help "Attach reference to file"))] + '(:help "Attach reference to an external file"))] + ;; ["Externalize Attachments" + ;; (lambda () (interactive) (mml-toggle-gcc-externalize-attachments)) + ;; ,@(if (featurep 'xemacs) nil + ;; '(:help "Save attachments as external parts in Gcc copies")) + ;; :visible (booleanp gnus-gcc-externalize-attachments) + ;; :style radio + ;; :selected (equal gnus-gcc-externalize-attachments t) ] + "----" ;; ("Change Security Method" ["PGP/MIME" @@ -1056,6 +1072,10 @@ If HANDLES is non-nil, use it instead reparsing the buffer." ["Encrypt/Sign off" mml-unsecure-message ,@(if (featurep 'xemacs) '(t) '(:help "Don't Encrypt/Sign Message"))] + ;; Do we have separate encrypt and encrypt/sign commands for parts? + ["Sign Part" mml-secure-sign t] + ["Encrypt Part" mml-secure-encrypt t] + "----" ;; Maybe we could remove these, because people who write MML most probably ;; don't use the menu: ["Insert Part..." mml-insert-part @@ -1063,9 +1083,6 @@ If HANDLES is non-nil, use it instead reparsing the buffer." ["Insert Multipart..." mml-insert-multipart :active (message-in-body-p)] ;; - ;; Do we have separate encrypt and encrypt/sign commands for parts? - ["Sign Part" mml-secure-sign t] - ["Encrypt Part" mml-secure-encrypt t] ;;["Narrow" mml-narrow-to-part t] ["Quote MML in region" mml-quote-region :active (message-mark-active-p) @@ -1222,7 +1239,7 @@ If it is a list, valid members are `type', `description' and don't ask for options. If it is t, ask the user whether or not to specify options." :type '(choice - (const :tag "Non" nil) + (const :tag "None" nil) (const :tag "Query" t) (list :value (type description disposition) (set :inline t diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index b4d301190d0..8add5e5215f 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -153,6 +153,17 @@ Whether the passphrase is cached at all is controlled by ;; should be done by GnuPG rather than Elisp, but older PGP backends ;; (such as Mailcrypt, PGG, and gpg.el) discard the output from GnuPG. (defun mml2015-extract-cleartext-signature () + ;; Daiki Ueno in + ;; <54a15d860801080142l70b95d7dkac4bf51a86196011@mail.gmail.com>: ``I still + ;; believe that the right way is to use the plaintext output from GnuPG as + ;; it is, and mml2015-extract-cleartext-signature is just a kludge for + ;; misdesigned libraries like PGG, which have no ability to do that. So, I + ;; think it should not have descriptive documentation.'' + ;; + ;; This function doesn't handle NotDashEscaped correctly. EasyPG handles it + ;; correctly. + ;; http://thread.gmane.org/gmane.emacs.gnus.general/66062/focus=66082 + ;; http://thread.gmane.org/gmane.emacs.gnus.general/65087/focus=65109 (goto-char (point-min)) (forward-line) ;; We need to be careful not to strip beyond the armor headers. diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 2ec29252d47..399d5ec8237 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -2923,6 +2923,7 @@ Return nil if no complete line has arrived." imap-open-1 imap-open imap-opened + imap-ping-server imap-authenticate imap-close imap-capability diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index 8c588a11451..de82ae7473d 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -61,7 +61,7 @@ (defun netrc-parse (file) (interactive "fFile to Parse: ") - "Parse FILE and return an list of all entries in the file." + "Parse FILE and return a list of all entries in the file." (when (file-exists-p file) (with-temp-buffer (let ((tokens '("machine" "default" "login" |