emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104817: gnus-group.el (gnus-read-eph


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104817: gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional quit window configuration.
Date: Thu, 30 Jun 2011 22:20:32 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104817
author: Gnus developers <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-30 22:20:32 +0000
message:
  gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional quit 
window configuration.
  auth-source.el (epg-context-set-passphrase-callback): Remove duplicate 
autoload.
  nnir.el (nnir-request-article): Allow requesting articles by Message-ID with 
nnimap.
  gnus-sum.el (gnus-refer-article-methods): Allow (nnir) entry to use current 
server.
  auth-source.el: Autoload EPA/EPG functions.
   (auth-source-netrc-use-gpg-tokens): Clarify that it should not be changed 
when EPA/EPG is not available.
   (auth-source-backend): Rename "arg" member to "data".
   (auth-source-backend-parse, auth-source-plstore-search)
   (auth-source-plstore-create): Use it.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/auth-source.el
  lisp/gnus/gnus-group.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/nnir.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-06-30 20:54:35 +0000
+++ b/lisp/gnus/ChangeLog       2011-06-30 22:20:32 +0000
@@ -3,6 +3,33 @@
        * mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG
        is not fully working.
 
+2011-06-30  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * dgnushack.el: Autoload sha1 on XEmacs.
+
+       * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional
+       quit window configuration.
+
+       * auth-source.el (epg-context-set-passphrase-callback): Remove
+       duplicate autoload.
+
+2011-06-30  Andrew Cohen  <address@hidden>
+
+       * nnir.el (nnir-request-article): Allow requesting articles by
+       Message-ID with nnimap.
+
+       * gnus-sum.el (gnus-refer-article-methods): Allow (nnir) entry to use
+       current server.
+
+2011-06-30  Teodor Zlatanov  <address@hidden>
+
+       * auth-source.el: Autoload EPA/EPG functions.
+       (auth-source-netrc-use-gpg-tokens): Clarify that it should not be
+       changed when EPA/EPG is not available.
+       (auth-source-backend): Rename "arg" member to "data".
+       (auth-source-backend-parse, auth-source-plstore-search)
+       (auth-source-plstore-create): Use it.
+
 2011-06-30  Andrew Cohen  <address@hidden>
 
        * gnus-art.el (gnus-request-article-this-buffer): Use existing function

=== modified file 'lisp/gnus/auth-source.el'
--- a/lisp/gnus/auth-source.el  2011-06-30 14:25:27 +0000
+++ b/lisp/gnus/auth-source.el  2011-06-30 22:20:32 +0000
@@ -43,8 +43,6 @@
 (require 'mm-util)
 (require 'gnus-util)
 (require 'assoc)
-(require 'epa)
-(require 'epg)
 
 (eval-when-compile (require 'cl))
 (require 'eieio)
@@ -65,6 +63,15 @@
 (autoload 'plstore-save "plstore")
 (autoload 'plstore-get-file "plstore")
 
+(autoload 'epa-passphrase-callback-function "epa")
+
+(autoload 'epg-context-operation "epg")
+(autoload 'epg-make-context "epg")
+(autoload 'epg-context-set-passphrase-callback "epg")
+(autoload 'epg-decrypt-string "epg")
+(autoload 'epg-context-set-armor "epg")
+(autoload 'epg-encrypt-string "epg")
+
 (defvar secrets-enabled)
 
 (defgroup auth-source nil
@@ -109,9 +116,9 @@
          :type t
          :custom string
          :documentation "The backend protocol.")
-   (arg :initarg :arg
-       :initform nil
-       :documentation "The backend arg.")
+   (data :initarg :arg
+         :initform nil
+         :documentation "Internal backend data.")
    (create-function :initarg :create-function
                     :initform ignore
                     :type function
@@ -171,7 +178,8 @@
 
 (defcustom auth-source-netrc-use-gpg-tokens 'never
   "Set this to tell auth-source when to create GPG password
-tokens in netrc files.  It's either an alist or `never'."
+tokens in netrc files.  It's either an alist or `never'.
+Note that if EPA/EPG is not available, this should NOT be used."
   :group 'auth-source
   :version "23.2" ;; No Gnus
   :type `(choice
@@ -394,7 +402,7 @@
          :type 'plstore
          :search-function 'auth-source-plstore-search
          :create-function 'auth-source-plstore-create
-         :arg (plstore-open (plist-get entry :source)))
+         :data (plstore-open (plist-get entry :source)))
        (auth-source-backend
        (plist-get entry :source)
        :source (plist-get entry :source)
@@ -1520,7 +1528,7 @@
   (assert (not delete) nil
           "The PLSTORE auth-source backend doesn't support deletion yet")
 
-  (let* ((store (oref backend arg))
+  (let* ((store (oref backend data))
          (max (or max 5000))     ; sanity check: default to stop at 5K
          (ignored-keys '(:create :delete :max :backend :require))
          (search-keys (loop for i below (length spec) by 2
@@ -1699,15 +1707,15 @@
            (setq artificial (plist-put artificial
                                        (intern (concat ":" (symbol-name r)))
                                        data))))))
-    (plstore-put (oref backend arg)
+    (plstore-put (oref backend data)
                 (sha1 (format "address@hidden:%s"
                               (plist-get artificial :user)
                               (plist-get artificial :host)
                               (plist-get artificial :port)))
                 artificial secret-artificial)
     (if (y-or-n-p (format "Save auth info to file %s? "
-                         (plstore-get-file (oref backend arg))))
-       (plstore-save (oref backend arg)))))
+                         (plstore-get-file (oref backend data))))
+       (plstore-save (oref backend data)))))
 
 ;;; older API
 

=== modified file 'lisp/gnus/gnus-group.el'
--- a/lisp/gnus/gnus-group.el   2011-06-10 00:10:24 +0000
+++ b/lisp/gnus/gnus-group.el   2011-06-30 22:20:32 +0000
@@ -2428,7 +2428,7 @@
   :version "24.1"
   :type '(repeat (cons (symbol) (string :tag "URL format string"))))
 
-(defun gnus-read-ephemeral-bug-group (number mbox-url)
+(defun gnus-read-ephemeral-bug-group (number mbox-url &optional window-conf)
   "Browse bug NUMBER as ephemeral group."
   (interactive (list (read-string "Enter bug number: "
                                  (thing-at-point 'word) nil)
@@ -2452,7 +2452,8 @@
       (gnus-group-read-ephemeral-group
        "gnus-read-ephemeral-bug"
        `(nndoc ,tmpfile
-              (nndoc-article-type mbox))))
+              (nndoc-article-type mbox))
+       nil window-conf))
     (delete-file tmpfile)))
 
 (defun gnus-read-ephemeral-debian-bug-group (number)
@@ -2463,13 +2464,14 @@
    number
    (cdr (assoc 'debian gnus-bug-group-download-format-alist))))
 
-(defun gnus-read-ephemeral-emacs-bug-group (number)
+(defun gnus-read-ephemeral-emacs-bug-group (number &optional window-conf)
   "Browse Emacs bug NUMBER as ephemeral group."
   (interactive (list (read-string "Enter bug number: "
                                  (thing-at-point 'word) nil)))
   (gnus-read-ephemeral-bug-group
    number
-   (cdr (assoc 'emacs gnus-bug-group-download-format-alist))))
+   (cdr (assoc 'emacs gnus-bug-group-download-format-alist))
+   window-conf))
 
 (defun gnus-group-jump-to-group (group &optional prompt)
   "Jump to newsgroup GROUP.

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2011-06-26 22:21:48 +0000
+++ b/lisp/gnus/gnus-sum.el     2011-06-30 22:20:32 +0000
@@ -9050,7 +9050,12 @@
       (dolist (method gnus-refer-article-method)
        (push (if (eq 'current method)
                  gnus-current-select-method
-               method)
+               (if (eq 'nnir (car method))
+                   (list
+                    'nnir
+                    (or (cadr method)
+                        (gnus-method-to-server gnus-current-select-method)))
+                 method))
              out))
       (nreverse out)))
    ;; One single select method.

=== modified file 'lisp/gnus/nnir.el'
--- a/lisp/gnus/nnir.el 2011-02-23 13:35:35 +0000
+++ b/lisp/gnus/nnir.el 2011-06-30 22:20:32 +0000
@@ -657,22 +657,39 @@
       'nov)))
 
 (deffoo nnir-request-article (article &optional group server to-buffer)
-  (if (stringp article)
+  (if (and (stringp article)
+          (not (eq 'nnimap (car (gnus-server-to-method server)))))
       (nnheader-report
        'nnir
-       "nnir-retrieve-headers doesn't grok message ids: %s"
-       article)
+       "nnir-retrieve-headers only groks message ids for nnimap servers: %s"
+       server)
     (save-excursion
-      (let ((artfullgroup (nnir-article-group article))
-           (artno (nnir-article-number article)))
-       (message "Requesting article %d from group %s"
-                artno artfullgroup)
-       (if to-buffer
-           (with-current-buffer to-buffer
-             (let ((gnus-article-decode-hook nil))
-               (gnus-request-article-this-buffer artno artfullgroup)))
-         (gnus-request-article artno artfullgroup))
-       (cons artfullgroup artno)))))
+      (let ((article article)
+           query)
+       (when (stringp article)
+         (setq gnus-override-method (gnus-server-to-method server))
+         (setq query
+               (list
+                (cons 'query (format "HEADER Message-ID %s" article))
+                (cons 'unique-id article)
+                (cons 'criteria "")))
+         (unless (and (equal query nnir-current-query)
+                      (equal server nnir-current-server))
+           (setq nnir-artlist (nnir-run-imap query server))
+           (setq nnir-current-query query)
+           (setq nnir-current-server server))
+         (setq article 1))
+       (unless (zerop (length nnir-artlist))
+         (let ((artfullgroup (nnir-article-group article))
+               (artno (nnir-article-number article)))
+           (message "Requesting article %d from group %s"
+                    artno artfullgroup)
+           (if to-buffer
+               (with-current-buffer to-buffer
+                 (let ((gnus-article-decode-hook nil))
+                   (gnus-request-article-this-buffer artno artfullgroup)))
+             (gnus-request-article artno artfullgroup))
+           (cons artfullgroup artno)))))))
 
 (deffoo nnir-request-move-article (article group server accept-form
                                           &optional last internal-move-group)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]