shr.el (shr-insert): Don't insert double spaces.
authorGnus developers <ding@gnus.org>
Fri, 8 Oct 2010 23:55:33 +0000 (23:55 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 8 Oct 2010 23:55:33 +0000 (23:55 +0000)
auth.texi (Help for users, GnuPG and EasyPG Assistant Configuration): Update docs.
gnus-registry.el, nnregistry.el: Remove nnregistry refer method auto-install and update docs.
gnus.texi (Finding the Parent, The Gnus Registry, Registry Article Refer Method): Update docs for nnregistry.el.
gnus-demon.el, gnus-group.el, gnus-msg.el, gnus-sum.el, gnus-util.el, gnus.el: Rename `gnus-pull' to `gnus-alist-pull'.
gnus.texi (Article Washing): Add mm-shr.
mm-decode.el (mm-text-html-renderer): Add mm-shr in choice list.

16 files changed:
doc/misc/ChangeLog
doc/misc/auth.texi
doc/misc/gnus.texi
lisp/gnus/ChangeLog
lisp/gnus/gnus-demon.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-registry.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
lisp/gnus/gnus.el
lisp/gnus/mm-decode.el
lisp/gnus/nndoc.el
lisp/gnus/nnregistry.el
lisp/gnus/nnweb.el
lisp/gnus/shr.el

index b06cfe1..aa17155 100644 (file)
@@ -1,3 +1,17 @@
+2010-10-08  Julien Danjou  <julien@danjou.info>
+
+       * gnus.texi: add mm-shr
+
+2010-10-08  Ludovic Courtès  <ludo@gnu.org>
+
+       * gnus.texi (Finding the Parent, The Gnus Registry)
+       (Registry Article Refer Method): Update docs for nnregistry.el.
+
+2010-10-08  Daiki Ueno  <ueno@unixuser.org>
+
+       * auth.texi (Help for users)
+       (GnuPG and EasyPG Assistant Configuration): Update docs.
+
 2010-10-08  Glenn Morris  <rgm@gnu.org>
 
        * cl.texi (Organization, Installation, Old CL Compatibility):
index ed04d98..f7ee7b9 100644 (file)
@@ -59,6 +59,7 @@ It is a way for multiple applications to share a single configuration
 * Help for users::              
 * Secret Service API::          
 * Help for developers::         
+* GnuPG and EasyPG Assistant Configuration::  
 * Index::                       
 * Function Index::              
 * Variable Index::              
@@ -176,16 +177,8 @@ for details.
 
 If you don't customize @code{auth-sources}, you'll have to live with
 the defaults: any host and any port are looked up in the netrc
-file @code{~/.authinfo.gpg}.  This is an encrypted file if and only if
-you set up EPA, which is strongly recommended.
-
-@lisp
-(require 'epa-file)
-(epa-file-enable)
-;;; VERY important if you want symmetric encryption
-;;; irrelevant if you don't
-(setq epa-file-cache-passphrase-for-symmetric-encryption t)
-@end lisp
+file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file.
+@xref{GnuPG and EasyPG Assistant Configuration}.
 
 The simplest working netrc line example is one without a port.
 
@@ -271,6 +264,54 @@ users' netrc files.
 
 @end defun
 
+@node GnuPG and EasyPG Assistant Configuration
+@appendix GnuPG and EasyPG Assistant Configuration
+
+In Emacs 23 or later there is an option @code{auto-encryption-mode} to
+automatically decrypt @code{*.gpg} files and it is enabled by default
+so there is no setting is needed.  If you are using earlier versions
+of Emacs for some reason, you will need:
+
+@lisp
+(require 'epa-file)
+(epa-file-enable)
+@end lisp
+
+If you want your GnuPG passwords to be cached, setup @code{gpg-agent}
+or EasyPG Assitant
+@pxref{Caching Passphrases, , Caching Passphrases, epa}
+
+For those who are using older vesions of Emacs, here are some portion
+copied from the EasyPG Assitant manual:
+
+Here are some questions:
+
+@enumerate
+@item Do you use GnuPG version 2 instead of GnuPG version 1?
+@item Do you use symmetric encryption rather than public key encryption?
+@item Do you want to use gpg-agent?
+@end enumerate
+
+Here are configurations depending on your answers:
+
+@multitable {111} {222} {333} {configuration configuration configuration}
+@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
+@item Yes @tab Yes @tab Yes @tab Nothing to do.
+@item Yes @tab Yes @tab No @tab You can't, without gpg-agent.
+@item Yes @tab No @tab Yes @tab Nothing to do.
+@item Yes @tab No @tab No @tab You can't, without gpg-agent.
+@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
+@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
+@item No @tab No @tab Yes @tab Nothing to do.
+@item No @tab No @tab No @tab You can't, without gpg-agent.
+@end multitable
+
+To setup gpg-agent, follow the instruction in GnuPG manual.
+@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}.
+
+To set up elisp passphrase cache, set
+@code{epa-file-cache-passphrase-for-symmetric-encryption}.
+
 @node Index
 @chapter Index
 @printindex cp
index 1f78e8c..74db0e3 100644 (file)
@@ -9811,6 +9811,10 @@ Customization, emacs-mime, The Emacs MIME Manual}) to convert the
 @code{gnus-article-wash-function} variable.  Pre-defined functions you
 can use include:
 
+@table @code
+@item mm-shr
+Use Gnus simple html renderer.
+
 @table @code
 @item gnus-article-html
 Use Gnus rendered based on w3m.
@@ -10989,9 +10993,12 @@ do not do a particularly excellent job at it.  That is, @code{nnmbox},
 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
 only able to locate articles that have been posted to the current
-group.  (Anything else would be too time consuming.)  @code{nnmh} does
-not support this at all.
+group.  @code{nnmh} does not support this at all.
 
+Fortunately, the special @code{nnregistry} back end is able to locate
+articles in any groups, regardless of their back end (@pxref{Registry
+Article Refer Method, fetching by @code{Message-ID} using the
+registry}).
 
 @node Alternative Approaches
 @section Alternative Approaches
@@ -12452,7 +12459,7 @@ section only describes the default method.
 @item mm-text-html-renderer
 @vindex mm-text-html-renderer
 If set to @code{gnus-article-html}, Gnus will use the built-in method,
-that's based on @code{curl} and @code{w3m}.
+that's based on @code{w3m}.
 
 @item gnus-blocked-images
 @vindex gnus-blocked-images
@@ -25373,6 +25380,13 @@ This keeps discussions in the same group.  You can use the subject and
 the sender in addition to the Message-ID.  Several strategies are
 available.
 
+@item
+Refer to messages by ID
+
+Commands like @code{gnus-summary-refer-parent-article} can take
+advantage of the registry to jump to the referred article, regardless
+of the group the message is in.
+
 @item
 Store custom flags and keywords
 
@@ -25392,6 +25406,7 @@ of all messages matching a particular set of criteria.
 @menu
 * Setup::
 * Fancy splitting to parent::
+* Registry Article Refer Method::
 * Store custom flags and keywords::
 * Store arbitrary data::
 @end menu
@@ -25468,6 +25483,42 @@ registry will keep.
 The file where the registry will be stored between Gnus sessions.
 @end defvar
 
+@node Registry Article Refer Method
+@subsection Fetching by @code{Message-ID} Using the Registry
+
+The registry knows how to map each @code{Message-ID} to the group it's
+in.  This can be leveraged to enhance the ``article refer method'',
+the thing that tells Gnus how to look up an article given its
+Message-ID (@pxref{Finding the Parent}).
+
+@vindex nnregistry
+@vindex gnus-refer-article-method
+
+The @code{nnregistry} refer method does exactly that.  It has the
+advantage that an article may be found regardless of the group it's
+in---provided its @code{Message-ID} is known to the registry.  It can
+be enabled by augmenting the start-up file with something along these
+lines:
+
+@example
+;; Keep enough entries to have a good hit rate when referring to an
+;; article using the registry.  Use long group names so that Gnus
+;; knows where the article is.
+(setq gnus-registry-max-entries 2500
+      gnus-registry-use-long-group-names t)
+
+(gnus-registry-initialize)
+
+(setq gnus-refer-article-method
+      '(current
+       (nnregistry)
+       (nnweb "gmane" (nnweb-type gmane))))
+@end example
+
+The example above instructs Gnus to first look up the article in the
+current group, or, alternatively, using the registry, and finally, if
+all else fails, using Gmane.
+
 @node Fancy splitting to parent
 @subsection Fancy splitting to parent
 
index 8859ce8..744601b 100644 (file)
@@ -1,3 +1,36 @@
+2010-10-08  Julien Danjou  <julien@danjou.info>
+
+       * mm-decode.el (mm-text-html-renderer): Add mm-shr in choice list.
+
+2010-10-08  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-util.el (gnus-alist-pull): Rename `gnus-pull'.
+
+       * gnus-sum.el (gnus-mark-article-as-unread)
+       (gnus-summary-mark-article-as-unread, gnus-summary-remove-bookmark)
+       (gnus-summary-set-bookmark): Use it.
+
+       * gnus-msg.el (gnus-setup-message): Use it.
+
+       * gnus-demon.el (gnus-demon-remove-handler): Use it.
+
+       * gnus.el (gnus-group-remove-parameter): Use it.
+
+       * gnus-group.el (gnus-group-make-web-group): Use it.
+
+       * gnus-demon.el (gnus-demon-remove-handler): Use it.
+
+       * nnregistry.el: Update docs to mention manual.
+
+       * gnus-registry.el: Update docs to mention nnregistry.el.
+       (gnus-registry-initialize): Don't install nnregistry refer method
+       automatically.
+       (gnus-registry-install-nnregistry): Remove it.
+
+2010-10-08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-insert): Don't insert double spaces.
+
 2010-10-08  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-gravatar.el (gnus-treat-from-gravatar)
index c4e439c..9f992d5 100644 (file)
@@ -92,7 +92,7 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's."
 
 (defun gnus-demon-remove-handler (function &optional no-init)
   "Remove the handler FUNCTION from the list of handlers."
-  (gnus-pull function gnus-demon-handlers)
+  (gnus-alist-pull function gnus-demon-handlers)
   (unless no-init
     (gnus-demon-init)))
 
index b228556..b92b608 100644 (file)
@@ -3027,7 +3027,7 @@ If SOLID (the prefix), create a solid group."
                  (nnweb-ephemeral-p t))))
     (if solid
        (progn
-         (gnus-pull 'nnweb-ephemeral-p method)
+         (gnus-alist-pull 'nnweb-ephemeral-p method)
          (gnus-group-make-group group method))
       (gnus-group-read-ephemeral-group
        group method t
index 891718e..a3c5112 100644 (file)
@@ -420,7 +420,7 @@ Thank you for your help in stamping out bugs.
                     ;; There may be an old " *gnus article copy*" buffer.
                     (let (gnus-article-copy)
                       (gnus-configure-posting-styles ,group)))))
-       (gnus-pull ',(intern gnus-draft-meta-information-header)
+       (gnus-alist-pull ',(intern gnus-draft-meta-information-header)
                  message-required-headers)
        (when (and ,group
                  (not (string= ,group "")))
index 45fa956..6c2233f 100644 (file)
 
 ;; Put this in your startup file (~/.gnus.el for instance)
 
-;; (require 'nnregistry) ;; optional, or see below (automatically calls `gnus-registry-install-nnregistry' when `gnus-registry-initialize' is called)
 ;; (setq gnus-registry-max-entries 2500
 ;;       gnus-registry-use-long-group-names t)
 
 ;; (gnus-registry-initialize)
-;; (gnus-registry-install-nnregistry) ;; optional, or see above (loading nnregistry makes it unnecessary)
 
 ;; Then use this in your fancy-split:
 
 ;; (: gnus-registry-split-fancy-with-parent)
 
+;; You should also consider using the nnregistry backend to look up
+;; articles.  See the Gnus manual for more information.
+
 ;; TODO:
 
 ;; - get the correct group on spool actions
@@ -1131,8 +1132,6 @@ Returns the first place where the trail finds a group name."
   (setq gnus-registry-install t)       ; in case it was 'ask or nil
   (gnus-registry-install-hooks)
   (gnus-registry-install-shortcuts)
-  (when (featurep 'nnregistry)
-    (gnus-registry-install-nnregistry))
   (gnus-registry-read))
 
 ;;;###autoload
@@ -1149,21 +1148,6 @@ Returns the first place where the trail finds a group name."
 
   (add-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids))
 
-;;;###autoload
-(defun gnus-registry-install-nnregistry ()
-  "Install the nnregistry refer method in `gnus-refer-article-method'."
-  (interactive)
-  (cond ((eq 'nnregistry gnus-refer-article-method))
-       ((null gnus-refer-article-method)
-        (setq gnus-refer-article-method 'nnregistry))
-       ((consp gnus-refer-article-method)
-        (unless (memq 'nnregistry gnus-refer-article-method)
-          (setq gnus-refer-article-method
-                (append gnus-refer-article-method '(nnregistry)))))
-       (t
-        (setq gnus-refer-article-method
-              (list gnus-refer-article-method 'nnregistry)))))
-
 (defun gnus-registry-unload-hook ()
   "Uninstall the registry hooks."
   (interactive)
index c45536c..a056690 100644 (file)
@@ -10528,7 +10528,7 @@ ARTICLE can also be a list of articles."
            (not (equal gnus-newsgroup-name (car gnus-article-current))))
     (error "No current article selected"))
   ;; Remove old bookmark, if one exists.
-  (gnus-pull article gnus-newsgroup-bookmarks)
+  (gnus-alist-pull article gnus-newsgroup-bookmarks)
   ;; Set the new bookmark, which is on the form
   ;; (article-number . line-number-in-body).
   (push
@@ -10549,7 +10549,7 @@ ARTICLE can also be a list of articles."
   ;; Remove old bookmark, if one exists.
   (if (not (assq article gnus-newsgroup-bookmarks))
       (gnus-message 6 "No bookmark in current article.")
-    (gnus-pull article gnus-newsgroup-bookmarks)
+    (gnus-alist-pull article gnus-newsgroup-bookmarks)
     (gnus-message 6 "Removed bookmark.")))
 
 ;; Suggested by Daniel Quinlan <quinlan@best.com>.
@@ -10675,7 +10675,7 @@ If NO-EXPIRE, auto-expiry will be inhibited."
               (setq gnus-newsgroup-unreads
                     (gnus-add-to-sorted-list gnus-newsgroup-unreads
                                              article))))
-       (gnus-pull article gnus-newsgroup-reads)
+       (gnus-alist-pull article gnus-newsgroup-reads)
 
        ;; See whether the article is to be put in the cache.
        (and gnus-use-cache
@@ -10849,7 +10849,7 @@ If NO-EXPIRE, auto-expiry will be inhibited."
            (t
             (setq gnus-newsgroup-unreads
                   (gnus-add-to-sorted-list gnus-newsgroup-unreads article))))
-      (gnus-pull article gnus-newsgroup-reads)
+      (gnus-alist-pull article gnus-newsgroup-reads)
       t)))
 
 (defalias 'gnus-summary-mark-as-unread-forward
index 932b0a1..503ec47 100644 (file)
@@ -1366,7 +1366,7 @@ Return the modified alist."
        (when (string-match r word)
          (throw 'found r))))))
 
-(defmacro gnus-pull (key alist &optional assoc-p)
+(defmacro gnus-alist-pull (key alist &optional assoc-p)
   "Modify ALIST to be without KEY."
   (unless (symbolp alist)
     (error "Not a symbol: %s" alist))
index b62bf05..f6ffdf6 100644 (file)
@@ -3944,7 +3944,7 @@ If ALLOW-LIST, also allow list as a result."
        (when params
          (setq params (delq name params))
          (while (assq name params)
-           (gnus-pull name params))
+           (gnus-alist-pull name params))
          (gnus-info-set-params info params))))))
 
 (defun gnus-group-add-score (group &optional score)
index 1006c85..07249bf 100644 (file)
   "Render of HTML contents.
 It is one of defined renderer types, or a rendering function.
 The defined renderer types are:
+`mm-shr': use Gnus simple HTML renderer;
 `gnus-article-html' : use Gnus renderer based on w3m;
 `w3m'  : use emacs-w3m;
 `w3m-standalone': use w3m;
@@ -124,7 +125,8 @@ The defined renderer types are:
 `html2text' : use html2text;
 nil    : use external viewer (default web browser)."
   :version "24.1"
-  :type '(choice (const gnus-article-html)
+  :type '(choice (const mm-shr)
+                 (const gnus-article-html)
                  (const w3)
                  (const w3m :tag "emacs-w3m")
                 (const w3m-standalone :tag "standalone w3m" )
index 46d775a..6c9ef1c 100644 (file)
@@ -1038,7 +1038,7 @@ as the last checked definition, if t or `first', add as the
 first definition, and if any other symbol, add after that
 symbol in the alist."
   ;; First remove any old instances.
-  (gnus-pull (car definition) nndoc-type-alist)
+  (gnus-alist-pull (car definition) nndoc-type-alist)
   ;; Then enter the new definition in the proper place.
   (cond
    ((or (null position) (eq position 'last))
index b2d8050..03ff5e7 100644 (file)
@@ -25,7 +25,8 @@
 
 ;; This file provides the `nnregistry' Gnus back-end.  It can be used
 ;; in `gnus-refer-article-method' to quickly search for a message by
-;; id, regardless of the back-end that stores it.
+;; id, regardless of the back-end that stores it.  See the Gnus manual
+;; for usage examples and more information.
 
 ;;; Code:
 
index 1cfa7a4..ac643f9 100644 (file)
@@ -207,7 +207,7 @@ Valid types include `google', `dejanews', and `gmane'.")
 
 (deffoo nnweb-request-delete-group (group &optional force server)
   (nnweb-possibly-change-server group server)
-  (gnus-pull group nnweb-group-alist t)
+  (gnus-alist-pull group nnweb-group-alist t)
   (nnweb-write-active)
   (gnus-delete-file (nnweb-overview-file group))
   t)
index ffc27e9..daafa61 100644 (file)
@@ -188,7 +188,8 @@ redirects somewhere else."
     (let ((first t)
          column)
       (when (and (string-match "\\`[ \t\n]" text)
-                (not (bolp)))
+                (not (bolp))
+                (not (eq (char-after (1- (point))) ? )))
        (insert " "))
       (dolist (elem (split-string text))
        (when (and (bolp)