aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Cohen2010-11-11 02:10:07 +0000
committerKatsumi Yamaoka2010-11-11 02:10:07 +0000
commit67a3b17cf1de50dee71e2284baea6fa4303ff743 (patch)
treef89daf3ebfa21b7e6ed79567f284455426a66f7a
parent9c1d3f983ff0ecf2159e3601faa37410dd8d8be8 (diff)
downloademacs-67a3b17cf1de50dee71e2284baea6fa4303ff743.tar.gz
emacs-67a3b17cf1de50dee71e2284baea6fa4303ff743.zip
nnir.el (nnir-request-move-article): fix to provide original group and subject.
nnir.el (nnir-warp-to-article): don't fail on articles whose headers haven't been retrieved. gnus-sum.el (gnus-summary-move-article): use original group and subject for virtual articles such as those in an nnir summary buffer.
-rw-r--r--lisp/gnus/ChangeLog10
-rw-r--r--lisp/gnus/gnus-sum.el17
-rw-r--r--lisp/gnus/nnir.el19
3 files changed, 35 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index ef0d6037152..a9cb50e8036 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,13 @@
12010-11-11 Andrew Cohen <cohen@andy.bu.edu>
2
3 * nnir.el (nnir-request-move-article): fix to provide original group
4 and subject.
5 (nnir-warp-to-article): don't fail on articles whose headers haven't
6 been retrieved.
7
8 * gnus-sum.el (gnus-summary-move-article): use original group and
9 subject for virtual articles such as those in an nnir summary buffer.
10
12010-11-11 Katsumi Yamaoka <yamaoka@jpl.org> 112010-11-11 Katsumi Yamaoka <yamaoka@jpl.org>
2 12
3 * gnus-art.el (article-treat-non-ascii): Make it work for XEmacs (at 13 * gnus-art.el (article-treat-non-ascii): Make it work for XEmacs (at
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 97155100da3..9729480d902 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1310,6 +1310,7 @@ the normal Gnus MIME machinery."
1310(defvar gnus-article-decoded-p nil) 1310(defvar gnus-article-decoded-p nil)
1311(defvar gnus-article-charset nil) 1311(defvar gnus-article-charset nil)
1312(defvar gnus-article-ignored-charsets nil) 1312(defvar gnus-article-ignored-charsets nil)
1313(defvar gnus-article-original-subject nil)
1313(defvar gnus-scores-exclude-files nil) 1314(defvar gnus-scores-exclude-files nil)
1314(defvar gnus-page-broken nil) 1315(defvar gnus-page-broken nil)
1315 1316
@@ -1335,6 +1336,7 @@ the normal Gnus MIME machinery."
1335(defvar gnus-current-copy-group nil) 1336(defvar gnus-current-copy-group nil)
1336(defvar gnus-current-crosspost-group nil) 1337(defvar gnus-current-crosspost-group nil)
1337(defvar gnus-newsgroup-display nil) 1338(defvar gnus-newsgroup-display nil)
1339(defvar gnus-newsgroup-original-name nil)
1338 1340
1339(defvar gnus-newsgroup-dependencies nil) 1341(defvar gnus-newsgroup-dependencies nil)
1340(defvar gnus-newsgroup-adaptive nil) 1342(defvar gnus-newsgroup-adaptive nil)
@@ -9703,6 +9705,10 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
9703 articles) 9705 articles)
9704 (while articles 9706 (while articles
9705 (setq article (pop articles)) 9707 (setq article (pop articles))
9708 (let ((gnus-newsgroup-original-name gnus-newsgroup-name)
9709 (gnus-article-original-subject
9710 (mail-header-subject
9711 (gnus-data-header (assoc article (gnus-data-list nil))))))
9706 (setq 9712 (setq
9707 art-group 9713 art-group
9708 (cond 9714 (cond
@@ -9781,7 +9787,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
9781 action 9787 action
9782 (gnus-data-header 9788 (gnus-data-header
9783 (assoc article (gnus-data-list nil))) 9789 (assoc article (gnus-data-list nil)))
9784 gnus-newsgroup-name nil 9790 gnus-newsgroup-original-name nil
9785 select-method))) 9791 select-method)))
9786 (t 9792 (t
9787 (let* ((pto-group (gnus-group-prefixed-name 9793 (let* ((pto-group (gnus-group-prefixed-name
@@ -9877,13 +9883,16 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
9877 article gnus-newsgroup-name (current-buffer) t))) 9883 article gnus-newsgroup-name (current-buffer) t)))
9878 9884
9879 ;; run the move/copy/crosspost/respool hook 9885 ;; run the move/copy/crosspost/respool hook
9886 (let ((header (gnus-data-header
9887 (assoc article (gnus-data-list nil)))))
9888 (mail-header-set-subject header gnus-article-original-subject)
9880 (run-hook-with-args 'gnus-summary-article-move-hook 9889 (run-hook-with-args 'gnus-summary-article-move-hook
9881 action 9890 action
9882 (gnus-data-header 9891 (gnus-data-header
9883 (assoc article (gnus-data-list nil))) 9892 (assoc article (gnus-data-list nil)))
9884 gnus-newsgroup-name 9893 gnus-newsgroup-original-name
9885 to-newsgroup 9894 to-newsgroup
9886 select-method)) 9895 select-method)))
9887 9896
9888 ;;;!!!Why is this necessary? 9897 ;;;!!!Why is this necessary?
9889 (set-buffer gnus-summary-buffer) 9898 (set-buffer gnus-summary-buffer)
@@ -9903,7 +9912,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
9903 9912
9904 (gnus-kill-buffer copy-buf) 9913 (gnus-kill-buffer copy-buf)
9905 (gnus-summary-position-point) 9914 (gnus-summary-position-point)
9906 (gnus-set-mode-line 'summary))) 9915 (gnus-set-mode-line 'summary))))
9907 9916
9908(defun gnus-summary-copy-article (&optional n to-newsgroup select-method) 9917(defun gnus-summary-copy-article (&optional n to-newsgroup select-method)
9909 "Copy the current article to some other group. 9918 "Copy the current article to some other group.
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index ae6b903c047..30ffea9dac9 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -548,8 +548,6 @@ result, `gnus-retrieve-headers' will be called instead.")
548 ;; in nnir group 548 ;; in nnir group
549 (when novitem 549 (when novitem
550 (mail-header-set-number novitem art) 550 (mail-header-set-number novitem art)
551 (mail-header-set-from novitem
552 (mail-header-from novitem))
553 (mail-header-set-subject 551 (mail-header-set-subject
554 novitem 552 novitem
555 (format "[%d: %s/%d] %s" 553 (format "[%d: %s/%d] %s"
@@ -595,7 +593,13 @@ result, `gnus-retrieve-headers' will be called instead.")
595 (to-newsgroup (nth 1 accept-form)) 593 (to-newsgroup (nth 1 accept-form))
596 (to-method (gnus-find-method-for-group to-newsgroup)) 594 (to-method (gnus-find-method-for-group to-newsgroup))
597 (from-method (gnus-find-method-for-group artfullgroup)) 595 (from-method (gnus-find-method-for-group artfullgroup))
598 (move-is-internal (gnus-server-equal from-method to-method))) 596 (move-is-internal (gnus-server-equal from-method to-method))
597 (artsubject (mail-header-subject
598 (gnus-data-header
599 (assoc article (gnus-data-list nil))))))
600 (setq gnus-newsgroup-original-name artfullgroup)
601 (string-match "^\\[[0-9]+:.+/[0-9]+\\] " artsubject)
602 (setq gnus-article-original-subject (substring artsubject (match-end 0)))
599 (gnus-request-move-article 603 (gnus-request-move-article
600 artno 604 artno
601 artfullgroup 605 artfullgroup
@@ -604,11 +608,12 @@ result, `gnus-retrieve-headers' will be called instead.")
604 last 608 last
605 (and move-is-internal 609 (and move-is-internal
606 to-newsgroup ; Not respooling 610 to-newsgroup ; Not respooling
607 (gnus-group-real-name to-newsgroup))) ; Is this move internal 611 (gnus-group-real-name to-newsgroup)))))
608 ))
609 612
610(deffoo nnir-warp-to-article () 613(deffoo nnir-warp-to-article ()
611 (let* ((cur (gnus-summary-article-number)) 614 (let* ((cur (if (> (gnus-summary-article-number) 0)
615 (gnus-summary-article-number)
616 (error "This is not a real article.")))
612 (gnus-newsgroup-name (nnir-artlist-artitem-group nnir-artlist cur)) 617 (gnus-newsgroup-name (nnir-artlist-artitem-group nnir-artlist cur))
613 (backend-number (nnir-artlist-artitem-number nnir-artlist cur))) 618 (backend-number (nnir-artlist-artitem-number nnir-artlist cur)))
614 (gnus-summary-read-group-1 gnus-newsgroup-name t t gnus-summary-buffer 619 (gnus-summary-read-group-1 gnus-newsgroup-name t t gnus-summary-buffer
@@ -1475,7 +1480,7 @@ artitem (counting from 1)."
1475 (let ((server (gnus-group-server var))) 1480 (let ((server (gnus-group-server var)))
1476 (if (assoc server value) 1481 (if (assoc server value)
1477 (nconc (cdr (assoc server value)) (list var)) 1482 (nconc (cdr (assoc server value)) (list var))
1478 (push (cons (gnus-group-server var) (list var)) value)))) 1483 (push (cons server (list var)) value))))
1479 value) 1484 value)
1480 nil)) 1485 nil))
1481 1486