1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-31 20:48:37 +00:00

Improve handling of searches in org-mhe.el.

Patch by Nick Dokos.
This commit is contained in:
Carsten Dominik 2008-05-16 16:25:52 +02:00
parent 155213dc11
commit 02aa965e1d
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,7 @@
2008-05-16 Carsten Dominik <dominik@science.uva.nl> 2008-05-16 Carsten Dominik <dominik@science.uva.nl>
* org-mhe.el (org-mhe-follow-link): Improve handling of searches.
* org-publish.el (org-publish-attachment): Create publishing * org-publish.el (org-publish-attachment): Create publishing
directory if it does not yet exist. directory if it does not yet exist.

View File

@ -71,6 +71,7 @@ supported by MH-E."
(defvar mh-show-folder-buffer) (defvar mh-show-folder-buffer)
(defvar mh-index-folder) (defvar mh-index-folder)
(defvar mh-searcher) (defvar mh-searcher)
(defvar mh-search-regexp-builder)
;; Install the link type ;; Install the link type
(org-add-link-type "mhe" 'org-mhe-open) (org-add-link-type "mhe" 'org-mhe-open)
@ -194,16 +195,17 @@ folders."
(mh-find-path) (mh-find-path)
(if (not article) (if (not article)
(mh-visit-folder (mh-normalize-folder-name folder)) (mh-visit-folder (mh-normalize-folder-name folder))
(setq article (org-add-angle-brackets article))
(mh-search-choose) (mh-search-choose)
(if (equal mh-searcher 'pick) (if (equal mh-searcher 'pick)
(progn (progn
(setq article (org-add-angle-brackets article))
(mh-search folder (list "--message-id" article)) (mh-search folder (list "--message-id" article))
(when (and org-mhe-search-all-folders (when (and org-mhe-search-all-folders
(not (org-mhe-get-message-real-folder))) (not (org-mhe-get-message-real-folder)))
(kill-this-buffer) (kill-this-buffer)
(mh-search "+" (list "--message-id" article)))) (mh-search "+" (list "--message-id" article))))
(mh-search "+" article)) (mh-search "+" (funcall mh-search-regexp-builder
(list (cons 'message-id article)))))
(if (org-mhe-get-message-real-folder) (if (org-mhe-get-message-real-folder)
(mh-show-msg 1) (mh-show-msg 1)
(kill-this-buffer) (kill-this-buffer)

View File

@ -7607,7 +7607,7 @@ operation has put the subtree."
(apply (apply
'completing-read prompt 'completing-read prompt
(lambda (string predicate &optional flag) (lambda (string predicate &optional flag)
(let (rtn r s (l (length string))) (let (rtn r s f (l (length string)))
(cond (cond
((eq flag nil) ((eq flag nil)
;; try completion ;; try completion