Commit b09c3fe0 authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka
Browse files

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.
parent 9ccd6e90
...@@ -3,6 +3,33 @@ ...@@ -3,6 +3,33 @@
* mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG * mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG
is not fully working. is not fully working.
   
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* 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 <cohen@andy.bu.edu>
* 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 <tzz@lifelogs.com>
* 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 <cohen@andy.bu.edu> 2011-06-30 Andrew Cohen <cohen@andy.bu.edu>
   
* gnus-art.el (gnus-request-article-this-buffer): Use existing function * gnus-art.el (gnus-request-article-this-buffer): Use existing function
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
(require 'mm-util) (require 'mm-util)
(require 'gnus-util) (require 'gnus-util)
(require 'assoc) (require 'assoc)
(require 'epa)
(require 'epg)
(eval-when-compile (require 'cl)) (eval-when-compile (require 'cl))
(require 'eieio) (require 'eieio)
...@@ -65,6 +63,15 @@ ...@@ -65,6 +63,15 @@
(autoload 'plstore-save "plstore") (autoload 'plstore-save "plstore")
(autoload 'plstore-get-file "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) (defvar secrets-enabled)
(defgroup auth-source nil (defgroup auth-source nil
...@@ -109,9 +116,9 @@ let-binding." ...@@ -109,9 +116,9 @@ let-binding."
:type t :type t
:custom string :custom string
:documentation "The backend protocol.") :documentation "The backend protocol.")
(arg :initarg :arg (data :initarg :arg
:initform nil :initform nil
:documentation "The backend arg.") :documentation "Internal backend data.")
(create-function :initarg :create-function (create-function :initarg :create-function
:initform ignore :initform ignore
:type function :type function
...@@ -171,7 +178,8 @@ let-binding." ...@@ -171,7 +178,8 @@ let-binding."
(defcustom auth-source-netrc-use-gpg-tokens 'never (defcustom auth-source-netrc-use-gpg-tokens 'never
"Set this to tell auth-source when to create GPG password "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 :group 'auth-source
:version "23.2" ;; No Gnus :version "23.2" ;; No Gnus
:type `(choice :type `(choice
...@@ -394,7 +402,7 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." ...@@ -394,7 +402,7 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)."
:type 'plstore :type 'plstore
:search-function 'auth-source-plstore-search :search-function 'auth-source-plstore-search
:create-function 'auth-source-plstore-create :create-function 'auth-source-plstore-create
:arg (plstore-open (plist-get entry :source))) :data (plstore-open (plist-get entry :source)))
(auth-source-backend (auth-source-backend
(plist-get entry :source) (plist-get entry :source)
:source (plist-get entry :source) :source (plist-get entry :source)
...@@ -1520,7 +1528,7 @@ authentication tokens: ...@@ -1520,7 +1528,7 @@ authentication tokens:
(assert (not delete) nil (assert (not delete) nil
"The PLSTORE auth-source backend doesn't support deletion yet") "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 (max (or max 5000)) ; sanity check: default to stop at 5K
(ignored-keys '(:create :delete :max :backend :require)) (ignored-keys '(:create :delete :max :backend :require))
(search-keys (loop for i below (length spec) by 2 (search-keys (loop for i below (length spec) by 2
...@@ -1699,15 +1707,15 @@ authentication tokens: ...@@ -1699,15 +1707,15 @@ authentication tokens:
(setq artificial (plist-put artificial (setq artificial (plist-put artificial
(intern (concat ":" (symbol-name r))) (intern (concat ":" (symbol-name r)))
data)))))) data))))))
(plstore-put (oref backend arg) (plstore-put (oref backend data)
(sha1 (format "%s@%s:%s" (sha1 (format "%s@%s:%s"
(plist-get artificial :user) (plist-get artificial :user)
(plist-get artificial :host) (plist-get artificial :host)
(plist-get artificial :port))) (plist-get artificial :port)))
artificial secret-artificial) artificial secret-artificial)
(if (y-or-n-p (format "Save auth info to file %s? " (if (y-or-n-p (format "Save auth info to file %s? "
(plstore-get-file (oref backend arg)))) (plstore-get-file (oref backend data))))
(plstore-save (oref backend arg))))) (plstore-save (oref backend data)))))
;;; older API ;;; older API
......
...@@ -2428,7 +2428,7 @@ the bug number, and browsing the URL must return mbox output." ...@@ -2428,7 +2428,7 @@ the bug number, and browsing the URL must return mbox output."
:version "24.1" :version "24.1"
:type '(repeat (cons (symbol) (string :tag "URL format string")))) :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." "Browse bug NUMBER as ephemeral group."
(interactive (list (read-string "Enter bug number: " (interactive (list (read-string "Enter bug number: "
(thing-at-point 'word) nil) (thing-at-point 'word) nil)
...@@ -2452,7 +2452,8 @@ the bug number, and browsing the URL must return mbox output." ...@@ -2452,7 +2452,8 @@ the bug number, and browsing the URL must return mbox output."
(gnus-group-read-ephemeral-group (gnus-group-read-ephemeral-group
"gnus-read-ephemeral-bug" "gnus-read-ephemeral-bug"
`(nndoc ,tmpfile `(nndoc ,tmpfile
(nndoc-article-type mbox)))) (nndoc-article-type mbox))
nil window-conf))
(delete-file tmpfile))) (delete-file tmpfile)))
(defun gnus-read-ephemeral-debian-bug-group (number) (defun gnus-read-ephemeral-debian-bug-group (number)
...@@ -2463,13 +2464,14 @@ the bug number, and browsing the URL must return mbox output." ...@@ -2463,13 +2464,14 @@ the bug number, and browsing the URL must return mbox output."
number number
(cdr (assoc 'debian gnus-bug-group-download-format-alist)))) (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." "Browse Emacs bug NUMBER as ephemeral group."
(interactive (list (read-string "Enter bug number: " (interactive (list (read-string "Enter bug number: "
(thing-at-point 'word) nil))) (thing-at-point 'word) nil)))
(gnus-read-ephemeral-bug-group (gnus-read-ephemeral-bug-group
number 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) (defun gnus-group-jump-to-group (group &optional prompt)
"Jump to newsgroup GROUP. "Jump to newsgroup GROUP.
......
...@@ -9050,7 +9050,12 @@ variable." ...@@ -9050,7 +9050,12 @@ variable."
(dolist (method gnus-refer-article-method) (dolist (method gnus-refer-article-method)
(push (if (eq 'current method) (push (if (eq 'current method)
gnus-current-select-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)) out))
(nreverse out))) (nreverse out)))
;; One single select method. ;; One single select method.
......
...@@ -657,22 +657,39 @@ Add an entry here when adding a new search engine.") ...@@ -657,22 +657,39 @@ Add an entry here when adding a new search engine.")
'nov))) 'nov)))
(deffoo nnir-request-article (article &optional group server to-buffer) (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 (nnheader-report
'nnir 'nnir
"nnir-retrieve-headers doesn't grok message ids: %s" "nnir-retrieve-headers only groks message ids for nnimap servers: %s"
article) server)
(save-excursion (save-excursion
(let ((artfullgroup (nnir-article-group article)) (let ((article article)
(artno (nnir-article-number article))) query)
(message "Requesting article %d from group %s" (when (stringp article)
artno artfullgroup) (setq gnus-override-method (gnus-server-to-method server))
(if to-buffer (setq query
(with-current-buffer to-buffer (list
(let ((gnus-article-decode-hook nil)) (cons 'query (format "HEADER Message-ID %s" article))
(gnus-request-article-this-buffer artno artfullgroup))) (cons 'unique-id article)
(gnus-request-article artno artfullgroup)) (cons 'criteria "")))
(cons artfullgroup artno))))) (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 (deffoo nnir-request-move-article (article group server accept-form
&optional last internal-move-group) &optional last internal-move-group)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment