Merge changes made in Gnus trunk.
authorGnus developers <ding@gnus.org>
Fri, 18 Mar 2011 13:45:04 +0000 (13:45 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 18 Mar 2011 13:45:04 +0000 (13:45 +0000)
message.texi (Various Commands): Document format specs in the ellipsis.
time-date.el (format-seconds): Use assoc instead of assoc-string to avoid warning on XEmacs.
gnus-art.el: Require mouse, which the build bot seems to say is needed.
gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on XEmacs, since it doesn't have url-retrieve-synchronously.
time-date.el (format-seconds): Use assoc instead of assoc-string, since assoc-string doesn't exist in XEmacs.
gnus-group.el (gnus-group-list-ticked): New function.
 (gnus-group-make-menu-bar): Provide a menu entry for it.
 (gnus-group-list-map): Provide a binding for it.
shr.el (shr-visit-file): New command.
nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch.
nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable servers.

doc/misc/ChangeLog
doc/misc/message.texi
lisp/ChangeLog
lisp/calendar/time-date.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-group.el
lisp/gnus/gravatar.el
lisp/gnus/nnimap.el
lisp/gnus/shr.el

index 5dd5e3e..50f0e4e 100644 (file)
@@ -2,6 +2,11 @@
 
        * calc.texi (Logarithmic Units): Update the function names.
 
+2011-03-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * message.texi (Various Commands): Document format specs in the
+       ellipsis.
+
 2011-03-15  Antoine Levitt  <antoine.levitt@gmail.com>
 
        * message.texi (Insertion Variables): Document message-cite-style.
index 7d61ffd..48d0028 100644 (file)
@@ -1202,6 +1202,10 @@ The text is killed and replaced with the contents of the variable
 @code{message-elide-ellipsis}.  The default value is to use an ellipsis
 (@samp{[...]}).
 
+This is a format-spec string, and you can use @samp{%l} to say how
+many lines were removed, and @samp{%c} to say how many characters were
+removed.
+
 @item C-c M-k
 @kindex C-c M-k
 @findex message-kill-address
index 5164207..6d4e842 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * calendar/time-date.el (format-seconds): Use assoc instead of
+       assoc-string to avoid warning on XEmacs.
+
+2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * calendar/time-date.el (format-seconds): Use assoc instead of
+       assoc-string, since assoc-string doesn't exist in XEmacs.
+
 2011-03-17  Juanma Barranquero  <lekktu@gmail.com>
 
        * custom.el (custom-known-themes): Reflow docstring.
index a1bfad3..6220360 100644 (file)
@@ -308,13 +308,9 @@ This function does not work for SECONDS greater than `most-positive-fixnum'."
       (setq start (match-end 0)
             spec (match-string 1 string))
       (unless (string-equal spec "%")
-       ;; `assoc-string' is not available in XEmacs.  So when compiling
-       ;; Gnus (`time-date.el' is part of Gnus) with XEmacs, we get
-       ;; a warning here.  But `format-seconds' is not used anywhere in
-       ;; Gnus so it's not a real problem. --rsteib
-        (or (setq match (assoc-string spec units t))
+        (or (setq match (assoc (downcase spec) units))
             (error "Bad format specifier: `%s'" spec))
-        (if (assoc-string spec usedunits t)
+        (if (assoc (downcase spec) usedunits)
             (error "Multiple instances of specifier: `%s'" spec))
         (if (string-equal (car match) "z")
             (setq zeroflag t)
index b22ed73..04b8015 100644 (file)
@@ -1,3 +1,28 @@
+2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-art.el: Require mouse, which the build bot seems to say is
+       needed.
+
+       * gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on
+       XEmacs, since it doesn't have url-retrieve-synchronously.
+
+2011-03-17  Antoine Levitt  <antoine.levitt@gmail.com>
+
+       * gnus-group.el (gnus-group-list-ticked): New function.
+       (gnus-group-make-menu-bar): Provide a menu entry for it.
+       (gnus-group-list-map): Provide a binding for it.
+
+2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-visit-file): New command.
+
+       * nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch.
+
+2011-03-17  Bjørn Mork  <bjorn@mork.no>
+
+       * nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable
+       servers.
+
 2011-03-16  Julien Danjou  <julien@danjou.info>
 
        * mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are
index b994a28..7c7e053 100644 (file)
@@ -44,6 +44,7 @@
 (require 'wid-edit)
 (require 'mm-uu)
 (require 'message)
+(require 'mouse)
 
 (autoload 'gnus-msg-mail "gnus-msg" nil t)
 (autoload 'gnus-button-mailto "gnus-msg")
index e928811..c265538 100644 (file)
@@ -697,7 +697,8 @@ simple manner.")
   "M" gnus-group-list-all-matching
   "l" gnus-group-list-level
   "c" gnus-group-list-cached
-  "?" gnus-group-list-dormant)
+  "?" gnus-group-list-dormant
+  "!" gnus-group-list-ticked)
 
 (gnus-define-keys (gnus-group-list-limit-map "/" gnus-group-list-map)
   "k"  gnus-group-list-limit
@@ -849,7 +850,8 @@ simple manner.")
        ["List all groups matching..." gnus-group-list-all-matching t]
        ["List active file" gnus-group-list-active t]
        ["List groups with cached" gnus-group-list-cached t]
-       ["List groups with dormant" gnus-group-list-dormant t])
+       ["List groups with dormant" gnus-group-list-dormant t]
+       ["List groups with ticked" gnus-group-list-ticked t])
        ("Sort"
        ["Default sort" gnus-group-sort-groups t]
        ["Sort by method" gnus-group-sort-groups-by-method t]
@@ -4536,6 +4538,28 @@ This command may read the active file."
   (goto-char (point-min))
   (gnus-group-position-point))
 
+(defun gnus-group-list-ticked (level &optional lowest)
+  "List all groups with ticked articles.
+If the prefix LEVEL is non-nil, it should be a number that says which
+level to cut off listing groups.
+If LOWEST, don't list groups with level lower than LOWEST.
+
+This command may read the active file."
+  (interactive "P")
+  (when level
+    (setq level (prefix-numeric-value level)))
+  (when (or (not level) (>= level gnus-level-zombie))
+    (gnus-cache-open))
+  (funcall gnus-group-prepare-function
+          (or level gnus-level-subscribed)
+          #'(lambda (info)
+              (let ((marks (gnus-info-marks info)))
+                (assq 'tick marks)))
+          lowest
+          'ignore)
+  (goto-char (point-min))
+  (gnus-group-position-point))
+
 (defun gnus-group-listed-groups ()
   "Return a list of listed groups."
   (let (point groups)
index 0c97080..4b0c9a1 100644 (file)
@@ -129,8 +129,10 @@ You can provide a list of argument to pass to CB in CBARGS."
   "Retrieve MAIL-ADDRESS gravatar and returns it."
   (let ((url (gravatar-build-url mail-address)))
     (if (gravatar-cache-expired url)
-        (with-current-buffer (url-retrieve-synchronously url)
-          (when gravatar-automatic-caching
+        (with-current-buffer (if (featurep 'xemacs)
+                                (url-retrieve url)
+                              (url-retrieve-synchronously url))
+         (when gravatar-automatic-caching
             (url-store-in-cache (current-buffer)))
           (let ((data (gravatar-data->image)))
             (kill-buffer (current-buffer))
index e0804f8..bcbe7b6 100644 (file)
@@ -1762,11 +1762,15 @@ textual parts.")
     (format "(UID %s%s)"
            (format
             (if (nnimap-ver4-p)
-                "BODY.PEEK[HEADER] BODY.PEEK"
+                "BODY.PEEK"
               "RFC822.PEEK"))
-           (if nnimap-split-download-body-default
-               "[]"
-             "[1]")))
+           (cond
+            (nnimap-split-download-body-default
+             "[]")
+            ((nnimap-ver4-p)
+             "[HEADER]")
+            (t
+             "[1]"))))
    t))
 
 (defun nnimap-split-incoming-mail ()
index c9c5bd5..113137a 100644 (file)
@@ -113,6 +113,15 @@ cid: URL as the argument.")
 
 ;; Public functions and commands.
 
+(defun shr-visit-file (file)
+  (interactive "fHTML file name: ")
+  (pop-to-buffer "*html*")
+  (erase-buffer)
+  (shr-insert-document
+   (with-temp-buffer
+     (insert-file-contents file)
+     (libxml-parse-html-region (point-min) (point-max)))))
+
 ;;;###autoload
 (defun shr-insert-document (dom)
   (setq shr-content-cache nil)