setting firefox about:config to invoke or start mutt when clicking a mailto: link
To setup firefox to invoke mutt when clicking a mailto:; link: #1 - goto the about:config: page in firefox by placing about:config in the address bar. #2 - right click anywhere on the page and select new and then string #3 - enter the string : network.protocol-handler.app.mailto into the new string field and click OK. #4 - paste the string network.protocol-handler.app.mailto into the filter field (at the top) #5 - when that single entry appears right click on the value entry for it and select modify #6 - enter the pathname of the script you created to run mutt in some kind of xterm window. /usr/bin/mutt won't cut it. Mine is /usr/local/bin/mailtomutt which is based on a script I found on the web somewhere (sorry I have forgotten who made it but I give that person credit whoever they are.) The script is a little slow. It has 14 or so spawned processes which could be replaced by internal Bash parameter expansions. Here is script I found on the web; modified to invoke mutt under the KDE konsole terminal app: #!/bin/bash MAILTO_URL=$1 #Strip off the protocol MAIL_DATA=$(echo $MAILTO_URL | /bin/sed -s 's/^mailto://') #Get Recipient and strip it off RECIPIENT=$(echo $MAIL_DATA | cut -d? -f1 -) MAIL_DATA=$(echo $MAIL_DATA | /bin/sed -s s/^$RECIPIENT//) #Get Subject,BCC, and CC SUBJECT=$(echo $MAIL_DATA | /bin/sed -s 's/.*?subject=//' \ | /bin/sed -s 's/?.*//') BCC=$(echo $MAIL_DATA | /bin/sed -s 's/.*?bcc=//' | /bin/sed -s 's/?.*//') CC=$(echo $MAIL_DATA | /bin/sed -s 's/.*?cc=//' | /bin/sed -s 's/?.*//') # Call mutt in a term /usr/bin/konsole -e /usr/bin/mutt $RECIPIENT -b $BCC -c $CC -s $SUBJECT ## END It's very slow to pop up the mutt window, so I'm sure I'll eventually upgrade those $( echo blah | sed ) transforms to PE expressions, unless I come across a better solution in the meantime. The first goal was just to get something working so I could respond to ads on craigslist with a single click... :) Jeff Kinz. -- A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting frowned upon? Best claim by a government signatures series: (posted to a public list) IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email.
It never fails... :) Better mailto: mutt solution..
I believe I mentioned I wouldn't optimize that script I just posted if I ran across a better solution :-) Next window I opened.. http://bbs.archlinux.org/viewtopic.php?id=57446 #!/bin/bash # USAGE: # #rename this script to XXX-newterminal to start new terminal window #with cmd=XXX and args=as passed (e.g., XXX=mutt) #when cmd completes, terminal window will close. #GEOMETRY=-geometry 120x40 TERMINAL=x-terminal-emulator CMD=$(basename $0) CMD=${CMD%*-newterminal} exec $TERMINAL $GEOMETRY -e $CMD $@ END # Not tested yet but it looks promising Jeff Kinz
Re: setting firefox about:config to invoke or start mutt when
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday, April 21 at 03:21 PM, quoth jk...@kinz.org: The script is a little slow. It has 14 or so spawned processes which could be replaced by internal Bash parameter expansions. Lemme see if I can help with that. :) Here is script I found on the web; modified to invoke mutt under the KDE konsole terminal app: #!/bin/bash MAILTO_URL=$1 #Strip off the protocol MAIL_DATA=$(echo $MAILTO_URL | /bin/sed -s 's/^mailto://') MAIL_DATA=${MAILTO_URL#mailto:} #Get Recipient and strip it off RECIPIENT=$(echo $MAIL_DATA | cut -d? -f1 -) RECIPIENT=${MAIL_DATA%%\?*} MAIL_DATA=$(echo $MAIL_DATA | /bin/sed -s s/^$RECIPIENT//) MAIL_DATA=${MAIL_DATA#$RECIPIENT} #Get Subject,BCC, and CC SUBJECT=$(echo $MAIL_DATA | /bin/sed -s 's/.*?subject=//' \ | /bin/sed -s 's/?.*//') SUBJECT=${MAIL_DATA#*\?subject=} SUBJECT=${SUBJECT%%\?*} BCC=$(echo $MAIL_DATA | /bin/sed -s 's/.*?bcc=//' | /bin/sed -s 's/?.*//') BCC=${MAIL_DATA#*\?bcc=} BCC=${BCC%%\?*} CC=$(echo $MAIL_DATA | /bin/sed -s 's/.*?cc=//' | /bin/sed -s 's/?.*//') CC=${MAIL_DATA#*\?cc=} CC=${CC%%\?*} It's very slow to pop up the mutt window, so I'm sure I'll eventually upgrade those $( echo blah | sed ) transforms to PE expressions, unless I come across a better solution in the meantime. Hope I could help! The first goal was just to get something working so I could respond to ads on craigslist with a single click... :) Careful! I hear that thing is full of killers! ;) ~Kyle - -- The past isn't dead and buried. In fact, it isn't even past. -- William Faulkner -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAknuIyIACgkQBkIOoMqOI14YTQCfSNddVCJFGWHZOykRS35MPq7e mOYAoMdvifmdZdq9/VNvSYO7M4G8A6rR =/gsh -END PGP SIGNATURE-
can not go to the message I want to undelete
Dear mutt community, I accidentally used 'd' on a message and can not go back to it. I tried to use arrow keys to go back to it and use 'u' to undelete it but it just failed to do so. I have 'set delete=yes' in muttrc. So once I quit mutt, the message will be automatically deleted. I don't want this to happen. Thanks for any suggestions as to how to save this message. Regards, -- Zhengquan
Re: can not go to the message I want to undelete
:exec first-entry On Tue, Apr 21, 2009 at 07:55:45PM -0500, Zhengquan Zhang wrote: Dear mutt community, I accidentally used 'd' on a message and can not go back to it. I tried to use arrow keys to go back to it and use 'u' to undelete it but it just failed to do so. I have 'set delete=yes' in muttrc. So once I quit mutt, the message will be automatically deleted. I don't want this to happen. Thanks for any suggestions as to how to save this message. Regards, -- Zhengquan -- Kevin Beranek = GPG Key: 1024D/0x5E62AB46 2009-02-13 pgpnKho0YU8nx.pgp Description: PGP signature
Re: can not go to the message I want to undelete
* Zhengquan Zhang zhang.zhengq...@gmail.com [2009-04-21 19:58 -0500]: I accidentally used 'd' on a message and can not go back to it. I tried to use arrow keys to go back to it and use 'u' to undelete it but it just failed to do so. I have 'set delete=yes' in muttrc. So once I quit mutt, the message will be automatically deleted. I don't want this to happen. Perhaps you could simply select the message by typing its number, then 'C' to copy it, and select the current mailbox as the destination? That would result in a duplicate message existing if your undelete efforts succeed, but even if you lose the original message you'll have the copy. Regards, -- dave [ please don't CC me ]
xterm-title bug
I want to prefix this as saying I know that this is a PATCH applied by my distro and is not a part of mutt. I'm just posting this in the hopes that someone who is involved with the patch reads this list. :) Now, with that said.. I've noticed that with the patch enabled and turned on that it works great when just starting mutt with mutt, but if you pass any arguments to mutt, it does not work. For instance if I want to immediately browse my folders and type mutt -y the title is not set. :( That kind of sucks.. -- If a problem can be solved there is no use worrying about it. If it can't be solved, worrying will do no good.
Re: can not go to the message I want to undelete
On (21/04/09 21:13), David J. Weller-Fahy wrote: | To: mutt-users@mutt.org | From: David J. Weller-Fahy dave-lists-mutt-us...@weller-fahy.com | Subject: Re: can not go to the message I want to undelete | Date: Tue, 21 Apr 2009 21:13:55 -0500 | X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,RDNS_NONE | autolearn=no version=3.2.5 | | * Zhengquan Zhang zhang.zhengq...@gmail.com [2009-04-21 19:58 -0500]: | I accidentally used 'd' on a message and can not go back to it. I | tried to use arrow keys to go back to it and use 'u' to undelete it | but it just failed to do so. | | I have 'set delete=yes' in muttrc. So once I quit mutt, the message | will be automatically deleted. I don't want this to happen. | | Perhaps you could simply select the message by typing its number, then | 'C' to copy it, and select the current mailbox as the destination? That | would result in a duplicate message existing if your undelete efforts | succeed, but even if you lose the original message you'll have the copy. | Or just open another terminal, go to the right mailbox, and if you don't know the right number for the message you're worrying about, just copy them all to another directory? Once you confirm that the copy worked, close mutt, open it again, and change to whatever directory you parked the mail in? -- johnrchamp...@columbus.rr.com GPG key 1024D/99421A63 2005-01-05 EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63 gpg --keyserver subkeys.pgp.net --recv-keys 99421A63 signature.asc Description: Digital signature
Re: can not go to the message I want to undelete
On (21/04/09 22:25), Chris Jones wrote: | To: mutt-users@mutt.org | From: Chris Jones cjns1...@gmail.com | Subject: Re: can not go to the message I want to undelete | Date: Tue, 21 Apr 2009 22:25:20 -0400 | X-Spam-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,RDNS_NONE | autolearn=no version=3.2.5 | | On Tue, Apr 21, 2009 at 09:08:00PM EDT, Kevin Beranek wrote: | | :exec first-entry | | And consider changing d for delete to something less accident-prone | such as D ... Shift+d. | | Nobody I know is able to hit Shift+d by accident. Or make a trash directory and add this to your .muttrc: # Dealing with trash # http://marc.info/?l=mutt-usersm=120033080807087w=2 # Keep a copy of all messages folder-hook . 'macro index,pager d save-message~/Mail/trashenter' # Except those in the trash folder-hook ~/Mail/trash 'macro index,pager d delete-message' set confirmappend=no set confirmcreate=yes You'll have to empty the trash from time to time: add this to .bashrc: alias trash='rm -f ~/Mail/trash/cur/*' (but replacing ~/Mail/trash/cur/ with your trash directory. -- johnrchamp...@columbus.rr.com GPG key 1024D/99421A63 2005-01-05 EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63 gpg --keyserver subkeys.pgp.net --recv-keys 99421A63 signature.asc Description: Digital signature
Re: can not go to the message I want to undelete
On Wed, Apr 22, 2009 at 03:39:55AM +0200, Michael Tatge wrote: * On Tue, Apr 21, 2009 07:55PM -0500 Zhengquan Zhang (zhang.zhengq...@gmail.com) muttered: I accidentally used 'd' on a message and can not go back to it. Well there are so many ways: 1. type the message number 2. use previous-entry next-entry (bound to K/J) instead of previous-undeleted next-undeleted (arrow keys) 3. use undelte-pattern (U) 4. exit mutt instead of quit 5. use toggle-write (bound to % by default) to make the mailbox unwritable, then change to another mailbox and back. Ed signature.txt Description: Digital signature
[Solved, Thanks!] Re: can not go to the message I want to undelete
Thank you guys, Mutt community is fantastic! Regards, -- Zhengquan
Re: get mail in directory browser
On Mon, Apr 06, 2009 at 10:39:17PM -0500, Kyle Wheeler wrote: On Monday, April 6 at 09:56 PM, quoth Zhengquan Zhang: macro index,pager G ! /usr/bin/getmail -v \n Invoke getmail macro generic G ...etc... Because I accidentally destroyed my muttrc etc in synchronization with another computer, I am revisiting this post to rebuild my muttrc. I tried version 1 macro generic G shell-escape/usr/bin/getmail -venter \ Invoke Getmail in index mode it would say POP host is not defined. I use getmail to fetch mail so I don't set pop host in muttrc. But once I set all parameters for pop in muttrc. 'G' would launch mutt's internal fetch-mail function instead what I have set in the macro. in pager mode it does not either, it would say Key is not bound. Press '?' for help. I understand this because generic does not include pager mode. in browser mode it works. I tried version 2 macro index,pager,browser G shell-escape/usr/bin/getmail -v enter \ Invoke getmail this works well in 3 modes. My question would be why version 2 works in 3 modes but version 1 does not work in index mode? Thank you very much! Regards, -- Zhengquan
'folder-hook . set sort=threads' and 'set sort=threads'
Dear mutt community: This has puzzling me for quite a while, I saw in several muttrcs they use folder-hook . set sort=threads but I don't understand why they don't use set sort=threads instead. Basically they do the same thing. Is there anything I am missing here? Thanks and Regards, -- Zhengquan
Re: get mail in directory browser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday, April 21 at 10:50 PM, quoth Zhengquan Zhang: On Mon, Apr 06, 2009 at 10:39:17PM -0500, Kyle Wheeler wrote: On Monday, April 6 at 09:56 PM, quoth Zhengquan Zhang: macro index,pager G ! /usr/bin/getmail -v \n Invoke getmail macro generic G ...etc... I tried version 1 macro generic G shell-escape/usr/bin/getmail -venter \ Invoke Getmail in index mode it would say POP host is not defined. *generic* mode is like setting up the default. If there's another binding specific to index mode or pager mode or whatever mode, that other binding will override the generic mode settings. My question would be why version 2 works in 3 modes but version 1 does not work in index mode? The key bit of information that you're missing is that default keybindings also override generic keybindings. Think about it like an overlay: you have a set of keybindings for generic and you have a set of bindings for index (including the default index-specific bindings). When you're in an index and you press a key, first it checks the index layer (including all the default index bindings), and then if none is found, it checks the generic layer. By default, the G key in the index layer triggers the internal mail fetcher. Unfortunately, there's no real unbind function, so you can't force the index layer to pass G on to the generic layer. At least, that's the way that I understand it; I may be wrong. ~Kyle - -- When the people fear the government, there is tyranny; when the government fears the people, there is liberty. -- Thomas Jefferson -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAknumZIACgkQBkIOoMqOI149YwCg59lu5wqALXr3L1SRg9iXfsSr gD8AnjK3Fr8QwwYRIKJ7rXNeBs9A77Da =LGYJ -END PGP SIGNATURE-
Re: 'folder-hook . set sort=threads' and 'set sort=threads'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday, April 21 at 11:05 PM, quoth Zhengquan Zhang: This has puzzling me for quite a while, I saw in several muttrcs they use folder-hook . set sort=threads but I don't understand why they don't use set sort=threads instead. Basically they do the same thing. Is there anything I am missing here? You're assuming that you would never change the sort order manually. That hook, in essence, resets the sort order when you change folders. So if you temporarily change your sort to reverse-date and then open a new folder, the sort order will be set back to threads rather than staying reverse-date. ~Kyle - -- No one really listens to anyone else, and if you try it for a while you'll see why. -- Mignon McLaughlin -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAknumnUACgkQBkIOoMqOI146awCfWrdrYPK1zlL3Nlx9tZG/UiUn hGEAoIlUm79ciGHFRx7sf/1pZupWGE7c =44t8 -END PGP SIGNATURE-
Re: 'folder-hook . set sort=threads' and 'set sort=threads'
* On Tue, Apr 21, 2009 11:05PM -0500 Zhengquan Zhang (zhang.zhengq...@gmail.com) muttered: folder-hook . set sort=threads set sort=threads Basically they do the same thing. Is there anything I am missing here? Yes, they do the same thing - unless sort is changed by another folder-hook for some folders. What you quote is what we call a default hook. It provides the generic default case and is overwritten by the special case. For example: folder-hook . set sort=threads folder-hook +spam 'set sort=spam' When you enter the spam folder the sorting is changed to the spam rating. Now when you change to another folder you need a mechanism to change it back. Thus the default hook. Provided you had only: set sort=threads folder-hook +spam 'set sort=spam' Once mutt parses the rc file you would have sort=threads. But if you changed to the spam folder it would be sort=spam as intended. Only how do you get it back now? You don't - you need the default hook. As it is the case with all -hooks btw. HTH, Michael -- It's God. No, not Richard Stallman, or Linus Torvalds, but God. (By Matt Welsh) PGP-Key-ID: 0xDC1A44DD Jabber: init...@amessage.de