diff options
| author | Gnus developers | 2010-10-31 22:31:24 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-10-31 22:31:24 +0000 |
| commit | 389b76fa1b4e96b7da8896cea16d57403d76a947 (patch) | |
| tree | 43e56629071d13a0817e6fdff598ce806d5ce4d5 | |
| parent | 430e7297cbfe8c2ef14b5b703fc56c4efce439c0 (diff) | |
| download | emacs-389b76fa1b4e96b7da8896cea16d57403d76a947.tar.gz emacs-389b76fa1b4e96b7da8896cea16d57403d76a947.zip | |
Merge changes made in Gnus trunk.
nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set.
gnus.el (gnus-group-startup-message): Move point to the start of the buffer.
nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest.
gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive.
shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We").
gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter.
gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines.
gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections.
gnus.el: Autoload gnus-article-fill-cited-long-lines.
gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'.
gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments.
gnus.texi (Paging the Article): Document C-u g/C-u C-u g.
gnus-cite.el (gnus-article-foldable-buffer): Refactor out.
gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge.
gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness.
gnus-srvr.el, nnir.el: Allow nnir searching for an entire server.
gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles.
gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place.
nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging.
nnimap.el (nnimap-wait-for-connection): Take a regexp.
nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 27 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 71 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cite.el | 39 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-srvr.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 14 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 22 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 15 | ||||
| -rw-r--r-- | lisp/gnus/nndoc.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 31 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 69 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 4 |
14 files changed, 269 insertions, 52 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index d5c5df92087..5e99132389e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-31 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus.texi (Paging the Article): Document C-u g/C-u C-u g. | ||
| 4 | |||
| 1 | 2010-10-31 Glenn Morris <rgm@gnu.org> | 5 | 2010-10-31 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * mh-e.texi (Preface, From Bill Wohler): Change 23 to past tense. | 7 | * mh-e.texi (Preface, From Bill Wohler): Change 23 to past tense. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index dd3e07ef3cc..c3dd2b31a50 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -6153,8 +6153,9 @@ Scroll the current article one line backward | |||
| 6153 | @vindex gnus-summary-show-article-charset-alist | 6153 | @vindex gnus-summary-show-article-charset-alist |
| 6154 | (Re)fetch the current article (@code{gnus-summary-show-article}). If | 6154 | (Re)fetch the current article (@code{gnus-summary-show-article}). If |
| 6155 | given a prefix, fetch the current article, but don't run any of the | 6155 | given a prefix, fetch the current article, but don't run any of the |
| 6156 | article treatment functions. This will give you a ``raw'' article, just | 6156 | article treatment functions. If given a prefix twice (i.e., @kbd{C-u |
| 6157 | the way it came from the server. | 6157 | C-u g'}), show a completely ``raw'' article, just the way it came from |
| 6158 | the server. | ||
| 6158 | 6159 | ||
| 6159 | @cindex charset, view article with different charset | 6160 | @cindex charset, view article with different charset |
| 6160 | If given a numerical prefix, you can do semi-manual charset stuff. | 6161 | If given a numerical prefix, you can do semi-manual charset stuff. |
| @@ -13428,14 +13429,20 @@ the headers of the article; if the value is @code{nil}, the header | |||
| 13428 | name will be removed. If the attribute name is @code{eval}, the form | 13429 | name will be removed. If the attribute name is @code{eval}, the form |
| 13429 | is evaluated, and the result is thrown away. | 13430 | is evaluated, and the result is thrown away. |
| 13430 | 13431 | ||
| 13431 | The attribute value can be a string (used verbatim), a function with | 13432 | The attribute value can be a string, a function with zero arguments |
| 13432 | zero arguments (the return value will be used), a variable (its value | 13433 | (the return value will be used), a variable (its value will be used) |
| 13433 | will be used) or a list (it will be @code{eval}ed and the return value | 13434 | or a list (it will be @code{eval}ed and the return value will be |
| 13434 | will be used). The functions and sexps are called/@code{eval}ed in the | 13435 | used). The functions and sexps are called/@code{eval}ed in the |
| 13435 | message buffer that is being set up. The headers of the current article | 13436 | message buffer that is being set up. The headers of the current |
| 13436 | are available through the @code{message-reply-headers} variable, which | 13437 | article are available through the @code{message-reply-headers} |
| 13437 | is a vector of the following headers: number subject from date id | 13438 | variable, which is a vector of the following headers: number subject |
| 13438 | references chars lines xref extra. | 13439 | from date id references chars lines xref extra. |
| 13440 | |||
| 13441 | In the case of a string value, if the @code{match} is a regular | ||
| 13442 | expression, a @samp{gnus-match-substitute-replacement} is proceed on | ||
| 13443 | the value to replace the positional parameters @samp{\@var{n}} by the | ||
| 13444 | corresponding parenthetical matches (see @xref{Replacing the Text that | ||
| 13445 | Matched, , Text Replacement, elisp, The Emacs Lisp Reference Manual}.) | ||
| 13439 | 13446 | ||
| 13440 | @vindex message-reply-headers | 13447 | @vindex message-reply-headers |
| 13441 | 13448 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5dd4ac9215c..0a1ca2bd107 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,74 @@ | |||
| 1 | 2010-10-31 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * nnimap.el (nnimap-request-accept-article): Erase buffer before | ||
| 4 | appending for easier debugging. | ||
| 5 | (nnimap-wait-for-connection): Take a regexp. | ||
| 6 | (nnimap-request-accept-article): Wait for the continuation line before | ||
| 7 | sending anything unless we're streaming. | ||
| 8 | |||
| 9 | * gnus-art.el (gnus-treat-article): Only inhibit body washing, and | ||
| 10 | leave the header washing to take place. | ||
| 11 | |||
| 12 | 2010-10-31 Daniel Dehennin <daniel.dehennin@baby-gnu.org> | ||
| 13 | |||
| 14 | * gnus-msg.el (gnus-configure-posting-styles): Permit the use of | ||
| 15 | regular expression match and replace in posting styles. | ||
| 16 | |||
| 17 | 2010-10-31 Andrew Cohen <cohen@andy.bu.edu> | ||
| 18 | |||
| 19 | * nnir.el (gnus-group-make-nnir-group,nnir-run-query): Allow searching | ||
| 20 | an entire server. | ||
| 21 | (nnir-get-active): New function. | ||
| 22 | (nnir-run-imap): Use it. | ||
| 23 | (nnir-run-gmane): Who knew, gmane search returns an article score! | ||
| 24 | |||
| 25 | * gnus-srvr.el (gnus-server-mode-map): add binding "G" to search the | ||
| 26 | server on the current line with nnir. | ||
| 27 | |||
| 28 | 2010-10-31 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 29 | |||
| 30 | * gnus-cite.el (gnus-article-foldable-buffer): Refactor out. | ||
| 31 | (gnus-article-foldable-buffer): Don't fold regions that have a ragged | ||
| 32 | left edge. | ||
| 33 | (gnus-article-foldable-buffer): Skip past the prefix when determining | ||
| 34 | raggedness. | ||
| 35 | |||
| 36 | * gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing | ||
| 37 | the raw article, and change `C-u g' to show the article without doing | ||
| 38 | treatments. | ||
| 39 | |||
| 40 | * gnus-art.el (gnus-mime-display-alternative): Actually pass the type | ||
| 41 | on to `gnus-treat-article'. | ||
| 42 | (gnus-inhibit-article-treatments): New variable. | ||
| 43 | |||
| 44 | * gnus.el: Autoload gnus-article-fill-cited-long-lines. | ||
| 45 | |||
| 46 | * gnus-art.el (gnus-treatment-function-alist): Have | ||
| 47 | gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. | ||
| 48 | (gnus-treat-fill-long-lines): Change default to fill all text/plain | ||
| 49 | sections. | ||
| 50 | |||
| 51 | * gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' | ||
| 52 | parameter. | ||
| 53 | (gnus-article-fill-cited-long-lines): New function. | ||
| 54 | (gnus-article-fill-cited-article): Allow filling only long sections. | ||
| 55 | |||
| 56 | * shr.el (shr-find-fill-point): Don't break lines between punctuation | ||
| 57 | and non-punctuation (like after the apostrophe in "'We"). | ||
| 58 | |||
| 59 | * gnus-sum.el (gnus-summary-select-article): Make sure | ||
| 60 | gnus-original-article-buffer is alive. | ||
| 61 | |||
| 62 | * nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to | ||
| 63 | reflect the order they're in in the digest. | ||
| 64 | |||
| 65 | * gnus.el (gnus-group-startup-message): Move point to the start of the | ||
| 66 | buffer. | ||
| 67 | |||
| 68 | * nnimap.el (nnimap-capability): New function. | ||
| 69 | (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED | ||
| 70 | is set. | ||
| 71 | |||
| 1 | 2010-10-31 David Engster <dengste@eml.cc> | 72 | 2010-10-31 David Engster <dengste@eml.cc> |
| 2 | 73 | ||
| 3 | * nnmairix.el (nnmairix-get-valid-servers): Return list of strings to | 74 | * nnmairix.el (nnmairix-get-valid-servers): Return list of strings to |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 6d777937584..713773ea882 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1590,7 +1590,7 @@ predicate. See Info node `(gnus)Customizing Articles'." | |||
| 1590 | :link '(custom-manual "(gnus)Customizing Articles") | 1590 | :link '(custom-manual "(gnus)Customizing Articles") |
| 1591 | :type gnus-article-treat-custom) | 1591 | :type gnus-article-treat-custom) |
| 1592 | 1592 | ||
| 1593 | (defcustom gnus-treat-fill-long-lines nil | 1593 | (defcustom gnus-treat-fill-long-lines '(typep "text/plain") |
| 1594 | "Fill long lines. | 1594 | "Fill long lines. |
| 1595 | Valid values are nil, t, `head', `first', `last', an integer or a | 1595 | Valid values are nil, t, `head', `first', `last', an integer or a |
| 1596 | predicate. See Info node `(gnus)Customizing Articles'." | 1596 | predicate. See Info node `(gnus)Customizing Articles'." |
| @@ -1664,7 +1664,7 @@ regexp." | |||
| 1664 | (gnus-treat-highlight-signature gnus-article-highlight-signature) | 1664 | (gnus-treat-highlight-signature gnus-article-highlight-signature) |
| 1665 | (gnus-treat-buttonize gnus-article-add-buttons) | 1665 | (gnus-treat-buttonize gnus-article-add-buttons) |
| 1666 | (gnus-treat-fill-article gnus-article-fill-cited-article) | 1666 | (gnus-treat-fill-article gnus-article-fill-cited-article) |
| 1667 | (gnus-treat-fill-long-lines gnus-article-fill-long-lines) | 1667 | (gnus-treat-fill-long-lines gnus-article-fill-cited-long-lines) |
| 1668 | (gnus-treat-strip-cr gnus-article-remove-cr) | 1668 | (gnus-treat-strip-cr gnus-article-remove-cr) |
| 1669 | (gnus-treat-unsplit-urls gnus-article-unsplit-urls) | 1669 | (gnus-treat-unsplit-urls gnus-article-unsplit-urls) |
| 1670 | (gnus-treat-date-ut gnus-article-date-ut) | 1670 | (gnus-treat-date-ut gnus-article-date-ut) |
| @@ -5704,7 +5704,7 @@ all parts." | |||
| 5704 | (save-restriction | 5704 | (save-restriction |
| 5705 | (article-goto-body) | 5705 | (article-goto-body) |
| 5706 | (narrow-to-region (point) (point-max)) | 5706 | (narrow-to-region (point) (point-max)) |
| 5707 | (gnus-treat-article nil 1 1) | 5707 | (gnus-treat-article nil 1 1 "text/plain") |
| 5708 | (widen))) | 5708 | (widen))) |
| 5709 | (unless ihandles | 5709 | (unless ihandles |
| 5710 | ;; Highlight the headers. | 5710 | ;; Highlight the headers. |
| @@ -5992,7 +5992,7 @@ If displaying \"text/html\" is discouraged \(see | |||
| 5992 | (gnus-treat-article | 5992 | (gnus-treat-article |
| 5993 | nil (length gnus-article-mime-handle-alist) | 5993 | nil (length gnus-article-mime-handle-alist) |
| 5994 | (gnus-article-mime-total-parts) | 5994 | (gnus-article-mime-total-parts) |
| 5995 | (mm-handle-media-type handle)))))) | 5995 | (mm-handle-media-type preferred)))))) |
| 5996 | (goto-char (point-max)) | 5996 | (goto-char (point-max)) |
| 5997 | (setcdr begend (point-marker))))) | 5997 | (setcdr begend (point-marker))))) |
| 5998 | (when ibegend | 5998 | (when ibegend |
| @@ -8255,6 +8255,8 @@ For example: | |||
| 8255 | ;;; Treatment top-level handling. | 8255 | ;;; Treatment top-level handling. |
| 8256 | ;;; | 8256 | ;;; |
| 8257 | 8257 | ||
| 8258 | (defvar gnus-inhibit-article-treatments nil) | ||
| 8259 | |||
| 8258 | (defun gnus-treat-article (condition &optional part-number total-parts type) | 8260 | (defun gnus-treat-article (condition &optional part-number total-parts type) |
| 8259 | (let ((length (- (point-max) (point-min))) | 8261 | (let ((length (- (point-max) (point-min))) |
| 8260 | (alist gnus-treatment-function-alist) | 8262 | (alist gnus-treatment-function-alist) |
| @@ -8277,6 +8279,8 @@ For example: | |||
| 8277 | (symbol-value (car elem)))) | 8279 | (symbol-value (car elem)))) |
| 8278 | (when (and (or (consp val) | 8280 | (when (and (or (consp val) |
| 8279 | treated-type) | 8281 | treated-type) |
| 8282 | (or (not gnus-inhibit-article-treatments) | ||
| 8283 | (eq condition 'head)) | ||
| 8280 | (gnus-treat-predicate val) | 8284 | (gnus-treat-predicate val) |
| 8281 | (or (not (get (car elem) 'highlight)) | 8285 | (or (not (get (car elem) 'highlight)) |
| 8282 | highlightp)) | 8286 | highlightp)) |
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 7419cedac5f..a010a833e9d 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el | |||
| @@ -516,10 +516,15 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps | |||
| 516 | (setq m (cdr m)))) | 516 | (setq m (cdr m)))) |
| 517 | marks)))) | 517 | marks)))) |
| 518 | 518 | ||
| 519 | (defun gnus-article-fill-cited-article (&optional force width) | 519 | (defun gnus-article-fill-cited-long-lines () |
| 520 | (gnus-article-fill-cited-article nil t)) | ||
| 521 | |||
| 522 | (defun gnus-article-fill-cited-article (&optional width long-lines) | ||
| 520 | "Do word wrapping in the current article. | 523 | "Do word wrapping in the current article. |
| 521 | If WIDTH (the numerical prefix), use that text width when filling." | 524 | If WIDTH (the numerical prefix), use that text width when |
| 522 | (interactive (list t current-prefix-arg)) | 525 | filling. If LONG-LINES, only fill sections that have lines |
| 526 | longer than the frame width." | ||
| 527 | (interactive "P") | ||
| 523 | (with-current-buffer gnus-article-buffer | 528 | (with-current-buffer gnus-article-buffer |
| 524 | (let ((buffer-read-only nil) | 529 | (let ((buffer-read-only nil) |
| 525 | (inhibit-point-motion-hooks t) | 530 | (inhibit-point-motion-hooks t) |
| @@ -535,8 +540,12 @@ If WIDTH (the numerical prefix), use that text width when filling." | |||
| 535 | (fill-prefix | 540 | (fill-prefix |
| 536 | (if (string= (cdar marks) "") "" | 541 | (if (string= (cdar marks) "") "" |
| 537 | (concat (cdar marks) " "))) | 542 | (concat (cdar marks) " "))) |
| 543 | (do-fill (not long-lines)) | ||
| 538 | use-hard-newlines) | 544 | use-hard-newlines) |
| 539 | (fill-region (point-min) (point-max))) | 545 | (unless do-fill |
| 546 | (setq do-fill (gnus-article-foldable-buffer (cdar marks)))) | ||
| 547 | (when do-fill | ||
| 548 | (fill-region (point-min) (point-max)))) | ||
| 540 | (set-marker (caar marks) nil) | 549 | (set-marker (caar marks) nil) |
| 541 | (setq marks (cdr marks))) | 550 | (setq marks (cdr marks))) |
| 542 | (when marks | 551 | (when marks |
| @@ -548,6 +557,28 @@ If WIDTH (the numerical prefix), use that text width when filling." | |||
| 548 | gnus-cite-loose-attribution-alist nil | 557 | gnus-cite-loose-attribution-alist nil |
| 549 | gnus-cite-article nil))))) | 558 | gnus-cite-article nil))))) |
| 550 | 559 | ||
| 560 | (defun gnus-article-foldable-buffer (prefix) | ||
| 561 | (let ((do-fill nil) | ||
| 562 | columns) | ||
| 563 | (goto-char (point-min)) | ||
| 564 | (while (not (eobp)) | ||
| 565 | (forward-char (length prefix)) | ||
| 566 | (skip-chars-forward " \t") | ||
| 567 | (unless (eolp) | ||
| 568 | (let ((elem (assq (current-column) columns))) | ||
| 569 | (unless elem | ||
| 570 | (setq elem (cons (current-column) 0)) | ||
| 571 | (push elem columns)) | ||
| 572 | (setcdr elem (1+ (cdr elem))))) | ||
| 573 | (end-of-line) | ||
| 574 | (when (> (current-column) (frame-width)) | ||
| 575 | (setq do-fill t)) | ||
| 576 | (forward-line 1)) | ||
| 577 | (and do-fill | ||
| 578 | ;; We know know that there are long lines here, but does this look | ||
| 579 | ;; like code? Check for ragged edges on the left. | ||
| 580 | (< (length columns) 3)))) | ||
| 581 | |||
| 551 | (defun gnus-article-natural-long-line-p () | 582 | (defun gnus-article-natural-long-line-p () |
| 552 | "Return true if the current line is long, and it's natural text." | 583 | "Return true if the current line is long, and it's natural text." |
| 553 | (save-excursion | 584 | (save-excursion |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index a7d67113b31..46cbc75f2a5 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1891,7 +1891,11 @@ this is a reply." | |||
| 1891 | (setq v | 1891 | (setq v |
| 1892 | (cond | 1892 | (cond |
| 1893 | ((stringp value) | 1893 | ((stringp value) |
| 1894 | value) | 1894 | (if (and (stringp match) |
| 1895 | (string-match-p "\\\\[&[:digit:]]" value) | ||
| 1896 | (match-beginning 1)) | ||
| 1897 | (gnus-match-substitute-replacement value nil nil group) | ||
| 1898 | value)) | ||
| 1895 | ((or (symbolp value) | 1899 | ((or (symbolp value) |
| 1896 | (functionp value)) | 1900 | (functionp value)) |
| 1897 | (cond ((functionp value) | 1901 | (cond ((functionp value) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index b532b740455..ae773657d24 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | (require 'gnus-int) | 34 | (require 'gnus-int) |
| 35 | (require 'gnus-range) | 35 | (require 'gnus-range) |
| 36 | 36 | ||
| 37 | (autoload 'gnus-group-make-nnir-group "nnir") | ||
| 38 | |||
| 37 | (defcustom gnus-server-mode-hook nil | 39 | (defcustom gnus-server-mode-hook nil |
| 38 | "Hook run in `gnus-server-mode' buffers." | 40 | "Hook run in `gnus-server-mode' buffers." |
| 39 | :group 'gnus-server | 41 | :group 'gnus-server |
| @@ -165,6 +167,8 @@ If nil, a faster, but more primitive, buffer is used instead." | |||
| 165 | 167 | ||
| 166 | "g" gnus-server-regenerate-server | 168 | "g" gnus-server-regenerate-server |
| 167 | 169 | ||
| 170 | "G" gnus-group-make-nnir-group | ||
| 171 | |||
| 168 | "z" gnus-server-compact-server | 172 | "z" gnus-server-compact-server |
| 169 | 173 | ||
| 170 | "\C-c\C-i" gnus-info-find-node | 174 | "\C-c\C-i" gnus-info-find-node |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 53645bfdb5e..7de7a0a4a26 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -7596,6 +7596,7 @@ be displayed." | |||
| 7596 | (not (get-buffer gnus-original-article-buffer)))) | 7596 | (not (get-buffer gnus-original-article-buffer)))) |
| 7597 | (and (not gnus-single-article-buffer) | 7597 | (and (not gnus-single-article-buffer) |
| 7598 | (or (null gnus-current-article) | 7598 | (or (null gnus-current-article) |
| 7599 | (not (get-buffer gnus-original-article-buffer)) | ||
| 7599 | (not (eq gnus-current-article article)))) | 7600 | (not (eq gnus-current-article article)))) |
| 7600 | force) | 7601 | force) |
| 7601 | ;; The requested article is different from the current article. | 7602 | ;; The requested article is different from the current article. |
| @@ -9392,9 +9393,10 @@ article currently." | |||
| 9392 | If ARG (the prefix) is a number, show the article with the charset | 9393 | If ARG (the prefix) is a number, show the article with the charset |
| 9393 | defined in `gnus-summary-show-article-charset-alist', or the charset | 9394 | defined in `gnus-summary-show-article-charset-alist', or the charset |
| 9394 | input. | 9395 | input. |
| 9395 | If ARG (the prefix) is non-nil and not a number, show the raw article | 9396 | If ARG (the prefix) is non-nil and not a number, show the article, |
| 9396 | without any article massaging functions being run. Normally, the key | 9397 | but without running any of the article treatment functions |
| 9397 | strokes are `C-u g'." | 9398 | article. Normally, the keystroke is `C-u g'. When using `C-u |
| 9399 | C-u g', show the raw article." | ||
| 9398 | (interactive "P") | 9400 | (interactive "P") |
| 9399 | (cond | 9401 | (cond |
| 9400 | ((numberp arg) | 9402 | ((numberp arg) |
| @@ -9436,7 +9438,8 @@ strokes are `C-u g'." | |||
| 9436 | ((not arg) | 9438 | ((not arg) |
| 9437 | ;; Select the article the normal way. | 9439 | ;; Select the article the normal way. |
| 9438 | (gnus-summary-select-article nil 'force)) | 9440 | (gnus-summary-select-article nil 'force)) |
| 9439 | (t | 9441 | ((equal arg '(16)) |
| 9442 | ;; C-u C-u g | ||
| 9440 | ;; We have to require this here to make sure that the following | 9443 | ;; We have to require this here to make sure that the following |
| 9441 | ;; dynamic binding isn't shadowed by autoloading. | 9444 | ;; dynamic binding isn't shadowed by autoloading. |
| 9442 | (require 'gnus-async) | 9445 | (require 'gnus-async) |
| @@ -9454,6 +9457,9 @@ strokes are `C-u g'." | |||
| 9454 | ;; Set it to nil for safety reason. | 9457 | ;; Set it to nil for safety reason. |
| 9455 | (setq gnus-article-mime-handle-alist nil) | 9458 | (setq gnus-article-mime-handle-alist nil) |
| 9456 | (setq gnus-article-mime-handles nil))) | 9459 | (setq gnus-article-mime-handles nil))) |
| 9460 | (gnus-summary-select-article nil 'force))) | ||
| 9461 | (t | ||
| 9462 | (let ((gnus-inhibit-article-treatments t)) | ||
| 9457 | (gnus-summary-select-article nil 'force)))) | 9463 | (gnus-summary-select-article nil 'force)))) |
| 9458 | (gnus-summary-goto-subject gnus-current-article) | 9464 | (gnus-summary-goto-subject gnus-current-article) |
| 9459 | (gnus-summary-position-point)) | 9465 | (gnus-summary-position-point)) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 5bcda97ab1a..0bffb36f2bf 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1982,6 +1982,28 @@ Sizes are in pixels." | |||
| 1982 | (memq elem list)))) | 1982 | (memq elem list)))) |
| 1983 | found)) | 1983 | found)) |
| 1984 | 1984 | ||
| 1985 | (eval-and-compile | ||
| 1986 | (cond | ||
| 1987 | ((fboundp 'match-substitute-replacement) | ||
| 1988 | (defalias 'gnus-match-substitute-replacement 'match-substitute-replacement)) | ||
| 1989 | (t | ||
| 1990 | (defun gnus-match-substitute-replacement (replacement &optional fixedcase literal string subexp) | ||
| 1991 | "Return REPLACEMENT as it will be inserted by `replace-match'. | ||
| 1992 | In other words, all back-references in the form `\\&' and `\\N' | ||
| 1993 | are substituted with actual strings matched by the last search. | ||
| 1994 | Optional FIXEDCASE, LITERAL, STRING and SUBEXP have the same | ||
| 1995 | meaning as for `replace-match'. | ||
| 1996 | |||
| 1997 | This is the definition of match-substitute-replacement in subr.el from GNU Emacs." | ||
| 1998 | (let ((match (match-string 0 string))) | ||
| 1999 | (save-match-data | ||
| 2000 | (set-match-data (mapcar (lambda (x) | ||
| 2001 | (if (numberp x) | ||
| 2002 | (- x (match-beginning 0)) | ||
| 2003 | x)) | ||
| 2004 | (match-data t))) | ||
| 2005 | (replace-match replacement fixedcase literal match subexp))))))) | ||
| 2006 | |||
| 1985 | (provide 'gnus-util) | 2007 | (provide 'gnus-util) |
| 1986 | 2008 | ||
| 1987 | ;;; gnus-util.el ends here | 2009 | ;;; gnus-util.el ends here |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index d2149016461..6f4ef631ae8 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1032,10 +1032,11 @@ be set in `.emacs' instead." | |||
| 1032 | (unless (and | 1032 | (unless (and |
| 1033 | (fboundp 'find-image) | 1033 | (fboundp 'find-image) |
| 1034 | (display-graphic-p) | 1034 | (display-graphic-p) |
| 1035 | ;; Make sure the library defining `image-load-path' is loaded | 1035 | ;; Make sure the library defining `image-load-path' is |
| 1036 | ;; (`find-image' is autoloaded) (and discard the result). Else, we may | 1036 | ;; loaded (`find-image' is autoloaded) (and discard the |
| 1037 | ;; get "defvar ignored because image-load-path is let-bound" when calling | 1037 | ;; result). Else, we may get "defvar ignored because |
| 1038 | ;; `find-image' below. | 1038 | ;; image-load-path is let-bound" when calling `find-image' |
| 1039 | ;; below. | ||
| 1039 | (or (find-image '(nil (:type xpm :file "gnus.xpm"))) t) | 1040 | (or (find-image '(nil (:type xpm :file "gnus.xpm"))) t) |
| 1040 | (let* ((data-directory (nnheader-find-etc-directory "images/gnus")) | 1041 | (let* ((data-directory (nnheader-find-etc-directory "images/gnus")) |
| 1041 | (image-load-path (cond (data-directory | 1042 | (image-load-path (cond (data-directory |
| @@ -1065,9 +1066,10 @@ be set in `.emacs' instead." | |||
| 1065 | (insert-char ?\ (max 0 (round (- (window-width) | 1066 | (insert-char ?\ (max 0 (round (- (window-width) |
| 1066 | (or x (car size))) 2))) | 1067 | (or x (car size))) 2))) |
| 1067 | (insert-image image)) | 1068 | (insert-image image)) |
| 1069 | (goto-char (point-min)) | ||
| 1068 | t))) | 1070 | t))) |
| 1069 | (insert | 1071 | (insert |
| 1070 | (format " | 1072 | (format " |
| 1071 | _ ___ _ _ | 1073 | _ ___ _ _ |
| 1072 | _ ___ __ ___ __ _ ___ | 1074 | _ ___ __ ___ __ _ ___ |
| 1073 | __ _ ___ __ ___ | 1075 | __ _ ___ __ ___ |
| @@ -2772,7 +2774,8 @@ gnus-registry.el will populate this if it's loaded.") | |||
| 2772 | ("gnus-cite" :interactive t | 2774 | ("gnus-cite" :interactive t |
| 2773 | gnus-article-highlight-citation gnus-article-hide-citation-maybe | 2775 | gnus-article-highlight-citation gnus-article-hide-citation-maybe |
| 2774 | gnus-article-hide-citation gnus-article-fill-cited-article | 2776 | gnus-article-hide-citation gnus-article-fill-cited-article |
| 2775 | gnus-article-hide-citation-in-followups) | 2777 | gnus-article-hide-citation-in-followups |
| 2778 | gnus-article-fill-cited-long-lines) | ||
| 2776 | ("gnus-kill" gnus-kill gnus-apply-kill-file-internal | 2779 | ("gnus-kill" gnus-kill gnus-apply-kill-file-internal |
| 2777 | gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author | 2780 | gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author |
| 2778 | gnus-execute gnus-expunge gnus-batch-kill gnus-batch-score) | 2781 | gnus-execute gnus-expunge gnus-batch-kill gnus-batch-score) |
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 9f147e32b41..0dee06d2937 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el | |||
| @@ -918,7 +918,8 @@ from the document.") | |||
| 918 | (setq body-end (point)) | 918 | (setq body-end (point)) |
| 919 | (push (list (incf i) head-begin head-end body-begin body-end | 919 | (push (list (incf i) head-begin head-end body-begin body-end |
| 920 | (count-lines body-begin body-end)) | 920 | (count-lines body-begin body-end)) |
| 921 | nndoc-dissection-alist))))))) | 921 | nndoc-dissection-alist))))) |
| 922 | (setq nndoc-dissection-alist (nreverse nndoc-dissection-alist)))) | ||
| 922 | 923 | ||
| 923 | (defun nndoc-article-begin () | 924 | (defun nndoc-article-begin () |
| 924 | (if nndoc-article-begin-function | 925 | (if nndoc-article-begin-function |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 98839e20708..3940e643532 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -382,14 +382,13 @@ textual parts.") | |||
| 382 | ;; connection and start a STARTTLS connection instead. | 382 | ;; connection and start a STARTTLS connection instead. |
| 383 | (cond | 383 | (cond |
| 384 | ((and (or (and (eq nnimap-stream 'network) | 384 | ((and (or (and (eq nnimap-stream 'network) |
| 385 | (member "STARTTLS" | 385 | (nnimap-capability "STARTTLS")) |
| 386 | (nnimap-capabilities nnimap-object))) | ||
| 387 | (eq nnimap-stream 'starttls)) | 386 | (eq nnimap-stream 'starttls)) |
| 388 | (fboundp 'open-gnutls-stream)) | 387 | (fboundp 'open-gnutls-stream)) |
| 389 | (nnimap-command "STARTTLS") | 388 | (nnimap-command "STARTTLS") |
| 390 | (gnutls-negotiate (nnimap-process nnimap-object) nil)) | 389 | (gnutls-negotiate (nnimap-process nnimap-object) nil)) |
| 391 | ((and (eq nnimap-stream 'network) | 390 | ((and (eq nnimap-stream 'network) |
| 392 | (member "STARTTLS" (nnimap-capabilities nnimap-object))) | 391 | (nnimap-capability "STARTTLS")) |
| 393 | (let ((nnimap-stream 'starttls)) | 392 | (let ((nnimap-stream 'starttls)) |
| 394 | (let ((tls-process | 393 | (let ((tls-process |
| 395 | (nnimap-open-connection buffer))) | 394 | (nnimap-open-connection buffer))) |
| @@ -416,8 +415,8 @@ textual parts.") | |||
| 416 | (nnimap-credentials nnimap-address ports))))) | 415 | (nnimap-credentials nnimap-address ports))))) |
| 417 | (setq nnimap-object nil) | 416 | (setq nnimap-object nil) |
| 418 | (setq login-result | 417 | (setq login-result |
| 419 | (if (member "AUTH=PLAIN" | 418 | (if (and (nnimap-capability "AUTH=PLAIN") |
| 420 | (nnimap-capabilities nnimap-object)) | 419 | (nnimap-capability "LOGINDISABLED")) |
| 421 | (nnimap-command | 420 | (nnimap-command |
| 422 | "AUTHENTICATE PLAIN %s" | 421 | "AUTHENTICATE PLAIN %s" |
| 423 | (base64-encode-string | 422 | (base64-encode-string |
| @@ -439,7 +438,7 @@ textual parts.") | |||
| 439 | (delete-process (nnimap-process nnimap-object)) | 438 | (delete-process (nnimap-process nnimap-object)) |
| 440 | (setq nnimap-object nil)))) | 439 | (setq nnimap-object nil)))) |
| 441 | (when nnimap-object | 440 | (when nnimap-object |
| 442 | (when (member "QRESYNC" (nnimap-capabilities nnimap-object)) | 441 | (when (nnimap-capability "QRESYNC") |
| 443 | (nnimap-command "ENABLE QRESYNC")) | 442 | (nnimap-command "ENABLE QRESYNC")) |
| 444 | (nnimap-process nnimap-object)))))))) | 443 | (nnimap-process nnimap-object)))))))) |
| 445 | 444 | ||
| @@ -555,8 +554,11 @@ textual parts.") | |||
| 555 | (delete-region (point) (point-max))) | 554 | (delete-region (point) (point-max))) |
| 556 | t))) | 555 | t))) |
| 557 | 556 | ||
| 557 | (defun nnimap-capability (capability) | ||
| 558 | (member capability (nnimap-capabilities nnimap-object))) | ||
| 559 | |||
| 558 | (defun nnimap-ver4-p () | 560 | (defun nnimap-ver4-p () |
| 559 | (member "IMAP4REV1" (nnimap-capabilities nnimap-object))) | 561 | (nnimap-capability "IMAP4REV1")) |
| 560 | 562 | ||
| 561 | (defun nnimap-get-partial-article (article parts structure) | 563 | (defun nnimap-get-partial-article (article parts structure) |
| 562 | (let ((result | 564 | (let ((result |
| @@ -872,7 +874,7 @@ textual parts.") | |||
| 872 | (nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)" | 874 | (nnimap-command "UID STORE %s +FLAGS.SILENT (\\Deleted)" |
| 873 | (nnimap-article-ranges articles)) | 875 | (nnimap-article-ranges articles)) |
| 874 | (cond | 876 | (cond |
| 875 | ((member "UIDPLUS" (nnimap-capabilities nnimap-object)) | 877 | ((nnimap-capability "UIDPLUS") |
| 876 | (nnimap-command "UID EXPUNGE %s" | 878 | (nnimap-command "UID EXPUNGE %s" |
| 877 | (nnimap-article-ranges articles)) | 879 | (nnimap-article-ranges articles)) |
| 878 | t) | 880 | t) |
| @@ -928,9 +930,12 @@ textual parts.") | |||
| 928 | (nnimap-add-cr) | 930 | (nnimap-add-cr) |
| 929 | (setq message (buffer-substring-no-properties (point-min) (point-max))) | 931 | (setq message (buffer-substring-no-properties (point-min) (point-max))) |
| 930 | (with-current-buffer (nnimap-buffer) | 932 | (with-current-buffer (nnimap-buffer) |
| 933 | (erase-buffer) | ||
| 931 | (setq sequence (nnimap-send-command | 934 | (setq sequence (nnimap-send-command |
| 932 | "APPEND %S {%d}" (utf7-encode group t) | 935 | "APPEND %S {%d}" (utf7-encode group t) |
| 933 | (length message))) | 936 | (length message))) |
| 937 | (unless nnimap-streaming | ||
| 938 | (nnimap-wait-for-connection "^[+]")) | ||
| 934 | (process-send-string (get-buffer-process (current-buffer)) message) | 939 | (process-send-string (get-buffer-process (current-buffer)) message) |
| 935 | (process-send-string (get-buffer-process (current-buffer)) | 940 | (process-send-string (get-buffer-process (current-buffer)) |
| 936 | (if (nnimap-newlinep nnimap-object) | 941 | (if (nnimap-newlinep nnimap-object) |
| @@ -1031,7 +1036,7 @@ textual parts.") | |||
| 1031 | (with-current-buffer (nnimap-buffer) | 1036 | (with-current-buffer (nnimap-buffer) |
| 1032 | (erase-buffer) | 1037 | (erase-buffer) |
| 1033 | (setf (nnimap-group nnimap-object) nil) | 1038 | (setf (nnimap-group nnimap-object) nil) |
| 1034 | (let ((qresyncp (member "QRESYNC" (nnimap-capabilities nnimap-object))) | 1039 | (let ((qresyncp (nnimap-capability "QRESYNC")) |
| 1035 | params groups sequences active uidvalidity modseq group) | 1040 | params groups sequences active uidvalidity modseq group) |
| 1036 | ;; Go through the infos and gather the data needed to know | 1041 | ;; Go through the infos and gather the data needed to know |
| 1037 | ;; what and how to request the data. | 1042 | ;; what and how to request the data. |
| @@ -1477,12 +1482,14 @@ textual parts.") | |||
| 1477 | (nnimap-wait-for-response sequence) | 1482 | (nnimap-wait-for-response sequence) |
| 1478 | (nnimap-parse-response)) | 1483 | (nnimap-parse-response)) |
| 1479 | 1484 | ||
| 1480 | (defun nnimap-wait-for-connection () | 1485 | (defun nnimap-wait-for-connection (&optional regexp) |
| 1486 | (unless regexp | ||
| 1487 | (setq regexp "^[*.] .*\n")) | ||
| 1481 | (let ((process (get-buffer-process (current-buffer)))) | 1488 | (let ((process (get-buffer-process (current-buffer)))) |
| 1482 | (goto-char (point-min)) | 1489 | (goto-char (point-min)) |
| 1483 | (while (and (memq (process-status process) | 1490 | (while (and (memq (process-status process) |
| 1484 | '(open run)) | 1491 | '(open run)) |
| 1485 | (not (re-search-forward "^[*.] .*\n" nil t))) | 1492 | (not (re-search-forward regexp nil t))) |
| 1486 | (nnheader-accept-process-output process) | 1493 | (nnheader-accept-process-output process) |
| 1487 | (goto-char (point-min))) | 1494 | (goto-char (point-min))) |
| 1488 | (forward-line -1) | 1495 | (forward-line -1) |
| @@ -1669,7 +1676,7 @@ textual parts.") | |||
| 1669 | (cond | 1676 | (cond |
| 1670 | ;; If the server supports it, we now delete the message we have | 1677 | ;; If the server supports it, we now delete the message we have |
| 1671 | ;; just copied over. | 1678 | ;; just copied over. |
| 1672 | ((member "UIDPLUS" (nnimap-capabilities nnimap-object)) | 1679 | ((nnimap-capability "UIDPLUS") |
| 1673 | (setq sequence (nnimap-send-command "UID EXPUNGE %s" range))) | 1680 | (setq sequence (nnimap-send-command "UID EXPUNGE %s" range))) |
| 1674 | ;; If it doesn't support UID EXPUNGE, then we only expunge if the | 1681 | ;; If it doesn't support UID EXPUNGE, then we only expunge if the |
| 1675 | ;; user has configured it. | 1682 | ;; user has configured it. |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 9e3dd9c523f..3e00158aad7 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -491,10 +491,12 @@ result, `gnus-retrieve-headers' will be called instead.") | |||
| 491 | nnir-current-group-marked nil | 491 | nnir-current-group-marked nil |
| 492 | nnir-artlist nil) | 492 | nnir-artlist nil) |
| 493 | (let* ((query (read-string "Query: " nil 'nnir-search-history)) | 493 | (let* ((query (read-string "Query: " nil 'nnir-search-history)) |
| 494 | (parms (list (cons 'query query)))) | 494 | (parms (list (cons 'query query))) |
| 495 | (srv (if (gnus-server-server-name) | ||
| 496 | "all" ""))) | ||
| 495 | (add-to-list 'parms (cons 'unique-id (message-unique-id)) t) | 497 | (add-to-list 'parms (cons 'unique-id (message-unique-id)) t) |
| 496 | (gnus-group-read-ephemeral-group | 498 | (gnus-group-read-ephemeral-group |
| 497 | (concat "nnir:" (prin1-to-string parms)) '(nnir "") t | 499 | (concat "nnir:" (prin1-to-string parms)) (list 'nnir srv) t |
| 498 | (cons (current-buffer) gnus-current-window-configuration) | 500 | (cons (current-buffer) gnus-current-window-configuration) |
| 499 | nil))) | 501 | nil))) |
| 500 | 502 | ||
| @@ -566,7 +568,7 @@ and show thread that contains this article." | |||
| 566 | (equal server nnir-current-server))) | 568 | (equal server nnir-current-server))) |
| 567 | nnir-artlist | 569 | nnir-artlist |
| 568 | ;; Cache miss. | 570 | ;; Cache miss. |
| 569 | (setq nnir-artlist (nnir-run-query group))) | 571 | (setq nnir-artlist (nnir-run-query group server))) |
| 570 | (with-current-buffer nntp-server-buffer | 572 | (with-current-buffer nntp-server-buffer |
| 571 | (setq nnir-current-query group) | 573 | (setq nnir-current-query group) |
| 572 | (when server (setq nnir-current-server server)) | 574 | (when server (setq nnir-current-server server)) |
| @@ -765,6 +767,7 @@ details on the language and supported extensions" | |||
| 765 | (cdr (assoc nnir-imap-default-search-key | 767 | (cdr (assoc nnir-imap-default-search-key |
| 766 | nnir-imap-search-arguments)))) | 768 | nnir-imap-search-arguments)))) |
| 767 | (gnus-inhibit-demon t) | 769 | (gnus-inhibit-demon t) |
| 770 | (groups (or groups (nnir-get-active srv))) | ||
| 768 | artlist) | 771 | artlist) |
| 769 | (message "Opening server %s" server) | 772 | (message "Opening server %s" server) |
| 770 | (apply | 773 | (apply |
| @@ -1414,15 +1417,22 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." | |||
| 1414 | (while (not (eobp)) | 1417 | (while (not (eobp)) |
| 1415 | (unless (or (eolp) (looking-at "\x0d")) | 1418 | (unless (or (eolp) (looking-at "\x0d")) |
| 1416 | (let ((header (nnheader-parse-nov))) | 1419 | (let ((header (nnheader-parse-nov))) |
| 1417 | (let ((xref (mail-header-xref header))) | 1420 | (let ((xref (mail-header-xref header)) |
| 1421 | (xscore (string-to-number (cdr (assoc 'X-Score | ||
| 1422 | (mail-header-extra header)))))) | ||
| 1418 | (when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref) | 1423 | (when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref) |
| 1419 | (push | 1424 | (push |
| 1420 | (vector | 1425 | (vector |
| 1421 | (gnus-group-prefixed-name (match-string 1 xref) srv) | 1426 | (gnus-group-prefixed-name (match-string 1 xref) srv) |
| 1422 | (string-to-number (match-string 2 xref)) 1) | 1427 | (string-to-number (match-string 2 xref)) xscore) |
| 1423 | artlist))))) | 1428 | artlist))))) |
| 1424 | (forward-line 1))) | 1429 | (forward-line 1))) |
| 1425 | (reverse artlist)) | 1430 | ;; Sort by score |
| 1431 | (apply 'vector | ||
| 1432 | (sort artlist | ||
| 1433 | (function (lambda (x y) | ||
| 1434 | (> (nnir-artitem-rsv x) | ||
| 1435 | (nnir-artitem-rsv y))))))) | ||
| 1426 | (message "Can't search non-gmane nntp groups"))) | 1436 | (message "Can't search non-gmane nntp groups"))) |
| 1427 | 1437 | ||
| 1428 | ;;; Util Code: | 1438 | ;;; Util Code: |
| @@ -1445,13 +1455,16 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." | |||
| 1445 | (cons sym (format (cdr mapping) result))) | 1455 | (cons sym (format (cdr mapping) result))) |
| 1446 | (cons sym (read-string prompt))))) | 1456 | (cons sym (read-string prompt))))) |
| 1447 | 1457 | ||
| 1448 | (defun nnir-run-query (query) | 1458 | (defun nnir-run-query (query nserver) |
| 1449 | "Invoke appropriate search engine function (see `nnir-engines'). | 1459 | "Invoke appropriate search engine function (see `nnir-engines'). |
| 1450 | If some groups were process-marked, run the query for each of the groups | 1460 | If some groups were process-marked, run the query for each of the groups |
| 1451 | and concat the results." | 1461 | and concat the results." |
| 1452 | (let ((q (car (read-from-string query))) | 1462 | (let ((q (car (read-from-string query))) |
| 1453 | (groups (nnir-sort-groups-by-server | 1463 | (groups (if (string= "all-ephemeral" nserver) |
| 1454 | (or gnus-group-marked (list (gnus-group-group-name)))))) | 1464 | (with-current-buffer gnus-server-buffer |
| 1465 | (list (list (gnus-server-server-name)))) | ||
| 1466 | (nnir-sort-groups-by-server | ||
| 1467 | (or gnus-group-marked (list (gnus-group-group-name))))))) | ||
| 1455 | (apply 'vconcat | 1468 | (apply 'vconcat |
| 1456 | (mapcar (lambda (x) | 1469 | (mapcar (lambda (x) |
| 1457 | (let* ((server (car x)) | 1470 | (let* ((server (car x)) |
| @@ -1551,6 +1564,44 @@ artitem (counting from 1)." | |||
| 1551 | value) | 1564 | value) |
| 1552 | nil)) | 1565 | nil)) |
| 1553 | 1566 | ||
| 1567 | (defun nnir-get-active (srv) | ||
| 1568 | (let ((method (gnus-server-to-method srv)) | ||
| 1569 | groups) | ||
| 1570 | (gnus-request-list method) | ||
| 1571 | (with-current-buffer nntp-server-buffer | ||
| 1572 | (let ((cur (current-buffer)) | ||
| 1573 | name) | ||
| 1574 | (goto-char (point-min)) | ||
| 1575 | (unless (string= gnus-ignored-newsgroups "") | ||
| 1576 | (delete-matching-lines gnus-ignored-newsgroups)) | ||
| 1577 | ;; We treat NNTP as a special case to avoid problems with | ||
| 1578 | ;; garbage group names like `"foo' that appear in some badly | ||
| 1579 | ;; managed active files. -jh. | ||
| 1580 | (if (eq (car method) 'nntp) | ||
| 1581 | (while (not (eobp)) | ||
| 1582 | (ignore-errors | ||
| 1583 | (push (cons | ||
| 1584 | (mm-string-as-unibyte | ||
| 1585 | (buffer-substring | ||
| 1586 | (point) | ||
| 1587 | (progn | ||
| 1588 | (skip-chars-forward "^ \t") | ||
| 1589 | (point)))) | ||
| 1590 | (let ((last (read cur))) | ||
| 1591 | (cons (read cur) last))) | ||
| 1592 | groups)) | ||
| 1593 | (forward-line)) | ||
| 1594 | (while (not (eobp)) | ||
| 1595 | (ignore-errors | ||
| 1596 | (push (mm-string-as-unibyte | ||
| 1597 | (let ((p (point))) | ||
| 1598 | (skip-chars-forward "^ \t\\\\") | ||
| 1599 | (setq name (buffer-substring (+ p 1) (- (point) 1))) | ||
| 1600 | (gnus-group-full-name name method))) | ||
| 1601 | groups)) | ||
| 1602 | (forward-line))))) | ||
| 1603 | groups)) | ||
| 1604 | |||
| 1554 | ;; The end. | 1605 | ;; The end. |
| 1555 | (provide 'nnir) | 1606 | (provide 'nnir) |
| 1556 | 1607 | ||
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index d72473527df..c39dd054557 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -286,7 +286,9 @@ redirects somewhere else." | |||
| 286 | (aref (char-category-set (following-char)) ?>))) | 286 | (aref (char-category-set (following-char)) ?>))) |
| 287 | (backward-char 1)) | 287 | (backward-char 1)) |
| 288 | (while (and (>= (setq count (1- count)) 0) | 288 | (while (and (>= (setq count (1- count)) 0) |
| 289 | (aref (char-category-set (following-char)) ?>)) | 289 | (aref (char-category-set (following-char)) ?>) |
| 290 | (aref fill-find-break-point-function-table | ||
| 291 | (following-char))) | ||
| 290 | (forward-char 1))) | 292 | (forward-char 1))) |
| 291 | (when (eq (following-char) ? ) | 293 | (when (eq (following-char) ? ) |
| 292 | (forward-char 1)) | 294 | (forward-char 1)) |