Merge from mainline.

This commit is contained in:
Paul Eggert 2011-02-15 16:09:42 -08:00
commit 393790ad8a
12 changed files with 197 additions and 162 deletions

View file

@ -3,6 +3,10 @@
Merge from gnulib.
* texinfo.tex: Update to version 2011-02-14.11.
2011-02-14 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for users): Login collection is "Login" and not "login".
2011-02-13 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (History): Remove IMAP support.
@ -21,7 +25,7 @@
* sc.texi (Getting Connected): Remove old index entries.
2011-02-12 Ulrich Mueller <ulm@gentoo.org>
2011-02-12 Ulrich Mueller <ulm@gentoo.org>
* url.texi: Remove duplicate @dircategory (Bug#7942).

View file

@ -161,8 +161,8 @@ and simplest configuration is:
(setq auth-sources '((:source "~/.authinfo.gpg")))
;;; even shorter and the @emph{default}:
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo"))
;;; use the Secrets API @var{login} collection (@pxref{Secret Service API})
(setq auth-sources '("secrets:login"))
;;; use the Secrets API @var{Login} collection (@pxref{Secret Service API})
(setq auth-sources '("secrets:Login"))
@end lisp
By adding multiple entries to @code{auth-sources} with a particular

View file

@ -1,3 +1,7 @@
2011-02-15 Glenn Morris <rgm@gnu.org>
* dired-x.el: Use easymenu for menu items. Fix item capitalization.
2011-02-14 Chong Yidong <cyd@stupidchicken.com>
* vc/vc-git.el (vc-git-root-log-format): New option for

View file

@ -231,69 +231,44 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
;;; MENU BINDINGS
(let ((menu-bar (lookup-key dired-mode-map [menu-bar])))
(let ((menu (lookup-key menu-bar [operate])))
(define-key-after
menu
[find-files]
'(menu-item
"Find files"
dired-do-find-marked-files
:help "Find current or marked files")
'delete)
(define-key-after
menu
[relsymlink]
'(menu-item
"Relative symlink to..."
dired-do-relsymlink
:visible (fboundp 'make-symbolic-link)
:help "Make relative symbolic links for current or marked files")
'symlink))
(let ((menu (lookup-key menu-bar [mark])))
(define-key-after
menu
[flag-extension]
'(menu-item
"Flag extension..."
dired-flag-extension
:help "Flag files with a certain extension for deletion")
'garbage-files)
(define-key-after
menu
[mark-extension]
'(menu-item
"Mark extension..."
dired-mark-extension
:help "Mark files with a certain extension")
'symlinks)
(define-key-after
menu
[mark-omitted]
'(menu-item
"Mark omitted"
dired-mark-omitted
:help "Mark files matching `dired-omit-files' and `dired-omit-extensions'")
'mark-extension))
(let ((menu (lookup-key menu-bar [regexp])))
(define-key-after
menu
[relsymlink-regexp]
'(menu-item
"Relative symlink..."
dired-do-relsymlink-regexp
:visible (fboundp 'make-symbolic-link)
:help "Make relative symbolic links for files matching regexp")
'symlink))
(let ((menu (lookup-key menu-bar [immediate])))
(define-key-after
menu
[omit-mode]
'(menu-item
"Omit mode" dired-omit-mode
:button (:toggle . dired-omit-mode)
:help "Enable or disable omitting \"uninteresting\" files")
'dashes)))
(require 'easymenu)
(let ((menu (lookup-key dired-mode-map [menu-bar])))
(easy-menu-add-item menu '("Operate")
["Find Files" dired-do-find-marked-files
:help "Find current or marked files"]
"Shell Command...")
(easy-menu-add-item menu '("Operate")
["Relative Symlink to..." dired-do-relsymlink
:visible (fboundp 'make-symbolic-link)
:help "Make relative symbolic links for current or \
marked files"]
"Hardlink to...")
(easy-menu-add-item menu '("Mark")
["Flag Extension..." dired-flag-extension
:help "Flag files with a certain extension for deletion"]
"Mark Executables")
(easy-menu-add-item menu '("Mark")
["Mark Extension..." dired-mark-extension
:help "Mark files with a certain extension"]
"Unmark All")
(easy-menu-add-item menu '("Mark")
["Mark Omitted" dired-mark-omitted
:help "Mark files matching `dired-omit-files' \
and `dired-omit-extensions'"]
"Unmark All")
(easy-menu-add-item menu '("Regexp")
["Relative Symlink..." dired-do-relsymlink-regexp
:visible (fboundp 'make-symbolic-link)
:help "Make relative symbolic links for files \
matching regexp"]
"Hardlink...")
(easy-menu-add-item menu '("Immediate")
["Omit Mode" dired-omit-mode
:style toggle :selected dired-omit-mode
:help "Enable or disable omitting \"uninteresting\" \
files"]
"Refresh"))
;;; GLOBAL BINDING.
(when dired-bind-jump

View file

@ -1,11 +1,49 @@
2011-02-15 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-debug): Enable by default and don't
mention the obsolete `auth-source-hide-passwords'.
(auth-source-do-warn): New function to debug unconditionally.
(auth-source-do-debug): Use it.
(auth-source-backend-parse): Use it for invalid `auth-sources' entries
and for Secrets API entries when the secrets.el library is not
available.
2011-02-14 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-propagate-marks): Default to nil.
(gnus-summary-exit): Kill the correct article buffer on exit from a
`C-d' group.
* gnus-start.el (gnus-use-backend-marks): Removed, since it duplicates
gnus-propagate-marks.
* gnus-sum.el (gnus-summary-exit-no-update): Restore the group conf
before killing the buffers so that a non-full window conf gets handled
correctly.
(gnus-summary-exit): Ditto.
(gnus-summary-read-group-1): Ditto.
* nntp.el (nntp-retrieve-group-data-early): Reinstate the two-part
async code again so that we can debug it properly.
* message.el (message-reply): Take an optional switch-buffer parameter
so that Gnus window confs are respected better.
2011-02-14 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-backend-parse-parameters): Don't rely on
`plist-get' to accept non-list parameters (XEmacs issue). Fix
docstring.
(auth-source-secrets-search): Use `delete-dups', `append mapcar', and
`butlast' instead of `remove-duplicates', `mapcan', and `subseq'.
(auth-sources, auth-source-backend-parse, auth-source-secrets-search):
Login collection is "Login" and not "login".
2011-02-14 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (article-update-date-lapsed): Don't bug out when updating
multiple headers.
* nnimap.el (nnimap-inhibit-logging): New variable.
(nnimap-log-command): Don't log login commands.

View file

@ -135,14 +135,15 @@
:version "23.2" ;; No Gnus
:type `boolean)
(defcustom auth-source-debug nil
(defcustom auth-source-debug t
"Whether auth-source should log debug messages.
Also see `auth-source-hide-passwords'.
If the value is nil, debug messages are not logged.
If the value is t, debug messages are logged with `message'.
In that case, your authentication data will be in the
clear (except for passwords, which are always stripped out).
If the value is t, debug messages are logged with `message'. In
that case, your authentication data will be in the clear (except
for passwords).
If the value is a function, debug messages are logged by calling
that function using the same arguments as `message'."
:group 'auth-source
@ -173,7 +174,7 @@ can get pretty complex."
(choice
(string :tag "Just a file")
(const :tag "Default Secrets API Collection" 'default)
(const :tag "Login Secrets API Collection" "secrets:login")
(const :tag "Login Secrets API Collection" "secrets:Login")
(const :tag "Temp Secrets API Collection" "secrets:session")
(list :tag "Source definition"
(const :format "" :value :source)
@ -185,7 +186,7 @@ can get pretty complex."
(choice :tag "Collection to use"
(string :tag "Collection name")
(const :tag "Default" 'default)
(const :tag "Login" "login")
(const :tag "Login" "Login")
(const
:tag "Temporary" "session"))))
(repeat :tag "Extra Parameters" :inline t
@ -235,36 +236,40 @@ If the value is not a list, symmetric encryption will be used."
;; (auth-source-user-or-password-imap "password" "imap.myhost.com")
;; (auth-source-protocol-defaults 'imap)
;; (let ((auth-source-debug 'debug)) (auth-source-debug "hello"))
;; (let ((auth-source-debug t)) (auth-source-debug "hello"))
;; (let ((auth-source-debug nil)) (auth-source-debug "hello"))
;; (let ((auth-source-debug 'debug)) (auth-source-do-debug "hello"))
;; (let ((auth-source-debug t)) (auth-source-do-debug "hello"))
;; (let ((auth-source-debug nil)) (auth-source-do-debug "hello"))
(defun auth-source-do-debug (&rest msg)
;; set logger to either the function in auth-source-debug or 'message
;; note that it will be 'message if auth-source-debug is nil, so
;; we also check the value
(when auth-source-debug
(let ((logger (if (functionp auth-source-debug)
auth-source-debug
'message)))
(apply logger msg))))
(apply 'auth-source-do-warn msg)))
(defun auth-source-do-warn (&rest msg)
(apply
;; set logger to either the function in auth-source-debug or 'message
;; note that it will be 'message if auth-source-debug is nil
(if (functionp auth-source-debug)
auth-source-debug
'message)
msg))
;; (auth-source-pick nil :host "any" :protocol 'imap :user "joe")
;; (auth-source-pick t :host "any" :protocol 'imap :user "joe")
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
;; (:source (:secrets "login") :host t :protocol t)
;; (:source (:secrets "Login") :host t :protocol t)
;; (:source "~/.authinfo.gpg" :host t :protocol t)))
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
;; (:source (:secrets "login") :host t :protocol t)
;; (:source (:secrets "Login") :host t :protocol t)
;; ))
;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
;; (auth-source-backend-parse "myfile.gpg")
;; (auth-source-backend-parse 'default)
;; (auth-source-backend-parse "secrets:login")
;; (auth-source-backend-parse "secrets:Login")
(defun auth-source-backend-parse (entry)
"Creates an auth-source-backend from an ENTRY in `auth-sources'."
@ -307,21 +312,28 @@ If the value is not a list, symmetric encryption will be used."
"session")))
;; if the source is a symbol, we look for the alias named so,
;; and if that alias is missing, we use "login"
;; and if that alias is missing, we use "Login"
(when (symbolp source)
(setq source (or (secrets-get-alias (symbol-name source))
"login")))
"Login")))
(auth-source-backend
(format "Secrets API (%s)" source)
:source source
:type 'secrets
:search-function 'auth-source-secrets-search
:create-function 'auth-source-secrets-create)))
(if (featurep 'secrets)
(auth-source-backend
(format "Secrets API (%s)" source)
:source source
:type 'secrets
:search-function 'auth-source-secrets-search
:create-function 'auth-source-secrets-create)
(auth-source-do-warn
"auth-source-backend-parse: no Secrets API, ignoring spec: %S" entry)
(auth-source-backend
(format "Ignored Secrets API (%s)" source)
:source ""
:type 'ignore))))
;; none of them
(t
(auth-source-do-debug
(auth-source-do-warn
"auth-source-backend-parse: invalid backend spec: %S" entry)
(auth-source-backend
"Empty"
@ -938,8 +950,8 @@ See `auth-source-search' for details on SPEC."
;;; (let ((auth-sources '(default))) (auth-source-search :max 1 :delete t))
;;; (let ((auth-sources '(default))) (auth-source-search :max 1))
;;; (let ((auth-sources '(default))) (auth-source-search))
;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1))
;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1))
;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
(defun* auth-source-secrets-search (&rest
spec
@ -957,23 +969,23 @@ matching, do a wider search and narrow it down yourself.
You'll get back all the properties of the token as a plist.
Here's an example that looks for the first item in the 'login'
Here's an example that looks for the first item in the 'Login'
Secrets collection:
\(let ((auth-sources '(\"secrets:login\")))
\(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1)
Here's another that looks for the first item in the 'login'
Here's another that looks for the first item in the 'Login'
Secrets collection whose label contains 'gnus':
\(let ((auth-sources '(\"secrets:login\")))
\(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1 :label \"gnus\")
And this one looks for the first item in the 'login' Secrets
And this one looks for the first item in the 'Login' Secrets
collection that's a Google Chrome entry for the git.gnus.org site
login:
authentication tokens:
\(let ((auth-sources '(\"secrets:login\")))
\(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))
"
@ -993,21 +1005,23 @@ login:
collect (nth i spec)))
;; build a search spec without the ignored keys
;; if a search key is nil or t (match anything), we skip it
(search-spec (mapcan (lambda (k) (if (or (null (plist-get spec k))
(eq t (plist-get spec k)))
nil
(list k (plist-get spec k))))
search-keys))
(search-spec (apply 'append (mapcar
(lambda (k)
(if (or (null (plist-get spec k))
(eq t (plist-get spec k)))
nil
(list k (plist-get spec k))))
search-keys)))
;; needed keys (always including host, login, protocol, and secret)
(returned-keys (remove-duplicates (append
'(:host :login :protocol :secret)
search-keys)))
(returned-keys (delete-dups (append
'(:host :login :protocol :secret)
search-keys)))
(items (loop for item in (apply 'secrets-search-items coll search-spec)
unless (and (stringp label)
(not (string-match label item)))
collect item))
;; TODO: respect max in `secrets-search-items', not after the fact
(items (subseq items 0 (min (length items) max)))
(items (butlast items (- (length items) max)))
;; convert the item name to a full plist
(items (mapcar (lambda (item)
(append
@ -1017,18 +1031,20 @@ login:
(lexical-let ((v (secrets-get-secret coll item)))
(lambda () v)))
;; rewrite the entry from ((k1 v1) (k2 v2)) to plist
(mapcan (lambda (entry)
(list (car entry) (cdr entry)))
(secrets-get-attributes coll item))))
(apply 'append
(mapcar (lambda (entry)
(list (car entry) (cdr entry)))
(secrets-get-attributes coll item)))))
items))
;; ensure each item has each key in `returned-keys'
(items (mapcar (lambda (plist)
(append
(mapcan (lambda (req)
(if (plist-get plist req)
nil
(list req nil)))
returned-keys)
(apply 'append
(mapcar (lambda (req)
(if (plist-get plist req)
nil
(list req nil)))
returned-keys))
plist))
items)))
items))

View file

@ -3641,10 +3641,11 @@ function and want to see what the date was before converting."
(let ((type (get-text-property (match-beginning 0)
'gnus-date-type)))
(when (memq type '(lapsed combined-lapsed user-format))
(unless (= window-start
(save-excursion
(forward-line 1)
(point)))
(when (and window-start
(not (= window-start
(save-excursion
(forward-line 1)
(point)))))
(setq window-start nil))
(save-excursion
(article-date-ut type t (match-beginning 0)))

View file

@ -1081,14 +1081,14 @@ If VERY-WIDE, make a very wide reply."
(gnus-summary-work-articles 1))))
;; Allow user to require confirmation before replying by mail to the
;; author of a news article (or mail message).
(when (or
(not (or (gnus-news-group-p gnus-newsgroup-name)
(when (or (not (or (gnus-news-group-p gnus-newsgroup-name)
gnus-confirm-treat-mail-like-news))
(not (cond ((stringp gnus-confirm-mail-reply-to-news)
(string-match gnus-confirm-mail-reply-to-news
gnus-newsgroup-name))
((functionp gnus-confirm-mail-reply-to-news)
(funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
(funcall gnus-confirm-mail-reply-to-news
gnus-newsgroup-name))
(t gnus-confirm-mail-reply-to-news)))
(if (or wide very-wide)
t ;; Ignore gnus-confirm-mail-reply-to-news for wide and very
@ -1123,7 +1123,7 @@ If VERY-WIDE, make a very wide reply."
(insert headers))
(goto-char (point-max)))
(mml-quote-region (point) (point-max))
(message-reply nil wide)
(message-reply nil wide 'switch-to-buffer)
(when yank
(gnus-inews-yank-articles yank))
(gnus-summary-handle-replysign)))))

View file

@ -380,13 +380,6 @@ disc."
:group 'gnus-newsrc
:type 'boolean)
(defcustom gnus-use-backend-marks nil
"If non-nil, Gnus will store and retrieve marks from the backends.
This means that marks will be stored both in .newsrc.eld and in
the backend, and will slow operation down somewhat."
:group 'gnus-newsrc
:type 'boolean)
(defcustom gnus-check-bogus-groups-hook nil
"A hook run after removing bogus groups."
:group 'gnus-start-server
@ -1509,7 +1502,7 @@ If SCAN, request a scan of that group as well."
(gnus-activate-group (gnus-info-group info) nil t))
;; Allow backends to update marks,
(when gnus-use-backend-marks
(when gnus-propagate-marks
(let ((method (inline (gnus-find-method-for-group
(gnus-info-group info)))))
(when (gnus-check-backend-function 'request-marks (car method))

View file

@ -1234,9 +1234,11 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
:type 'boolean
:group 'gnus-summary-marks)
(defcustom gnus-propagate-marks t
"If non-nil, do not propagate marks to the backends."
:version "23.1" ;; No Gnus
(defcustom gnus-propagate-marks nil
"If non-nil, Gnus will store and retrieve marks from the backends.
This means that marks will be stored both in .newsrc.eld and in
the backend, and will slow operation down somewhat."
:version "24.1"
:type 'boolean
:group 'gnus-summary-marks)
@ -4067,6 +4069,7 @@ If NO-DISPLAY, don't generate a summary buffer."
;; gnus-summary-prepare-hook since kill processing may not
;; work with hidden articles.
(gnus-summary-maybe-hide-threads)
(gnus-configure-windows 'summary)
(when kill-buffer
(gnus-kill-or-deaden-summary kill-buffer))
(gnus-summary-auto-select-subject)
@ -4076,7 +4079,6 @@ If NO-DISPLAY, don't generate a summary buffer."
gnus-newsgroup-unreads
gnus-auto-select-first)
(progn
(gnus-configure-windows 'summary)
(let ((art (gnus-summary-article-number)))
(unless (and (not gnus-plugged)
(or (memq art gnus-newsgroup-undownloaded)
@ -7168,6 +7170,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(let* ((group gnus-newsgroup-name)
(quit-config (gnus-group-quit-config gnus-newsgroup-name))
(gnus-group-is-exiting-p t)
(article-buffer gnus-article-buffer)
(mode major-mode)
(group-point nil)
(buf (current-buffer)))
@ -7220,16 +7223,6 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(when (eq mode 'gnus-summary-mode)
(gnus-kill-buffer buf)))
;; If we have several article buffers, we kill them at exit.
(unless gnus-single-article-buffer
(when (gnus-buffer-live-p gnus-article-buffer)
(with-current-buffer gnus-article-buffer
;; Don't kill sticky article buffers
(unless (eq major-mode 'gnus-sticky-article-mode)
(gnus-kill-buffer gnus-article-buffer)
(setq gnus-article-current nil))))
(gnus-kill-buffer gnus-original-article-buffer))
(setq gnus-current-select-method gnus-select-method)
(set-buffer gnus-group-buffer)
(if quit-config
@ -7241,6 +7234,17 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(if win (set-window-point win (point))))
(unless leave-hidden
(gnus-configure-windows 'group 'force)))
;; If we have several article buffers, we kill them at exit.
(unless gnus-single-article-buffer
(when (gnus-buffer-live-p article-buffer)
(with-current-buffer article-buffer
;; Don't kill sticky article buffers
(unless (eq major-mode 'gnus-sticky-article-mode)
(gnus-kill-buffer article-buffer)
(setq gnus-article-current nil))))
(gnus-kill-buffer gnus-original-article-buffer))
;; Clear the current group name.
(unless quit-config
(setq gnus-newsgroup-name nil)))))
@ -7269,6 +7273,8 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(gnus-kill-buffer gnus-article-buffer)
(gnus-kill-buffer gnus-original-article-buffer)
(setq gnus-article-current nil))
;; Return to the group buffer.
(gnus-configure-windows 'group 'force)
(if (not gnus-kill-summary-on-exit)
(gnus-deaden-summary)
(gnus-close-group group)
@ -7280,8 +7286,6 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(gnus-async-prefetch-remove-group group)
(when (get-buffer gnus-article-buffer)
(bury-buffer gnus-article-buffer))
;; Return to the group buffer.
(gnus-configure-windows 'group 'force)
;; Clear the current group name.
(setq gnus-newsgroup-name nil)
(unless (gnus-ephemeral-group-p group)

View file

@ -6779,7 +6779,7 @@ Useful functions to put in this list include:
subject)
;;;###autoload
(defun message-reply (&optional to-address wide)
(defun message-reply (&optional to-address wide switch-function)
"Start editing a reply to the article in the current buffer."
(interactive)
(require 'gnus-sum) ; for gnus-list-identifiers
@ -6822,7 +6822,8 @@ Useful functions to put in this list include:
(message-pop-to-buffer
(message-buffer-name
(if wide "wide reply" "reply") from
(if wide to-address nil))))
(if wide to-address nil))
switch-function))
(setq message-reply-headers
(vector 0 subject from date message-id references 0 0 ""))

View file

@ -774,7 +774,7 @@ command whose response triggered the error."
(nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
'headers)))))
(deffoo nntp-retrieve-group-data-early-disabled (server infos)
(deffoo nntp-retrieve-group-data-early (server infos)
"Retrieve group info on INFOS."
(nntp-with-open-group nil server
(when (nntp-find-connection-buffer nntp-server-buffer)
@ -793,7 +793,7 @@ command whose response triggered the error."
nil command (gnus-group-real-name (gnus-info-group info)))))
(length infos)))))
(deffoo nntp-finish-retrieve-group-infos-disabled (server infos count)
(deffoo nntp-finish-retrieve-group-infos (server infos count)
(nntp-with-open-group nil server
(let ((buf (nntp-find-connection-buffer nntp-server-buffer))
(method (gnus-find-method-for-group
@ -814,10 +814,7 @@ command whose response triggered the error."
(< received count)))
(nntp-accept-response))
;; We now have all the entries. Remove CRs.
(goto-char (point-min))
(while (search-forward "\r" nil t)
(replace-match "" t t))
(nnheader-strip-cr)
(if (not nntp-server-list-active-group)
(progn
(nntp-copy-to-buffer nntp-server-buffer
@ -830,7 +827,9 @@ command whose response triggered the error."
(delete-region (match-beginning 0)
(progn (forward-line 1) (point))))
(nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
(gnus-active-to-gnus-format method gnus-active-hashtb nil t)))))))
(with-current-buffer nntp-server-buffer
(gnus-active-to-gnus-format method gnus-active-hashtb
nil t))))))))
(deffoo nntp-retrieve-groups (groups &optional server)
"Retrieve group info on GROUPS."