diff options
author | Gnus developers <ding@gnus.org> | 2010-12-13 22:29:12 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-12-13 22:29:12 +0000 |
commit | 7410c2700a7c3256a117ce9d1d3dbcd934a57589 (patch) | |
tree | fcc0cca3c89e1a46e5cfb8813403afd877612c82 /lisp | |
parent | bc5576723b2ddaa0b4cb6a6ba368fa71bc5a8a0c (diff) |
Merge changes made in Gnus trunk.
nnir.el (nnir-run-imap): Return article list in UID order.
gnus-start.el (gnus-auto-subscribed-groups): Add nnimap to the list of automatically subscribed groups.
(gnus-auto-subscribed-categories): New variable.
(gnus-matches-options-n): Use it.
(gnus-default-subscribed-newsgroups): Remove unused variable.
(gnus-start-draft-setup): Message a bit less.
gnus-agent.el (gnus-agentize): Don't create the queue group automatically on startup. It'll be created later, if needed.
gnus-start.el (gnus-1): Clarify comment.
(gnus-matches-options-n): Fix typo in last change.
(gnus-1): Don't create the nndrafts group twice.
(gnus-setup-news): There's no need to read the active file here, since that's done again later on a per-backend basis.
(gnus-start-draft-setup): Make sure that the new group is started out empty.
netrc.el (netrc-point-at-eol): Remove the unused netrc-point-at-old and netrc-bound-and-true-p bindings.
(netrc-parse): Cache the netrc contents.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 24 | ||||
-rw-r--r-- | lisp/gnus/gnus-agent.el | 1 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 56 | ||||
-rw-r--r-- | lisp/gnus/nnir.el | 2 | ||||
-rw-r--r-- | lisp/net/netrc.el | 26 |
6 files changed, 65 insertions, 50 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10db215a98..59ca93809b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,12 @@ * net/gnutls.el (gnutls-negotiate): Fix setting of default trustfiles. +2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * net/netrc.el (netrc-point-at-eol): Remove the unused + netrc-point-at-old and netrc-bound-and-true-p bindings. + (netrc-parse): Cache the netrc contents. + 2010-12-13 Eli Zaretskii <eliz@gnu.org> * subr.el (posn-col-row): Evaluate header-line-format in the diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d39f5330fd..47350b34ba 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,29 @@ 2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + * gnus-start.el (gnus-matches-options-n): Fix typo in last change. + (gnus-1): Don't create the nndrafts group twice. + (gnus-setup-news): There's no need to read the active file here, since + that's done again later on a per-backend basis. + (gnus-start-draft-setup): Make sure that the new group is started out + empty. + + * gnus-agent.el (gnus-agentize): Don't create the queue group + automatically on startup. It'll be created later, if needed. + + * gnus-start.el (gnus-auto-subscribed-groups): Add nnimap to the list + of automatically subscribed groups. + (gnus-auto-subscribed-categories): New variable. + (gnus-matches-options-n): Use it. + (gnus-default-subscribed-newsgroups): Remove unused variable. + (gnus-start-draft-setup): Message a bit less. + +2010-12-13 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-run-imap): Return article list in order of increasing + UID. + +2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + * gnus-sum.el (gnus-summary-enter-digest-group): Mention gnus-auto-select-on-ephemeral-exit. diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 8edfecde15..fbd86f2e6f 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -685,7 +685,6 @@ This will modify the `gnus-setup-news-hook', and minor mode in all Gnus buffers." (interactive) (gnus-open-agent) - (add-hook 'gnus-setup-news-hook 'gnus-agent-queue-setup) (unless gnus-agent-send-mail-function (setq gnus-agent-send-mail-function (or message-send-mail-real-function diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 8663d67fd0..d9e432736e 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -86,14 +86,6 @@ If a file with the `.el' or `.elc' suffixes exists, it will be read instead." :group 'gnus-start :type '(choice file (const nil))) -(defcustom gnus-default-subscribed-newsgroups nil - "List of newsgroups to subscribe, when a user runs Gnus the first time. -The value should be a list of strings. -If it is t, Gnus will not do anything special the first time it is -started; it'll just use the normal newsgroups subscription methods." - :group 'gnus-start - :type '(choice (repeat string) (const :tag "Nothing special" t))) - (defcustom gnus-use-dribble-file t "*Non-nil means that Gnus will use a dribble file to store user updates. If Emacs should crash without saving the .newsrc files, complete @@ -341,8 +333,17 @@ hierarchy in its entirety." :group 'gnus-group-new :type 'boolean) +(defcustom gnus-auto-subscribed-categories '(mail post-mail) + "*New groups from methods of these categories will be subscribed automatically. +Note that this variable only deals with new groups. It has no +effect whatsoever on old groups. The default is to automatically +subscribe all groups from mail-like backends." + :version "24.1" + :group 'gnus-group-new + :type '(repeat symbol)) + (defcustom gnus-auto-subscribed-groups - "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir" + "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir\\|^nnimap" "*All new groups that match this regexp will be subscribed automatically. Note that this variable only deals with new groups. It has no effect whatsoever on old groups. @@ -784,10 +785,9 @@ prompt the user for the name of an NNTP server to use." (gnus-start-news-server (and arg (not level)))))) (if (and (not dont-connect) (not did-connect)) + ;; Couldn't connect to the server, so bail out. (gnus-group-quit) (gnus-run-hooks 'gnus-startup-hook) - ;; NNTP server is successfully open. - ;; Find the current startup file name. (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) @@ -797,11 +797,10 @@ prompt the user for the name of an NNTP server to use." (gnus-dribble-read-file)) ;; Do the actual startup. - (if gnus-agent - (gnus-request-create-group "queue" '(nndraft ""))) - (gnus-request-create-group "drafts" '(nndraft "")) (gnus-setup-news nil level dont-connect) (gnus-run-hooks 'gnus-setup-news-hook) + (when gnus-agent + (gnus-request-create-group "queue" '(nndraft ""))) (gnus-start-draft-setup) ;; Generate the group buffer. (gnus-group-list-groups level) @@ -816,10 +815,10 @@ prompt the user for the name of an NNTP server to use." (gnus-request-create-group "drafts" '(nndraft "")) (unless (gnus-group-entry "nndraft:drafts") (let ((gnus-level-default-subscribed 1)) - (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))) + (gnus-subscribe-group "nndraft:drafts" nil '(nndraft ""))) + (setcar (gnus-group-entry "nndraft:drafts") 0)) (unless (equal (gnus-group-get-parameter "nndraft:drafts" 'gnus-dummy t) '((gnus-draft-mode))) - (gnus-message 3 "Setting up drafts group") (gnus-group-set-parameter "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode))))) @@ -996,27 +995,8 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." (when (or (null gnus-read-active-file) (eq gnus-read-active-file 'some)) (gnus-update-active-hashtb-from-killed)) - - ;; Validate agent covered methods now that gnus-server-alist has - ;; been initialized. - ;; NOTE: This is here for one purpose only. By validating the - ;; agentized server's, it converts the old 5.10.3, and earlier, - ;; format to the current format. That enables the agent code - ;; within gnus-read-active-file to function correctly. - (if gnus-agent - (gnus-agent-read-servers-validate)) - - ;; Read the active file and create `gnus-active-hashtb'. - ;; If `gnus-read-active-file' is nil, then we just create an empty - ;; hash table. The partial filling out of the hash table will be - ;; done in `gnus-get-unread-articles'. - (and gnus-read-active-file - (not level) - (gnus-read-active-file nil dont-connect)) - (unless gnus-active-hashtb (setq gnus-active-hashtb (gnus-make-hashtable 4096))) - ;; Initialize the cache. (when gnus-use-cache (gnus-cache-open)) @@ -1158,6 +1138,12 @@ for new groups, and subscribe the new groups as zombies." ((and gnus-options-subscribe (string-match gnus-options-subscribe group)) 'subscribe) + ((let ((do-subscribe nil)) + (dolist (category gnus-auto-subscribed-categories) + (when (gnus-member-of-valid category group) + (setq do-subscribe t))) + do-subscribe) + 'subscribe) ((and gnus-auto-subscribed-groups (string-match gnus-auto-subscribed-groups group)) 'subscribe) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 3b1d3246c0..d3ec3d24b5 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -804,7 +804,7 @@ details on the language and supported extensions" (message "Searching %s... %d matches" group arts))) (message "Searching %s...done" group)) (quit nil)) - artlist)) + (nreverse artlist))) groups))))) (defun nnir-imap-make-query (criteria qstring) diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index ff0b52c2b9..989470beca 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -34,18 +34,6 @@ ;;; .netrc and .authinfo rc parsing ;;; -(defalias 'netrc-point-at-eol - (if (fboundp 'point-at-eol) - 'point-at-eol - 'line-end-position)) -(eval-when-compile - ;; This is unnecessary in the compiled version as it is a macro. - (if (fboundp 'bound-and-true-p) - (defalias 'netrc-bound-and-true-p 'bound-and-true-p) - (defmacro netrc-bound-and-true-p (var) - "Return the value of symbol VAR if it is bound, else nil." - `(and (boundp (quote ,var)) ,var)))) - (defgroup netrc nil "Netrc configuration." :group 'comm) @@ -58,12 +46,15 @@ (defvar netrc-services-file "/etc/services" "The name of the services file.") +(defvar netrc-cache nil) + (defun netrc-parse (&optional file) (interactive "fFile to Parse: ") "Parse FILE and return a list of all entries in the file." (unless file (setq file netrc-file)) (if (listp file) + ;; We got already parsed contents; just return it. file (when (file-exists-p file) (with-temp-buffer @@ -71,7 +62,16 @@ "password" "account" "macdef" "force" "port")) alist elem result pair) - (insert-file-contents file) + (if (and netrc-cache + (equal (car netrc-cache) (nth 5 (file-attributes file)))) + ;; Store the contents of the file heavily encrypted in memory. + (insert (base64-decode-string (rot13-string (cdr netrc-cache)))) + (insert-file-contents file) + (when (string-match "\\.gpg\\'" file) + (setq netrc-cache (cons (nth 5 (file-attributes file)) + (rot13-string + (base64-encode-string + (buffer-string))))))) (goto-char (point-min)) ;; Go through the file, line by line. (while (not (eobp)) |