Commit 8f7abae3 authored by Miles Bader's avatar Miles Bader
Browse files

Merge from gnus--devo--0

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1097
parent 390b81fa
2008-03-10 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-coding.texi (Gnus Maintainance Guide): Update conventions for
custom versions.
2008-03-07 Alan Mackenzie <acm@muc.de>
* cc-mode.texi (Limitations and Known Bugs): State that the number of
......
......@@ -256,7 +256,7 @@ changes. Only after a new major release, e.g. 5.10.1, there's usually a
feature period of several months. After the release of Gnus 5.10.6 the
development of new features started again on the trunk while the 5.10
series is continued on the stable branch (v5-10) from which more stable
releases will be done when needed (5.10.7, @dots{}).
releases will be done when needed (5.10.8, @dots{}).
@ref{Gnus Development, ,Gnus Development, gnus, The Gnus Newsreader}
Stable releases of Gnus finally become part of Emacs. E.g. Gnus 5.8
......@@ -366,7 +366,7 @@ v5-10 branch) use @code{:version "22.1" ;; Oort Gnus} (including the
comment) or e.g. @code{:version "22.2" ;; Gnus 5.10.10} if the feature
was added for Emacs 22.2 and Gnus 5.10.10.
@c
If the variable is new in No Gnus use @code{:version "23.0" ;; No Gnus}.
If the variable is new in No Gnus use @code{:version "23.1" ;; No Gnus}.
The same applies for customizable variables when its default value was
changed.
......
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
......
;;; 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
......@@ -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)
......
......@@ -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)
......
......@@ -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:
......
......@@ -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)