[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/gnus nnrss.el nnmaildir.el auth-sour... [EMACS_
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] emacs/lisp/gnus nnrss.el nnmaildir.el auth-sour... [EMACS_23_1_RC] |
Date: |
Fri, 17 Jul 2009 10:16:04 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_23_1_RC
Changes by: Katsumi Yamaoka <yamaoka> 09/07/17 10:16:04
Modified files:
lisp/gnus : nnrss.el nnmaildir.el auth-source.el ChangeLog
Log message:
Synch with Gnus trunk:
2009-07-16 Katsumi Yamaoka <address@hidden>
* nnrss.el (nnrss-request-article): Allow mml-to-mime to generate MIME
article without making inquiry to a user for unknown encoding.
* nnmaildir.el (nnmaildir--group-maxnum, nnmaildir--new-number)
(nnmaildir--scan): Assume i-node and device number that file-attributes
returns might be cons-cell.
2009-07-16 Teodor Zlatanov <address@hidden>
* auth-source.el: Remove docs now in auth.texi. Don't use
`gnus-message' for logging. Add new variables `auth-source-debug' and
`auth-source-hide-passwords' and use them.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/nnrss.el?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.27&r2=1.27.2.1
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/nnmaildir.el?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.14&r2=1.14.2.1
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/auth-source.el?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.13&r2=1.13.2.1
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/ChangeLog?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.808.2.3&r2=1.808.2.4
Patches:
Index: nnrss.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnrss.el,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -u -b -r1.27 -r1.27.2.1
--- nnrss.el 5 Jan 2009 03:22:15 -0000 1.27
+++ nnrss.el 17 Jul 2009 10:16:03 -0000 1.27.2.1
@@ -310,7 +310,11 @@
"<#/part>\n"
"<#/multipart>\n"))
(condition-case nil
- (mml-to-mime)
+ ;; Allow `mml-to-mime' to generate MIME article without
+ ;; making inquiry to a user for unknown encoding.
+ (let ((mml-confirmation-set
+ (cons 'unknown-encoding mml-confirmation-set)))
+ (mml-to-mime))
(error
(erase-buffer)
(insert header
Index: nnmaildir.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnmaildir.el,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -b -r1.14 -r1.14.2.1
--- nnmaildir.el 6 May 2008 03:55:07 -0000 1.14
+++ nnmaildir.el 17 Jul 2009 10:16:03 -0000 1.14.2.1
@@ -270,7 +270,7 @@
(setq attr (file-attributes
(concat dir (number-to-string number-linked))))
(or attr (throw 'return (1- number-linked)))
- (if (/= ino-opened (nth 10 attr))
+ (unless (equal ino-opened (nth 10 attr))
(setq number-opened number-linked))))))
;; Make the given server, if non-nil, be the current server. Then make the
@@ -361,7 +361,7 @@
number-open number-link))
((nnmaildir--eexist-p err)
(let ((attr (file-attributes path-link)))
- (if (/= (nth 10 attr) ino-open)
+ (unless (equal (nth 10 attr) ino-open)
(setq number-open number-link
number-link 0))))
(t (signal (car err) (cdr err)))))))))
@@ -744,7 +744,7 @@
ls (or (nnmaildir--param pgname 'directory-files) srv-ls))
(unless read-only
(setq x (nth 11 (file-attributes tdir)))
- (unless (and (= x (nth 11 nattr)) (= x (nth 11 cattr)))
+ (unless (and (equal x (nth 11 nattr)) (equal x (nth 11 cattr)))
(setf (nnmaildir--srv-error nnmaildir--cur-server)
(concat "Maildir spans filesystems: " absdir))
(throw 'return nil))
Index: auth-source.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/auth-source.el,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -b -r1.13 -r1.13.2.1
--- auth-source.el 5 Feb 2009 02:34:35 -0000 1.13
+++ auth-source.el 17 Jul 2009 10:16:03 -0000 1.13.2.1
@@ -27,33 +27,7 @@
;; of providing 5000 options, we'll stick to simple, easy to
;; understand options.
-;; Easy setup:
-;; (require 'auth-source)
-;; (customize-variable 'auth-sources) ;; optional
-
-;; now, whatever sources you've defined for password have to be available
-
-;; if you want encrypted sources, which is strongly recommended, do
-;; (require 'epa-file)
-;; (epa-file-enable)
-;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important
-
-;; before you put some data in ~/.authinfo.gpg (the default place)
-
-;;; For url-auth authentication (HTTP/HTTPS), you need to use:
-
-;;; machine yourmachine.com:80 port http login testuser password testpass
-
-;;; This will match any realm and authentication method (basic or
-;;; digest). If you want finer controls, explore the url-auth source
-;;; code and variables.
-
-;;; For tramp authentication, use:
-
-;;; machine yourmachine.com port scp login testuser password testpass
-
-;;; Note that the port denotes the Tramp connection method. When you
-;;; don't use a port entry, you match any Tramp method.
+;; See the auth.info Info documentation for details.
;;; Code:
@@ -100,6 +74,31 @@
:version "23.1" ;; No Gnus
:type `boolean)
+(defcustom auth-source-debug nil
+ "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 a function, debug messages are logged by calling
+ that function using the same arguments as `message'."
+ :group 'auth-source
+ :version "23.1" ;; No Gnus
+ :type `(choice
+ :tag "auth-source debugging mode"
+ (const :tag "Log using `message' to the *Messages* buffer" t)
+ (function :tag "Function that takes arguments like `message'")
+ (const :tag "Don't log anything" nil)))
+
+(defcustom auth-source-hide-passwords t
+ "Whether auth-source should hide passwords in log messages.
+Only relevant if `auth-source-debug' is not nil."
+ :group 'auth-source
+ :version "23.1" ;; No Gnus
+ :type `boolean)
+
(defcustom auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))
"List of authentication sources.
@@ -137,6 +136,19 @@
;; (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"))
+(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))))
+
(defun auth-source-pick (host protocol &optional fallback)
"Parse `auth-sources' for HOST, and PROTOCOL matches.
@@ -171,7 +183,7 @@
(defun auth-source-user-or-password (mode host protocol)
"Find MODE (string or list of strings) matching HOST and PROTOCOL.
MODE can be \"login\" or \"password\" for example."
- (gnus-message 9
+ (auth-source-do-debug
"auth-source-user-or-password: get %s for %s (%s)"
mode host protocol)
(let* ((listy (listp mode))
@@ -180,11 +192,11 @@
(found (gethash cname auth-source-cache)))
(if found
(progn
- (gnus-message 9
+ (auth-source-do-debug
"auth-source-user-or-password: cached %s=%s for %s (%s)"
mode
;; don't show the password
- (if (member "password" mode) "SECRET" found)
+ (if (and (member "password" mode) auth-source-hide-passwords)
"SECRET" found)
host protocol)
found)
(dolist (choice (auth-source-pick host protocol))
@@ -195,11 +207,11 @@
(list (format "%s" protocol))
(auth-source-protocol-defaults protocol)))
(when found
- (gnus-message 9
+ (auth-source-do-debug
"auth-source-user-or-password: found %s=%s for %s (%s)"
mode
;; don't show the password
- (if (member "password" mode) "SECRET" found)
+ (if (and (member "password" mode) auth-source-hide-passwords)
"SECRET" found)
host protocol)
(setq found (if listy found (car-safe found)))
(when auth-source-do-cache
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.808.2.3
retrieving revision 1.808.2.4
diff -u -b -r1.808.2.3 -r1.808.2.4
--- ChangeLog 15 Jul 2009 03:13:39 -0000 1.808.2.3
+++ ChangeLog 17 Jul 2009 10:16:03 -0000 1.808.2.4
@@ -1,3 +1,18 @@
+2009-07-16 Katsumi Yamaoka <address@hidden>
+
+ * nnrss.el (nnrss-request-article): Allow mml-to-mime to generate MIME
+ article without making inquiry to a user for unknown encoding.
+
+ * nnmaildir.el (nnmaildir--group-maxnum, nnmaildir--new-number)
+ (nnmaildir--scan): Assume i-node and device number that file-attributes
+ returns might be cons-cell.
+
+2009-07-16 Teodor Zlatanov <address@hidden>
+
+ * auth-source.el: Remove docs now in auth.texi. Don't use
+ `gnus-message' for logging. Add new variables `auth-source-debug' and
+ `auth-source-hide-passwords' and use them.
+
2009-07-15 Glenn Morris <address@hidden>
* gnus-spec.el (gnus-make-format-preserve-properties): Doc fix.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp/gnus nnrss.el nnmaildir.el auth-sour... [EMACS_23_1_RC],
Katsumi Yamaoka <=