[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: problems with links to MH mails.
From: |
Steven Lumos |
Subject: |
[Orgmode] Re: problems with links to MH mails. |
Date: |
Tue, 27 Nov 2007 10:09:26 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (usg-unix-v) |
Pete Phillips <address@hidden> writes:
> I'm having difficulties using links within org to MH mails.
>
> For example, I have an email in a folder, and I hit ^C-l to store it.
>
> In org-mode, I hit ^C-^L to insert the link, and it gets inserted as:
>
> Link: mhe:+mail-lists/address@hidden
> Description: Email from Dale Smith: [Orgmode] Re: Linux Journal
>
> So far so good. However if I try to look at the link using ^C-^O I
> get an error message. In *Messages* it says:
>
> Executing mairix...
> mh-mairix-execute-search: Wrong type argument: listp, "<address@hidden>"
>
> It is not just mairix BTW - I had a similar problem with swish++.
>
> Any ideas ? Is this something I need to raise on the mh list or is it an
> org-mode issue ?
>
> Regards
> Pete
Here's my hack that works for mairix only. I think the real fix is
MH-E needs a better way to search for Message-ID.
(add-hook 'org-load-hook (lambda ()
(defun org-follow-mhe-link (folder article)
"Follow an MHE link to FOLDER and ARTICLE.
If ARTICLE is nil FOLDER is shown. If the configuration variable
`org-mhe-search-all-folders' is t and `mh-searcher' is pick,
ARTICLE is searched in all folders. Indexed searches (swish++,
namazu, and others supported by MH-E) will always search in all
folders."
(require 'mh-e)
(require 'mh-search)
(require 'mh-utils)
(mh-find-path)
(if (not article)
(mh-visit-folder (mh-normalize-folder-name folder))
(mh-search-choose)
(if (equal mh-searcher 'pick)
(progn
(mh-search folder (list "--message-id" article))
(when (and org-mhe-search-all-folders
(not (org-mhe-get-message-real-folder)))
(kill-this-buffer)
(mh-search "+" (list "--message-id" article))))
(mh-search "+" (list (concat "m:" article)))
(if (org-mhe-get-message-real-folder)
(mh-show-msg 1)
(kill-this-buffer)
(error "Message not found")))))))
Steve