* org-mew.el: Bug in creating links to messages marked for refile
@ 2008-11-17 10:07 Harri Kiiskinen
2008-11-17 11:17 ` More on org-mew Harri Kiiskinen
0 siblings, 1 reply; 2+ messages in thread
From: Harri Kiiskinen @ 2008-11-17 10:07 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: Text/Plain, Size: 1205 bytes --]
There's a small bug in org-mew.el, which appears when trying to store
links to messages which have been marked for refile. I try to be as
clear as possible:
First, a working case:
when storing a link to a message on an IMAP server, the result is like
this:
[[mew:UTU:%inbox#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email
from Harri Kiiskinen: test]]
which is exactly as it should be: First the link type ("mew:"), then
the mew case and the folder name ("UTU:%inbox"), and then the Message
ID. (This is a message I sent to myself.)
Link type: "mew:"
mew case: "UTU:"
folder: "‰inbox"
message id: "#20081117......"
Now, I set the refile mark on the message, and create a new link to
it. The result is:
[[mew:%2008#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email
from Harri Kiiskinen: test]]
Now, the mew case is still set to UTU, meaning that mew will refile
the message to folder UTU:%2008, but the link that is created by
org-mew-store-link does not include the case information. We have:
Link type: mew:
case: (empty)
folder: %2008
message id: (the rest)
I'm no quite able to figure where the bug might be, but I'll keep
trying.
Harri K.
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
* More on org-mew
2008-11-17 10:07 org-mew.el: Bug in creating links to messages marked for refile Harri Kiiskinen
@ 2008-11-17 11:17 ` Harri Kiiskinen
0 siblings, 0 replies; 2+ messages in thread
From: Harri Kiiskinen @ 2008-11-17 11:17 UTC (permalink / raw
To: emacs-orgmode
Hello,
some more info on my previous report on the broken links to refiled
mails in Mew.
From: Harri Kiiskinen <harri.kiiskinen@utu.fi>
Subject: org-mew.el: Bug in creating links to messages marked for refile
Date: Mon, 17 Nov 2008 12:07:51 +0200 (EET)
> Now, I set the refile mark on the message, and create a new link to
> it. The result is:
>
> [[mew:%2008#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email
> from Harri Kiiskinen: test]]
>
> Now, the mew case is still set to UTU, meaning that mew will refile
> the message to folder UTU:%2008, but the link that is created by
> org-mew-store-link does not include the case information.
This patch seems to give correct links:
---------------------------------------------------
diff --git a/lisp/org-mew.el b/lisp/org-mew.el
index 2e6cb9b..453ce30 100644
--- a/lisp/org-mew.el
+++ b/lisp/org-mew.el
@@ -76,7 +76,10 @@
(folder-name
(if (and org-mew-link-to-refile-destination
(eq mark-info ?o)) ; marked as refile
- (nth 1 (mew-refile-get msgnum))
+ (concat
+ (mew-sinfo-get-case)
+ ":"
+ (nth 1 (mew-refile-get msgnum)))
(mew-summary-folder-name)))
message-id from to subject desc link)
(save-window-excursion
--------------------------------------------------
It uses mew-sinfo-get-case, which is buffer-local (or something), so
the refile always stays in the same 'world' as the original, to use
the Mew terminology.
The links produced to a message marked for refile and to a message already
in the folder are identical, so things should be ok:
[[mew:UTU:%2008#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email from Harri Kiiskinen: test]]
[[mew:UTU:%2008#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email from Harri Kiiskinen: test]]
Another problem appears, though, and this is definitively beyond me.
Now, the problem is, that if these are closed, i.e. look like this:
Email from Harri Kiiskinen: test
I can't open either with org-open-at-point. Both tell me "Message not
found". But when the links are 'open', like this:
[[mew:UTU:%2008#20081117.115043.144292908.harri.kiiskinen@utu.fi][Email
from Harri Kiiskinen: test]
and the point is on the link text ("mew:...") itself,
org-open-at-point works nicely and opens the respective message in
Mew.
Baffled,
Harri K.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-17 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 10:07 org-mew.el: Bug in creating links to messages marked for refile Harri Kiiskinen
2008-11-17 11:17 ` More on org-mew Harri Kiiskinen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.