[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mh-e/mh-pick.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mh-e/mh-pick.el [lexbind] |
Date: |
Sat, 04 Sep 2004 05:42:54 -0400 |
Index: emacs/lisp/mh-e/mh-pick.el
diff -c emacs/lisp/mh-e/mh-pick.el:1.2.4.2 emacs/lisp/mh-e/mh-pick.el:1.2.4.3
*** emacs/lisp/mh-e/mh-pick.el:1.2.4.2 Tue Oct 14 23:39:26 2003
--- emacs/lisp/mh-e/mh-pick.el Sat Sep 4 09:22:56 2004
***************
*** 1,6 ****
;;; mh-pick.el --- make a search pattern and search for a message in MH-E
! ;; Copyright (C) 1993, 1995, 2001, 2003 Free Software Foundation, Inc.
;; Author: Bill Wohler <address@hidden>
;; Maintainer: Bill Wohler <address@hidden>
--- 1,6 ----
;;; mh-pick.el --- make a search pattern and search for a message in MH-E
! ;; Copyright (C) 1993, 1995, 2001, 2003, 2004 Free Software Foundation, Inc.
;; Author: Bill Wohler <address@hidden>
;; Maintainer: Bill Wohler <address@hidden>
***************
*** 32,37 ****
--- 32,39 ----
;;; Code:
+ (eval-when-compile (require 'mh-acros))
+ (mh-require-cl)
(require 'mh-e)
(require 'easymenu)
(require 'gnus-util)
***************
*** 44,49 ****
--- 46,54 ----
(defvar mh-searching-folder nil) ;Folder this pick is searching.
(defvar mh-searching-function nil)
+ (defconst mh-pick-single-dash '(cc date from subject to)
+ "Search components that are supported by single-dash option in pick.")
+
;;;###mh-autoload
(defun mh-search-folder (folder window-config)
"Search FOLDER for messages matching a pattern.
***************
*** 139,154 ****
(run-hooks 'mh-pick-mode-hook))
;;;###mh-autoload
- (defun mh-do-pick-search ()
- "Find messages that match the qualifications in the current pattern buffer.
- Messages are searched for in the folder named in `mh-searching-folder'.
- Add the messages found to the sequence named `search'.
-
- This is a deprecated function and `mh-pick-do-search' should be used instead."
- (interactive)
- (mh-pick-do-search))
-
- ;;;###mh-autoload
(defun mh-pick-do-search ()
"Find messages that match the qualifications in the current pattern buffer.
Messages are searched for in the folder named in `mh-searching-folder'.
--- 144,149 ----
***************
*** 260,265 ****
--- 255,267 ----
"-rbrace"))
(t (error "Unknown operator '%s' seen" (car expr)))))
+ ;; All implementations of pick have special options -cc, -date, -from and
+ ;; -subject that allow to search for corresponding components. Any other
+ ;; component is searched using option --COMPNAME, for example: `pick
+ ;; --x-mailer mh-e'. Mailutils `pick' supports this option using a certain
+ ;; kludge, but it prefers the following syntax for this purpose:
+ ;; `--component=COMPNAME --pattern=PATTERN'.
+ ;; -- Sergey Poznyakoff, Aug 2003
(defun mh-pick-regexp-builder (pattern-list)
"Generate pick search expression from PATTERN-LIST."
(let ((result ()))
***************
*** 267,275 ****
(when (cdr pattern)
(setq result `(,@result "-and" "-lbrace"
,@(mh-pick-construct-regexp
! (cdr pattern) (if (car pattern)
! (format "-%s" (car pattern))
! "-search"))
"-rbrace"))))
(cdr result)))
--- 269,286 ----
(when (cdr pattern)
(setq result `(,@result "-and" "-lbrace"
,@(mh-pick-construct-regexp
! (if (and (mh-variant-p 'mu-mh) (car pattern))
! (format "--pattern=%s" (cdr pattern))
! (cdr pattern))
! (if (car pattern)
! (cond
! ((mh-variant-p 'mu-mh)
! (format "--component=%s" (car pattern)))
! ((member (car pattern) mh-pick-single-dash)
! (format "-%s" (car pattern)))
! (t
! (format "--%s" (car pattern))))
! "-search"))
"-rbrace"))))
(cdr result)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/mh-e/mh-pick.el [lexbind],
Miles Bader <=