What search function to use? What function changes mailboxes?
- To: mutt-dev@xxxxxxxx
- Subject: What search function to use? What function changes mailboxes?
- From: Rafael Almeida <almeidaraf@xxxxxxxxx>
- Date: Sat, 23 Jan 2010 20:43:56 -0800 (PST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1264308236; bh=WwVyyVNRAHcZ5a+h8KmyW0yo4ecSwZU993spfWwkdlc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=toKy/yOHK99EF2+rZg+VL/vr+vzCiYTJ7PHZmI1NUNadhtq3pAvx1Gvqb6KyynTkW5jZcozMgstFAD1QR6jxgdVhocfXUC2O4N3oqkSdozvD9lzXL1prmrtkViH3R0/oVo9RCbAMwAz0SnlfniNwksmhpmACqZnJiVGSqaB1wn8=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=fo26PUM6S0cdK5/+TqizREDIV5ARhXiYzgeny6oVM+mpBpY+/siHudz+Lk+p8gyMIx1XAJsLodjK9vLZFEUy6v7IKLHzigWl2ORn1RwOxBKNu13GxYUlnFUh3yF7eWhVELshzFHjaWgiibpxS4klMrYV662I2tlHJXjL1T3x0Ko=;
- List-post: <mailto:mutt-dev@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-dev"
- Sender: owner-mutt-dev@xxxxxxxx
Hello,
I'm trying to implement a new feature that I need in order to make the most use
of my e-mail. What I want is for mutt to search the All Mail folder from gmail
imap when I use the parent-message action on an e-mail. All Mail is an imap
folder contains all the e-mail I've received and sended so far; the reason for
what I want is so that I can remove e-mails from my inbox while keeping them in
All Mail. When I get a new e-mail from a thread that's not in my inbox anymore,
I'd like to be able to retrieve the whole conversation. As far as I know the
only way to do that would be by changing mutt's code. If it's a configurable,
then I would be very happy to know how to configure it :-).
In order to implement that I was looking for a function that would take a
string such as "~i message-id@xxxxxx" and give me back a HEADER. I'm kinda lost
in the flow of things. I think imap_search is what will end up being called,
but I probably need to call something higher up. I probably need to switch to
All Mail folder (before doing the search) and then switch back, is that
correct? If so, what functions should I look at? Is there a developer manual
somewhere I didn't look?
I want to implement it like this:
1. User press P
2. Take the message-id from the current message
3. Look All Mail for that message-id
4. Do the normal algorithm for getting the parent on All Mail folder
5. Copy the parent to inbox folder
6. Do again the normal algorithm for getting the parent, but this time on
Inbox
I know message-id is set by the sender of the email and could be non-unique,
but I don't know of a better identifier than that. Worst that could happen is
not being able to retrieve the parent e-mail for some thread.
[]'s
Rafael