Mercurial > emacs
comparison lisp/gnus/nnir.el @ 95830:4bbbc2594f0b
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1231
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 12 Jun 2008 02:43:05 +0000 |
parents | 49755ce71b9e |
children | a9dc0e7c3f2b |
comparison
equal
deleted
inserted
replaced
95829:bdb97d11d0f0 | 95830:4bbbc2594f0b |
---|---|
655 (gnus-group-read-ephemeral-group | 655 (gnus-group-read-ephemeral-group |
656 (concat "nnir:" (prin1-to-string parms)) '(nnir "") t | 656 (concat "nnir:" (prin1-to-string parms)) '(nnir "") t |
657 (cons (current-buffer) | 657 (cons (current-buffer) |
658 gnus-current-window-configuration) | 658 gnus-current-window-configuration) |
659 nil))) | 659 nil))) |
660 | |
661 (eval-when-compile | |
662 (when (featurep 'xemacs) | |
663 ;; The `kbd' macro requires that the `read-kbd-macro' macro is available. | |
664 (require 'edmacro))) | |
660 | 665 |
661 (defun nnir-group-mode-hook () | 666 (defun nnir-group-mode-hook () |
662 (define-key gnus-group-mode-map (kbd "G G") | 667 (define-key gnus-group-mode-map (kbd "G G") |
663 'gnus-group-make-nnir-group)) | 668 'gnus-group-make-nnir-group)) |
664 (add-hook 'gnus-group-mode-hook 'nnir-group-mode-hook) | 669 (add-hook 'gnus-group-mode-hook 'nnir-group-mode-hook) |
1510 (save-excursion | 1515 (save-excursion |
1511 (apply | 1516 (apply |
1512 'call-process "find" nil t | 1517 'call-process "find" nil t |
1513 "find" group "-type" "f" "-name" "[0-9]*" "-exec" | 1518 "find" group "-type" "f" "-name" "[0-9]*" "-exec" |
1514 "grep" | 1519 "grep" |
1515 `("-l" ,@(and grep-options (split-string grep-options "\\s-" t)) | 1520 `("-l" ,@(and grep-options |
1521 ;; Note: the 3rd arg of `split-string' is not | |
1522 ;; available in Emacs 21. | |
1523 (delete "" (split-string grep-options "\\s-"))) | |
1516 "-e" ,regexp "{}" "+")))) | 1524 "-e" ,regexp "{}" "+")))) |
1517 | 1525 |
1518 ;; Translate relative paths to group names. | 1526 ;; Translate relative paths to group names. |
1519 (while (not (eobp)) | 1527 (while (not (eobp)) |
1520 (let* ((path (split-string | 1528 (let* ((path (delete |
1521 (buffer-substring (point) (line-end-position)) "/" t)) | 1529 "" |
1530 (split-string | |
1531 (buffer-substring (point) (line-end-position)) "/"))) | |
1522 (art (string-to-number (car (last path))))) | 1532 (art (string-to-number (car (last path))))) |
1523 (while (string= "." (car path)) | 1533 (while (string= "." (car path)) |
1524 (setq path (cdr path))) | 1534 (setq path (cdr path))) |
1525 (let ((group (mapconcat 'identity (subseq path 0 -1) "."))) | 1535 (let ((group (mapconcat 'identity (subseq path 0 -1) "."))) |
1526 (push (vector (nnir-group-full-name group server) art 0) | 1536 (push (vector (nnir-group-full-name group server) art 0) |