Re: delete only undeleted messages?
* Ed Blackman [2014-02-26 20:46]: > On Wed, Feb 26, 2014 at 04:45:00PM +0100, Peter P. wrote: > > folder-hook . 'macro pager d "=Trash \r" > [...] > >Is there a way to incoorporate the status/flag of a message as > >conditional for the above key binding to only allow saving to trash if > >the message is not marked as 'deleted'? > > You might want to investigate the 'trash' patch, which is commonly > already applied to packaged versions of mutt. > http://cedricduval.free.fr/mutt/patches/#trash Thanks Ed! It seems my version of mutt (1.5.21) has the features/trash-folder compiled in, yet I didn't yet set the respective variable in the config file. Will test that and get back to this list if there is still questions open. Thank you also for hacking out the option below, which seems very cool as well! best, Peter > If you don't have the patch and don't want to build mutt to apply > it, there are not a lot of good options. The main problem is > there's no way I know of to do general conditional logic ("if > message isn't marked as deleted, save to trash, otherwise do > nothing") directly in a macro. > > The only conditional logic I know of is tag-prefix-cond, but I can't > think of a way to use that for your end. > > You can use backticks to move some of the conditional logic to a > shell script. You would need a macro that would pipe a message to > save it in a known location, then use :push with backticks to call a > program that read the email in that location, then either emitted > the command to save the message or a noop depending on whether the > email's Message-Id was in a cache. > > It would look something like this: > > macro index d 'cat > /tmp/message.txt\ > :push `/path/to/script.sh`' "Save to trash folder" > > /path/to/script.sh would: > 1) read /tmp/message.txt and extract the Message-Id > 2) check to see if the Message-Id was in the cache > 3) if not, print '=Trash' and add the Id > to the cache > > If the message was in the cache, the script would do nothing, > causing the macro to do nothing further. > > Pretty convoluted, and race-prone since you have to save the message > in a fixed location. There might be further tricks to remove that > particular limitation, but I've procrastinated enough today. > > -- > Ed Blackman Thanks Ed
Re: pin flagged messages
On Thu, Feb 27, 2014 at 02:34:29PM +0100, Mart Lubbers wrote: > Hi, > I've looked in the overwhelming and detailed documentation but couldn't > find an answer. I was wondering if it was possible to pin flagged emails > on top of the mailbox. So that mutt displays my email by date(or any > other sorting method I initialized) but always keeps my flagged as > important mails(by ^F) pinned to the top of the screen. I don't think this is possible. If you press `o' () in the index, it offers you the following choices: Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/s(p)am?: I believe what you are asking is a combination of any existing method with something like message status (in your use case, flagged). I believe that would require a patch. That said, you can easily access flagged messages in a mailbox with limiting/searching for ~F. Hope this helps, -- Suvayu Open source is the future. It sets us free.
Re: pin flagged messages
* On 27 Feb 2014, Mart Lubbers wrote: > Hi, > I've looked in the overwhelming and detailed documentation but couldn't > find an answer. I was wondering if it was possible to pin flagged emails > on top of the mailbox. So that mutt displays my email by date(or any > other sorting method I initialized) but always keeps my flagged as > important mails(by ^F) pinned to the top of the screen. You would need to use scoring for this, and to sort by score. -- David Champion • d...@bikeshed.us
Re: search in sent
* On 27 Feb 2014, vwf wrote: > > When being in the 'sent'-folder, '/' is bound to search, as documented > in '?'. When I hit '/', a search-line appears but it nevers return what > I search for: > Search for: Harry -> Not found. > but when scrolling down, Harry is on line/number 128 This is a long shot, but do you have reverse_alias set, and do you have an alias for Harry? Possibly you see Harry because it's in an alias, but is not actually in the message as part of the To: address. -- David Champion • d...@bikeshed.us
pin flagged messages
Hi, I've looked in the overwhelming and detailed documentation but couldn't find an answer. I was wondering if it was possible to pin flagged emails on top of the mailbox. So that mutt displays my email by date(or any other sorting method I initialized) but always keeps my flagged as important mails(by ^F) pinned to the top of the screen. Thanks, Mart
Re: create multipart/alternative
* On 27 Feb 2014, Sebastian Tramp wrote: > Hi mutt users, > > is it possible to create mulitpart/alternative message parts in the compose > screen? This patch adds what you need: https://bitbucket.org/dgc/mutt-dgc/raw/42d6f8d629ad3f0ceb7f4790013d3cec665d0df6/dgc.groupalts The binding for the componse menu (where you press 's' to send) combines selected attachments into a multipart/alternative group. The and bindings then allow you to change their order. > > There exists some post send filter to achieve this but they do not work in > combination with encryption (and I do not have the sent copy in my archive) > > Another idea: Is it possible to put the complete message to a tool from the > compose screen (which can parse and change it completely) and re-read it > afterwards? I thinks is would allow a lot of other feature too. I don't know offhand how you would generate the content. MIME is not that hard to write if you know the structure, but I don't know a tool off the top of my head that will generate it for you. However, if you have one: a trick I have used for things of this flavor is to: * postpone the message * open your postponed folder as a regular mutt mailbox * find the postponed message * edit the raw mesage * save * sync * go back to your regular mutt session * recall the postponed message * finish and send (It's not as hard as it looks on paper. Usually I do this when I find I've written a trmendously long message and I want to split it into two messages. In that case, after editing the message I exit without syncing in order to preserve both copies of the original, then I recall and send each copy.) -- David Champion • d...@bikeshed.us
create multipart/alternative
Hi mutt users, is it possible to create mulitpart/alternative message parts in the compose screen? I need to write text/html mails (please don't ask ...) as multipart/alternative. My idea is to write markdown with vim and then convert it to text/html and add it to the message. Currently I'm using this macro for this: macro compose 'M' "cat >~/.cache/mutt/md2html.md && cat ~/.cache/mutt/md2html.md | markdown >~/.cache/mutt/md2html.html~/.cache/mutt/md2html.html" It works fine but the html part is not included as an alternative part for the text/plain part. There exists some post send filter to achieve this but they do not work in combination with encryption (and I do not have the sent copy in my archive) Another idea: Is it possible to put the complete message to a tool from the compose screen (which can parse and change it completely) and re-read it afterwards? I thinks is would allow a lot of other feature too. Best regards Sebastian Tramp -- WebID: http://sebastian.tramp.name pgpwGyJmdp77u.pgp Description: PGP signature
Re: search in sent
On Thu, Feb 27, 2014 at 09:40:02AM +0100, bastian-muttu...@t6l.de wrote: > On 27Feb14 07:40 +0100, vwf wrote: > > I may make a mistake, but I fail to search in my sent mailbox. > > In other mailboxes, by hitting '/' I can search the adress and subject > > fields. In sent this does not work. Are there search options I am > > unaware of, or is something else the matter? I use Maildir if important. > > When beeing in search folder, what does ? show? > Is there a similar/same binding for / as in your other folders? > Like: > /search search for a regular expression When being in the 'sent'-folder, '/' is bound to search, as documented in '?'. When I hit '/', a search-line appears but it nevers return what I search for: Search for: Harry -> Not found. but when scrolling down, Harry is on line/number 128 Has .muttrc changed somewhere?; I use mutt for a very long time now (since v0.93?) and go as little as possible through working configurations...
Re: search in sent
On 27Feb14 07:40 +0100, vwf wrote: > I may make a mistake, but I fail to search in my sent mailbox. > In other mailboxes, by hitting '/' I can search the adress and subject > fields. In sent this does not work. Are there search options I am > unaware of, or is something else the matter? I use Maildir if important. When beeing in search folder, what does ? show? Is there a similar/same binding for / as in your other folders? Like: /search search for a regular expression If not, I suspect you have some hook, which reconfigures your key binding for the sent folder. -- Bastian