Mercurial > emacs
comparison lisp/gnus/nnir.el @ 111872:a264bb877bc7
Merge changes made in Gnus trunk.
nnir.el (nnir-request-expire-articles): Only allow article deletion.
message.el (message-bogus-recipient-p): Set address to "" if nil.
gnus-gravatar.el (gnus-gravatar-transform-address): Fix error when email address is nil.
proto-stream.el (proto-stream-open-network-only): New function to have a way to specify non-STARTTLS upgrade connections.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sat, 11 Dec 2010 01:27:14 +0000 |
parents | f7152aa1cc94 |
children | db63bc492d85 |
comparison
equal
deleted
inserted
replaced
111871:d21197a7fc63 | 111872:a264bb877bc7 |
---|---|
686 (and move-is-internal | 686 (and move-is-internal |
687 to-newsgroup ; Not respooling | 687 to-newsgroup ; Not respooling |
688 (gnus-group-real-name to-newsgroup))))) | 688 (gnus-group-real-name to-newsgroup))))) |
689 | 689 |
690 (deffoo nnir-request-expire-articles (articles group &optional server force) | 690 (deffoo nnir-request-expire-articles (articles group &optional server force) |
691 (let ((articles-by-group (nnir-categorize | 691 (if force |
692 articles nnir-article-group nnir-article-ids)) | 692 (let ((articles-by-group (nnir-categorize |
693 not-deleted) | 693 articles nnir-article-group nnir-article-ids)) |
694 (while (not (null articles-by-group)) | 694 not-deleted) |
695 (let* ((group-articles (pop articles-by-group)) | 695 (while (not (null articles-by-group)) |
696 (artgroup (car group-articles)) | 696 (let* ((group-articles (pop articles-by-group)) |
697 (articleids (cadr group-articles)) | 697 (artgroup (car group-articles)) |
698 (artlist (sort (mapcar 'cdr articleids) '<))) | 698 (articleids (cadr group-articles)) |
699 (unless (gnus-check-backend-function 'request-expire-articles | 699 (artlist (sort (mapcar 'cdr articleids) '<))) |
700 artgroup) | 700 (unless (gnus-check-backend-function 'request-expire-articles |
701 (error "The group %s does not support article deletion" artgroup)) | 701 artgroup) |
702 (unless (gnus-check-server (gnus-find-method-for-group artgroup)) | 702 (error "The group %s does not support article deletion" artgroup)) |
703 (error "Couldn't open server for group %s" artgroup)) | 703 (unless (gnus-check-server (gnus-find-method-for-group artgroup)) |
704 (push (gnus-request-expire-articles | 704 (error "Couldn't open server for group %s" artgroup)) |
705 artlist artgroup force) | 705 (push (gnus-request-expire-articles |
706 not-deleted))) | 706 artlist artgroup force) |
707 (sort (delq nil not-deleted) '<))) | 707 not-deleted))) |
708 (sort (delq nil not-deleted) '<)) | |
709 articles)) | |
708 | 710 |
709 (deffoo nnir-warp-to-article () | 711 (deffoo nnir-warp-to-article () |
710 (let* ((cur (if (> (gnus-summary-article-number) 0) | 712 (let* ((cur (if (> (gnus-summary-article-number) 0) |
711 (gnus-summary-article-number) | 713 (gnus-summary-article-number) |
712 (error "This is not a real article."))) | 714 (error "This is not a real article."))) |
790 (if (string= criteria "") | 792 (if (string= criteria "") |
791 qstring | 793 qstring |
792 (nnir-imap-make-query | 794 (nnir-imap-make-query |
793 criteria qstring))))) | 795 criteria qstring))))) |
794 (mapc | 796 (mapc |
795 (lambda (artnum) (push (vector group artnum 100) artlist) | 797 (lambda (artnum) |
796 (setq arts (1+ arts))) | 798 (let ((artn (string-to-number artnum))) |
797 (and (car result) | 799 (when (> artn 0) |
798 (delete 0 (mapcar #'string-to-number | 800 (push (vector group artn 100) |
799 (cdr (assoc "SEARCH" | 801 artlist) |
800 (cdr result))))))) | 802 (setq arts (1+ arts))))) |
803 (and (car result) (cdr (assoc "SEARCH" (cdr result))))) | |
801 (message "Searching %s... %d matches" group arts))) | 804 (message "Searching %s... %d matches" group arts))) |
802 (message "Searching %s...done" group)) | 805 (message "Searching %s...done" group)) |
803 (quit nil)) | 806 (quit nil)) |
804 artlist)) | 807 artlist)) |
805 groups))))) | 808 groups))))) |
1579 (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) | 1582 (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) |
1580 (setq gnus-summary-line-format | 1583 (setq gnus-summary-line-format |
1581 (or nnir-summary-line-format gnus-summary-line-format)) | 1584 (or nnir-summary-line-format gnus-summary-line-format)) |
1582 (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) | 1585 (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) |
1583 (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) | 1586 (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) |
1587 (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) | |
1584 (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) | 1588 (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) |
1585 (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t))) | 1589 (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) |
1590 (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t))) | |
1586 | 1591 |
1587 | 1592 |
1588 | 1593 |
1589 ;; The end. | 1594 ;; The end. |
1590 (provide 'nnir) | 1595 (provide 'nnir) |