From: Lars Magne Ingebrigtsen Date: Sun, 26 Sep 2010 13:25:35 +0000 (+0000) Subject: auth-source.el (auth-source-create): Query the user for whether to store the credentials. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1821a7b49194ddf558746de5cf67bdc9217e9ebd;p=emacs.git auth-source.el (auth-source-create): Query the user for whether to store the credentials. auth-source.el: Require netrc. nnml.el (nnml-open-nov): Don't return dead buffers. gnus-picon.el (gnus-picon-xbm): Removed obsolete face. gnus-picon.el (gnus-picon-insert-glyph): Make the background white. gnus-art.el (gnus-treatment-function-alist): Insert picons after doing the header highlightling. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 827c27b315c..9219c7c4446 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-26 Lars Magne Ingebrigtsen + + * net/netrc.el (netrc-store-data): New function. + 2010-09-26 Teodor Zlatanov * net/gnutls.el: GnuTLS glue code to set up a connection. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3bfb4119959..47e2ed3453a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,151 @@ +2010-09-26 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-treatment-function-alist): Insert picons after + doing the header highlightling, so that the background colour of the + picon is correct. + + * gnus-picon.el (gnus-picon-xbm): Removed obsolete face. + (gnus-picon): Ditto. + (gnus-picon): Reinstate. The background colour for picons is white. + (gnus-picon-insert-glyph): Make the background white. + + * nnml.el (nnml-open-nov): Don't return dead buffers. + + * auth-source.el (auth-source-create): Query the user for whether to + store the credentials. + + * auth-source.el (auth-source-user-or-password): Use the existing auth + sources, if any, for creation. + + * gnus.el (gnus-group-fast-parameter): Return the last matching + parameter instead of the first matching parameter. + +2010-09-26 Julien Danjou + + * gnus-sum.el (gnus-auto-center-group): Transform into a defcustom. + +2010-09-26 Lars Magne Ingebrigtsen + + * mml2015.el (mml2015-use): Remove gpg support. + + * mml1991.el (mml1991-function-alist): Remove gpg function. + (mml1991-gpg-sign): Removed. + +2010-09-26 Andreas Seltenreich + + * gnus-srvr.el (gnus-browse-subscribe-newsgroup-method): New variable. + (gnus-browse-unsubscribe-current-group): Document it. + (gnus-browse-unsubscribe-group): Use it. + +2010-09-26 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email + address to the To list for easier response. + + * gnus.el (gnus-play-startup-jingle): Removed. + (gnus-splash): Don't play jingle. + (gnus): Silence gnus-load message. + + * gnus-art.el (gnus-treat-play-sounds): Removed. + + * gnus.el (gnus-play-jingle): Remove audio support. + + * gnus-cus.el (gnus-score-customize): Remove audio reference. + + * earcon.el: Removed -- no users. + + * gnus-audio.el: Removed -- no users of this package. + + * gnus-sum.el (gnus-summary-limit-children): Remove nocem support. + + * gnus-start.el (gnus-setup-news): Remove nocem support. + + * gnus-group.el (gnus-group-get-new-news): Removed nocem call. + + * gnus.el (gnus-use-nocem): Removed. + + * gnus-demon.el (gnus-demon-add-nocem, gnus-demon-scan-nocem): + Removed. + + * gnus-nocem.el (gnus-nocem-issuers): Removed file. Apparently nobody + uses NoCeM any more. + + * gnus-art.el (gnus-ctan-url): Seems not very useful -- removed. + (gnus-button-ctan-handler): Ditto. + (gnus-button-handle-ctan-bogus-regexp): Ditto. + (gnus-button-ctan-directory-regexp): Ditto. + (gnus-button-handle-ctan): Ditto. + (gnus-button-tex-level): Ditto. + (gnus-button-alist): Removed CTAN stuff. + +2010-09-25 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-wait-for-response): Reversed logic in the + nnimap-streaming test. + + * gnus-start.el (gnus-get-unread-articles): Don't try to open failed + servers twice. + + * nnimap.el (nnimap-open-connection): Add more error reporting when + nnimap fails early. + + * nnheader.el (nnheader-get-report-string): New function. + (nnheader-get-report): Use it. + + * gnus-int.el (gnus-check-server): Say what the error was when opening + failed. + + * nnimap.el (nnimap-wait-for-response): Search further when we're not + using streaming. + +2010-09-25 Julien Danjou + + * gnus-html.el (gnus-html-rescale-image): Use our defalias + gnus-window-inside-pixel-edges. + 2010-09-25 Lars Magne Ingebrigtsen + * gnus-srvr.el (gnus-server-copy-server): Add documentation. + + * mm-decode.el (mm-save-part): Allow saving to other directories the + normal Emacs way. + + * nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested + by Jay Berkenbilt. + + * gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when + there isn't a single byte. + + * gnus-int.el (gnus-open-server): Don't query whether to go offline -- + just do it. It doesn't really seem to matter what the user responds + here, I think, so it's just a confusing question. + + * nnimap.el (nnimap-retrieve-group-data-early): Fix typo in the + non-streaming case. + + * gnus-art.el (gnus-flush-original-article-buffer): Separated out. + (gnus-article-encrypt-body): Use it. + + * gnus-sum.el (gnus-summary-show-complete-article): New command and + keystroke. + + * nnimap.el (nnimap-find-wanted-parts-1): Use + gnus-fetch-partial-articles. + + * gnus-art.el (gnus-fetch-partial-articles): New variable. + + * nnimap.el (nnimap-insert-partial-structure): New function. + (nnimap-get-partial-article): New function. + (nnimap-request-article): Use it. + (nnimap-wait-for-response): Return whether the wait was successful. + (nnimap-finish-retrieve-group-infos): Don't do anything if the + retrieval wasn't successful. + (nnimap-retrieve-group-data-early): Allow throttling servers. + (nnimap-streaming): New variable. + (nnimap-fetch-partial-articles): Removed. + + * mm-decode.el (mm-with-part): Protect against killed buffers. + * nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers for prettier summary display. @@ -209,7 +355,6 @@ 2010-09-23 Teodor Zlatanov - * netrc.el (netrc-parse): Remove encrypt.el mentions. * encrypt.el: Removed. 2010-09-23 Lars Magne Ingebrigtsen diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index c0464e2c53f..caead4fabfa 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -32,9 +32,9 @@ ;;; Code: (require 'gnus-util) +(require 'netrc) (eval-when-compile (require 'cl)) -(autoload 'netrc-machine-user-or-password "netrc") (autoload 'secrets-create-item "secrets") (autoload 'secrets-delete-item "secrets") (autoload 'secrets-get-alias "secrets") @@ -312,25 +312,41 @@ Return structure as specified by MODE." (setq result (mapcar (lambda (m) - (cond - ((equal "password" m) - (let ((passwd (read-passwd - (format "Password for %s on %s: " prot host)))) - (cond - ;; Secret Service API. - ((consp source) - (apply - 'secrets-create-item - (auth-get-source entry) name passwd spec)) - (t)) ;; netrc not implemented yes. - passwd)) - ((equal "login" m) - (or user - (read-string (format "User name for %s on %s: " prot host)))) - (t - "unknownuser"))) + (cons + m + (cond + ((equal "password" m) + (let ((passwd (read-passwd + (format "Password for %s on %s: " prot host)))) + (cond + ;; Secret Service API. + ((consp source) + (apply + 'secrets-create-item + (auth-get-source entry) name passwd spec)) + (t)) ;; netrc not implemented yes. + passwd)) + ((equal "login" m) + (or user + (read-string (format "User name for %s on %s: " prot host)))) + (t + "unknownuser")))) (if (consp mode) mode (list mode)))) - (if (consp mode) result (car result)))) + ;; Allow the source to save the data. + (cond + ((consp source) + ;; Secret Service API -- not implemented. + ) + (t + ;; netrc interface. + (when (y-or-n-p (format "Do you want to save this password in %s? " + source)) + (netrc-store-data source host prot + (or user (cdr (assoc "login" result))) + (cdr (assoc "password" result)))))) + (if (consp mode) + (mapcar #'cdr result) + (cdar result)))) (defun auth-source-delete (entry &rest spec) "Delete credentials according to SPEC in ENTRY." diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8a0f0a3c388..b0cfb5b814c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1692,13 +1692,13 @@ This requires GNU Libidn, and by default only enabled if it is found." (gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers) (gnus-treat-leading-whitespace gnus-article-remove-leading-whitespace) (gnus-treat-strip-pem gnus-article-hide-pem) - (gnus-treat-from-picon gnus-treat-from-picon) - (gnus-treat-mail-picon gnus-treat-mail-picon) - (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon) (gnus-treat-from-gravatar gnus-treat-from-gravatar) (gnus-treat-mail-gravatar gnus-treat-mail-gravatar) (gnus-treat-highlight-headers gnus-article-highlight-headers) (gnus-treat-highlight-signature gnus-article-highlight-signature) + (gnus-treat-from-picon gnus-treat-from-picon) + (gnus-treat-mail-picon gnus-treat-mail-picon) + (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon) (gnus-treat-strip-trailing-blank-lines gnus-article-remove-trailing-blank-lines) (gnus-treat-strip-leading-blank-lines diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index fb23d9056ed..2f70eae3cd0 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -85,19 +85,9 @@ added right to the textual representation." (const right)) :group 'gnus-picon) -(defface gnus-picon-xbm '((t (:foreground "black" :background "white"))) - "Face to show xbm picon in." - :group 'gnus-picon) -;; backward-compatibility alias -(put 'gnus-picon-xbm-face 'face-alias 'gnus-picon-xbm) -(put 'gnus-picon-xbm-face 'obsolete-face "22.1") - (defface gnus-picon '((t (:foreground "black" :background "white"))) "Face to show picon in." :group 'gnus-picon) -;; backward-compatibility alias -(put 'gnus-picon-face 'face-alias 'gnus-picon) -(put 'gnus-picon-face 'obsolete-face "22.1") ;;; Internal variables: @@ -161,7 +151,9 @@ replacement is added." (insert glyph) (gnus-add-wash-type category) (gnus-add-image category (car glyph)) - (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category))) + (let ((start (point))) + (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category) + (put-text-property start (point) 'face 'gnus-picon)))) (defun gnus-picon-create-glyph (file) (or (cdr (assoc file gnus-picon-glyph-alist)) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index 42b53216875..b84ce518a28 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -846,7 +846,9 @@ article number. This function is called narrowed to an article." buffer)) (defun nnml-open-nov (group) - (or (cdr (assoc group nnml-nov-buffer-alist)) + (or (let ((buffer (cdr (assoc group nnml-nov-buffer-alist)))) + (and (buffer-name buffer) + buffer)) (let ((buffer (nnml-get-nov-buffer group))) (push (cons group buffer) nnml-nov-buffer-alist) buffer))) diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index 2644659e20d..d76b8cf3a04 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -220,6 +220,17 @@ MODE can be \"login\" or \"password\", suitable for passing to (eq type (car (cddr service))))))) (cadr service))) +(defun netrc-store-data (file host port user password) + (with-temp-buffer + (when (file-exists-p file) + (insert-file-contents file)) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (insert (format "machine %s login %s password %s port %s\n" + host user password port)) + (write-region (point-min) (point-max) file nil 'silent))) + ;;;###autoload (defun netrc-credentials (machine &rest ports) "Return a user name/password pair.