[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] planner-rmail bugs
From: |
fouvry+emacs-wiki |
Subject: |
[emacs-wiki-discuss] planner-rmail bugs |
Date: |
Fri, 2 Apr 2004 14:43:25 +0200 (CEST) |
Hi,
Some bugs in planner-rmail.el:
planner-rmail-browse-url() should only switch to the RMAIL
buffer, not get new mail first. Therefore rmail() should be
called with an argument.
I don't know the purpose of "RMAIL" in the url, but it could put
to very good use if that was the name of the RMAIL file the
message is residing in (I use several RMAIL files). Something
like
(string-match "^rmail://\\(.+\\)/\\(.+\\)" url)
and (match-string 1 url) is the file name, (match-string 2 url)
the message-id. Problem is of course to decide where file name
ends. If message-ids are guaranteed not to contain slashes, one
could use this:
(string-match "^rmail://\\(.+\\)/\\([^/ \t\n]+\\)" url)
([ \t\n] is not as complete as \s-, but it should be sufficient.)
Unfortunately, nothing at all seems to be guaranteed about
message-ids (they're not necessarily unique for instance). In
the absence of a full file name, rmail-file-name (the primary
RMAIL file) can be used as a temporary solution.
Also:
- the call to rmail-first-message() should be put _inside_ of the
save-restriction() body, otherwise it jumps to the first
message after exiting the restriction.
- the call to rmail-show-message() should be _inside_ of the
save-restriction() body, otherwise rmail-what-message() returns
the message number from _before_ the restriction, and
rmail-show-message() puts you in a completely different
message.
- the regexp for re-search-forward() could start with "^". The
header should start at the beginning of the line, and that
might speed up the search considerably.
When I try this, there's also something calling browse-url, that
calls Mozilla which complains about the unregistered rmail
protocol. Shouldn't happen of course.
Did anyone every use this? ;-)
Cheers,
Frederik
- [emacs-wiki-discuss] planner-rmail bugs,
fouvry+emacs-wiki <=