Re: [semi-OT] bash complete a la tcsh
* David T-G [EMAIL PROTECTED] [2002-07-05 00:08]: In tcsh, as discussed on the list quite a while back, one can construct a command to complete mutt folders as shown in the attached snippet (I watched the ideas come across and saved all of the various flavors, so I have more than just one line). Can the same thing be done in bash? I see that bash also has a complete command but the man pages are a little obtuse and I can't tell if such delightful magic is possible. I know that I sure miss it already, though! Here's a simple bash function/complete pair that is a (good?) place to begin. I've only been using bash's programmable completion for a few weeks, and I'm still pretty new at it. The gist of it is, fill the COMPREPLY array with the output of compgen; the trick is getting the correct thing into COMPREPLY, of course. There is a bug in here, somewhere; if you do mutt -f =mbtab, and have a mailbox beginning with mb, or course, it ends up with two ='s at the beginning. This doesn't happen if you define your lists with + and not =, so there's probably something special about using = as a beginning character. Another fun thing this does is give a command-line arg summary unless you are typing -f, in which case it gives you mailboxes. A good improvement would be that -atab, -itab, -Ftab, and -Htab give you file completions, and -ctab and -btab give you email address completions from your ~/.mail_aliases file. Be sure to set MBOXLIST and MUTT appropriately, BTW. _mutt() { local MBOXLIST=$HOME/.mutt/lists local MUTT=/usr/bin/mutt local mboxes cur prev mboxes=$(grep '^ *mailboxes' $MBOXLIST | sed -e s/mailboxes// | tr -d \012) COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} if [[ $prev == -f ]] then COMPREPLY=( $(compgen -W $mboxes $cur) ); else COMPREPLY=( $(compgen -W $($MUTT -h | awk '/^ *\-/{printf %s , $1}')) ) fi return 0; } complete -F _mutt -o default mutt Good luck. (darren) -- It ain't those parts of the Bible that I can't understand that bother me, it's the parts that I do understand. -- Mark Twain
postponed messages
Hi all. I'm using mutt 1.4 and folder-hooks to set from and return-path headers. The problem is that when i postpone a message and then send it, i'm loosing the return-path setup, and it's replaced by default folder-hook return-path. Is there any way to postpone a message and don't miss the return-path header? TIA -Eduardo -- Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein
Re: imap and maildirs
This muttrc doesnt work like i want it. I'm sure you can tell that. This config make my local mail look like it is being sent from one of the imap accounts. Thanks for your help. -- mailboxes ! mailboxes imap:[EMAIL PROTECTED]/INBOX 'set imap_user=user imap_pass=password realname=User Name from [EMAIL PROTECTED]' mailboxes imap:[EMAIL PROTECTED]/INBOX 'set imap_user=user imap_pass=password realname=User Name from [EMAIL PROTECTED]' mailboxes imap:[EMAIL PROTECTED]/INBOX 'set imap_user=user imap_pass=password realname=User Name from [EMAIL PROTECTED]' -- Please read the manual again. The mailboxes commant doesn't work as a hook. Look for account-hook. HTH, Michael -- It's God. No, not Richard Stallman, or Linus Torvalds, but God. (By Matt Welsh) PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: [semi-OT] bash complete a la tcsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you come up with some completions that work well, you might consider contributing them to this project: http://freshmeat.net/projects/bashcompletion/ - -- [!] Justin R. Miller [EMAIL PROTECTED] Encrypted email preferred (key 0xC9C40C31) Mutt/GnuPG guide at http://codesorcery.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9Jadk94d6K8nEDDERArrNAKCGuqQboyaYB8Bi7CnWCEZyFzoo1wCgkaL4 psFDIx/0ehrZg5ocP1CBq6A= =RMgV -END PGP SIGNATURE-
Re: Mutt users ml downloadable archives
Alain -- ...and then Alain Bench said... % % Hello, Hi! % % I checked the 3 web archives of this mailing list given on Mutt's % site, but could find only online reading and searching. And that's not Yeah. Ugh. % very practical. Is there somewhere a downloadable archive, preferably in % mbox format? I haven't found it yet (that *is* one thing I like about Mailman lists, though it can be set up by any third party for any list), but I can (after having just been kicked off the mutt-users list for a week because of problems when changing servers)-: heartily endorse yahoo2mbox.pl from http://freshmeat.net/projects/yahoo2mbox/ (thanks again, Adam!). % % % Bye! Alain. HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg29390/pgp0.pgp Description: PGP signature
Re: 2 questions
On Fri, Jul 05, 2002 at 02:03:11AM -0700, [EMAIL PROTECTED] wrote: I have something that I haven't been able to figure out in mutt: I have the pager set to stop, so that it does not automatically go on to the next message. Unfortunately, this doesn't prevent falling out of the current message, you can see the end of the message, but you can't scroll backwards. Try this in your .muttrc: bind pager up previous-line bind pager down next-line -- .''`. Victor Maida - vmaida : :' : [EMAIL PROTECTED] UIN #118093678 `. `'` GnuPG Key ID D36F9126 at www.keyserver.net `- GNU/Linux User #159455 Debian User #161 -BEGIN GEEK CODE BLOCK- Version: 3.12 GG/J/CM/IT d+@d- s-:- a- C+++ UL$ PP++ L+++ E--- W++ N++ o? K w--(---) O? M V? PS+ PE++ Y PGP++ t+ 5? X+ R? tv+ b++ DI+++ D+ G e++ h r+++ y+++()** --END GEEK CODE BLOCK-- msg29391/pgp0.pgp Description: PGP signature
Signature
Hello mutt-users: Is there a way I can disable the signature in the bottom of an email when replying of forwarding an email? It's kinda dull when I have to erase it manually. -- Nelson D. Guerrero
mutt window copy/paste
Hi Folks, I'm happily learning/configuring mutt... and I ran across an interesting problem. When I copy multiple lines of text from a message I'm reading in mutt, then paste that text into a different window, all the lines are posted appended with space padding and a NL is on the end of the line at the window edge. On the other hand, if I use elm or other MUA to do the same thing, the NL is at the end of each line of text, as it should be, and not at the edge of the window, as described above. Is this a configuration problem, or...?? Ideas? deb -- If it dies, it's biology. If it blows up, it's chemistry, and if it doesn't work, it's physics. -- University bathroom graffito ô¿ô ~
Re: mutt window copy/paste (Correction)
On Fri, Jul 05, 2002 at 07:40:17PM +0200, Vincent Lefevre wrote: On Fri, Jul 05, 2002 at 10:18:01 -0700, Deb wrote: When I copy multiple lines of text from a message I'm reading in mutt, then paste that text into a different window, all the lines are post-appended with space padding and a NL is on the end of the line at the window edge. This is a FAQ. You should use a terminal that have bce support (like the Xfree86 xterm) and terminfo data that announce bce. If you use ncurses 5.2 terminfos, TERM=xterm-xfree86 and TERM=xterm-vt220 should be OK for the Xfree86 xterm. BTW, this doesn't solve all the problems. I sometimes notice trailing spaces in headers. There's more than one possibility here (including bugs, of course). For instance, the header may have been written on top of some existing blanks, and the optimization takes that into account. For xterm, the spaces that are copied via mouse-selection are from explicit writes to those positions since the last clearing operation, e.g., erase-display, erase-line. -- Thomas E. Dickey [EMAIL PROTECTED] http://invisible-island.net ftp://invisible-island.net
Re: Signature
Nelson D. Guerrero ([EMAIL PROTECTED]) muttered: Is there a way I can disable the signature in the bottom of an email when replying of forwarding an email? It's kinda dull when I have to erase it manually. Make you editor delete it for you. HTH, Michael -- Oh, I've seen copies [of Linux Journal] around the terminal room at The Labs. (By Dennis Ritchie) PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: mutt error
Hi Lee, Actually i wasn't yet on the list when isent in the question the first time and thus i didn't recceive the reply. Anyway, can you please forward those posts to me? I use Exim and not Sendmail. What permissions are supposed to be on /usr/bin/mutt_dotlock ? thanks -fiao On Thursday 04 July 2002 08:43 pm, Lee J. Moore wrote: On Thu, 04 Jul 2002, Fisayo Adeleke wrote: Hi all, I'm probably the newest member here ... anyway, i got a problem! When i try to send mails using mutt, i get the following error messages Error sending message, child exited 127 (Exec error.). When you asked this the other day, I told you to investigate the set sendmail option in muttrc and IIRC Andre Berger told you to investigate the permissions of /usr/bin/mutt_dotlock. If you missed those posts, read back and/or explain whether these posts helped. Content-Type: application/pgp-signature; charset=us-ascii; name=Attachment: 1 Content-Transfer-Encoding: 7bit Content-Description:
Re: sort threads
On Thu, Jul 04, 2002 at 11:58:09PM -0700, John Iverson wrote: * On Fri, 05 Jul 2002, Oliver Fuchs wrote: On Thu, 04 Jul 2002, Raoul Bönisch wrote: The setting set sort=subject should have no effect because it is overwritten by set sort=threads. Or am I wrong here? [...] My mail is sorted by procmail in different folders ... everything that does not match is directed to my main mbox ... here often mails arrive that do not relate to the same subject ... but I wanted them to be sorted ... so if mutt cannot find any threads it is sorting (better it should) mails by subjects ... But you can't have $sort set to two different things at the same time. If, as you say, you are doing this: set sort=subject set sort=threads set sort_aux=date ... then you're setting $sort to subject and then wiping that out and setting it to threads. You can verify the actual value by typing the following within mutt: :set ?sortenter That's what I mean. Those three lines could be cut down to two by erasing the first. Though one configuration line is little overhead. But it's less elegant. Raoul
Re: mutt error
On Fri, 05 Jul 2002, Fisayo Adeleke wrote: Hi Lee, Actually i wasn't yet on the list when isent in the question the first time and thus i didn't recceive the reply. Anyway, can you please forward those posts to me? [snip] Your original post and replies to it are archived here: http://www.mail-archive.com/mutt-users@mutt.org/msg29346.html -- Lee J. Moore [EMAIL PROTECTED] Benefit the community and reply to the list msg29400/pgp0.pgp Description: PGP signature
Re: Deleting portions of large mail folders
--FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alas! Wayne Chapeskie spake thus: On Tue, Jul 02, 2002 at 01:20:01PM -0600, Rob 'Feztaa' Park wrote: * because of the wonderful mbox-hooks, every time I leave a folder, all the mails I read are moved into the appropriate archive folder. =20 Do you have an example of how you set up the mbox-hooks automatically? I'm assuming a bunch of lines of the form mutt-hook =3Dmutt-dev =3Darchives/2002-07-mutt-dev but I'm not quite sure how to get get the year and date in there automatically, since I doubt you update your .muttrc every month. You could try this: mbox-hook =3Dinbox =3Darchives/`date +%Y-%m`-inbox But it gets better! Lets say I unsubscribe from one list and subscribe to another... I don't even have to make a new mbox-hook, or delete the old one! ;) You see, I don't have a .muttrc. I have a perl script that generates my =2Emuttrc for me, every time mutt is run. It automatically detects all my mboxes, and writes mbox hooks for them ;) --=20 Rob 'Feztaa' Park http://members.shaw.ca/feztaa/ -- Bureau Termination, Law of: When a government bureau is scheduled to be phased out, the number of employees in that bureau will double within 12 months after the decision is made. --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9JeyxPTh2iSBKeccRAoDcAJ9EwGlZajocjJB9KRrAN0/BRmvTlQCfeQBb kdG198Doc6b4HOO031Mv4ww= =ZMbu -END PGP SIGNATURE- --FCuugMFkClbJLl1L--
Re: mutt window copy/paste (Correction)
I forgot to mention that I'm using xterm-166, with terminfo xterm-color, on Solaris, Sparc. Not sure the xfree86 is appropriate for this platform? I suspect what Thomas Dickey stated is closest to the truth, that the spaces are explicit writes to those positions. And a test with both the /usr/openwin/bin/xterm and xterm-166 both show this to be the case - but ONLY when using mutt. It doesn't seem related to the window interface at all, but instead to how mutt is drawing the picture. I would consider this a bug. deb * Thomas Dickey [EMAIL PROTECTED] [2002-07-05 13:56:52 -0400]: On Fri, Jul 05, 2002 at 07:40:17PM +0200, Vincent Lefevre wrote: On Fri, Jul 05, 2002 at 10:18:01 -0700, Deb wrote: When I copy multiple lines of text from a message I'm reading in mutt, then paste that text into a different window, all the lines are post-appended with space padding and a NL is on the end of the line at the window edge. This is a FAQ. You should use a terminal that have bce support (like the Xfree86 xterm) and terminfo data that announce bce. If you use ncurses 5.2 terminfos, TERM=xterm-xfree86 and TERM=xterm-vt220 should be OK for the Xfree86 xterm. BTW, this doesn't solve all the problems. I sometimes notice trailing spaces in headers. There's more than one possibility here (including bugs, of course). For instance, the header may have been written on top of some existing blanks, and the optimization takes that into account. For xterm, the spaces that are copied via mouse-selection are from explicit writes to those positions since the last clearing operation, e.g., erase-display, erase-line. -- Thomas E. Dickey [EMAIL PROTECTED] http://invisible-island.net ftp://invisible-island.net -- If it dies, it's biology. If it blows up, it's chemistry, and if it doesn't work, it's physics. -- University bathroom graffito ô¿ô ~
Re: [semi-OT] bash complete a la tcsh
I've banged together a (reasonably) complete version of the completion stuff for bash that David T-G asked about earlier. It's attached. The only thing that doesn't seem to work for me is getting aliases from ~/.mutt/aliases (the commented out awk piece); the awk script works from the command line but goes into an infinite loop within the _mutt function. If anyone decides to try to use this, be sure to set $MBOXLISTS and $MUTT to correct values for your setup, of course. I'll look into donating it to tbe Bash Programmable Completion project next week. (darren) -- We protest things because we are too impotent to effect change. We effect change through positive action, not simply through demonstrations of intent. # vim: set ft=sh: _mutt() { local MBOXLIST=$HOME/.mutt/lists local MUTT=/usr/bin/mutt local ALIASES=$HOME/.mutt/aliases local mboxes cur prev mboxes=$(grep '^ *mailboxes' $MBOXLIST | sed -e s/mailboxes// | tr -d \012) COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} if [[ $prev == -f ]] then # Mailbox name COMPREPLY=( $(compgen -W $mboxes $cur) ); elif [[ $prev == -a ]] || [[ $prev == -F ]] || \ [[ $prev == -H ]] || [[ $prev == -i ]] then # Files: attach (-a), alternate muttrc (-F), headers (-H), include # (-i) COMPREPLY=( $(compgen -W $(echo *) $cur) ) elif [[ $prev == -m ]] then # Mailbox type: mbox, MMDF, MH, Maildir COMPREPLY=( $(compgen -W mbox MMDF MH Maildir $cur ) ) #elif [[ $prev == -b ]] || [[ $prev == -c ]] #then ## Addresses: Cc (-c) and Bcc (-b) #addresses=$(awk '$NF~/$/{gsub([],,$NF); print $NF}' $ALIASES) #COMPREPLY=( $(compgen -W $addresses $cur) ) else # Default: Mutt help (mutt -h) COMPREPLY=( $(compgen -W $($MUTT -h | awk '/^ *\-/{printf %s , $1}') $cur) ) fi return 0; } complete -F _mutt -o default mutt
Re: mutt window copy/paste (Correction)
On Fri, Jul 05, 2002 at 01:13:47PM -0700, Deb wrote: I forgot to mention that I'm using xterm-166, with terminfo xterm-color, on Solaris, Sparc. Not sure the xfree86 is appropriate for this platform? But xterm-color usually says that the terminal doesn't implement back color erase (bce). In that case, most full-screen applications will write explicit blanks, which xterm's select/paste will preserve. I suspect what Thomas Dickey stated is closest to the truth, that the spaces are explicit writes to those positions. And a test with both the /usr/openwin/bin/xterm and xterm-166 both show this to be the case - but ONLY when using mutt. It doesn't seem related to the window interface at all, but instead to how mutt is drawing the picture. I would consider this a bug. ( sure - but not in mutt or xterm ;-) deb * Thomas Dickey [EMAIL PROTECTED] [2002-07-05 13:56:52 -0400]: On Fri, Jul 05, 2002 at 07:40:17PM +0200, Vincent Lefevre wrote: On Fri, Jul 05, 2002 at 10:18:01 -0700, Deb wrote: When I copy multiple lines of text from a message I'm reading in mutt, then paste that text into a different window, all the lines are post-appended with space padding and a NL is on the end of the line at the window edge. This is a FAQ. You should use a terminal that have bce support (like the Xfree86 xterm) and terminfo data that announce bce. If you use ncurses 5.2 terminfos, TERM=xterm-xfree86 and TERM=xterm-vt220 should be OK for the Xfree86 xterm. BTW, this doesn't solve all the problems. I sometimes notice trailing spaces in headers. There's more than one possibility here (including bugs, of course). For instance, the header may have been written on top of some existing blanks, and the optimization takes that into account. For xterm, the spaces that are copied via mouse-selection are from explicit writes to those positions since the last clearing operation, e.g., erase-display, erase-line. -- Thomas E. Dickey [EMAIL PROTECTED] http://invisible-island.net ftp://invisible-island.net -- If it dies, it's biology. If it blows up, it's chemistry, and if it doesn't work, it's physics. -- University bathroom graffito ô¿ô ~ -- Thomas E. Dickey [EMAIL PROTECTED] http://invisible-island.net ftp://invisible-island.net
Re: Feature request: cross-mbox threading
Hi. On Fri 2002-07-05 at 01:36:52 +0200, Rocco Rutte wrote: * Benjamin Pflugmann [02-07-05 00:44:50 +0200] wrote: [...] I misunderstood him (completely) but one may specify a limit pattern to show only the mails of one correspondence. How? I do not think so. The work to do would not be significantly more than with one folder and threading enabled. Sure, it takes some time, but that it already does with one folder, which you suggested as work-around. Well, the code added would have to read mails from a few additional folders instead of just one. But my point was that your suggestion would have all the mails in one folder instead. I cannot see loading 3 x 1000 messages being significantly slower/faster than 1 x 3000. Or are we talking at cross-issues? I have a problem with the checks involved allthough it may be quite less. I also run mutt on a really old machine where every portion of new code makes working unnecessarily hard. Well, the behaviour would be optional. One if-case doesn't cost much in this case. You can also make mutt save the mail to the folder it was sent from. I already have in- and outgoing mails in the same folder. Don't know if that matters to the original poster. You can limit to every mail not from you. If you don't need the thread anymore, move it to the archive. Well, that is exactly the point. If I moved it to the archive and get a new message and have to look it up... [...] Currently I have a macro defined which files the message in the archive folder as mark that it has been done. I do it completely different without creating the need of such a flag on my own. I also keep a state 'done' which I nicely work around without another flag. My filter creates an archive I usually read only. A mail is considered to be 'done' if I delete it from the folder. I see my folders as a kind of temporary place. Older folders are compressed and can be read using the rr.compressed patch. Outgoing mail is saved to the same archive folder, so I have all I need in one place. If I did not misunderstand you, that is exactly what I have, except that I move the mails only after they are done. But this does not matter in this case. To repeat: New mails are filed in a seperate folder, there is also an archive folder. Outgoing mails go directly to the archive. Mails are deleted from the incoming folder, when done (and for me, also moved to the archive). And additionally, the archive is also compressed. ;-) The problem arises (or more precisly: the requested feature could be of use), when a new mail arrives, which belongs to an done thread and I have to look it up in the archive. As I said, that mainly happens only with support mails to me, so maybe you simply do not encounter this, because you do no support? This includes two things: Getting mails after a long period of time (more than a month), which continues an old thread, and people unable to quote significant context in such mails. On the other hand, I delete/file done mails at once, because I need to be able to see quickly, if there are undone mails pending. And unread would not work, because priorities often demand that I read all e-mails, but do not process the unimportant ones for some days. [...] I don't want to say that such a feature would be useless at all, I just say it's useless to me since I've organized my communication to not require such features. Or because you do not get the kind of mails I get? ;-) [...] If you find this feature that usefull, well, than start coding it... ;-) As I said initially in my first mail, I am not sure whether I agree with the original poster about the solution. I just wanted to show that the requested feature would indeed solve a problem which has no direct solution yet. Greetings, Benjamin. -- [EMAIL PROTECTED] msg29405/pgp0.pgp Description: PGP signature
mutt error
* Fisayo Adeleke [EMAIL PROTECTED] [07-05-02 13:39]: Hi Lee, Actually i wasn't yet on the list when isent in the question the first time and thus i didn't recceive the reply. Anyway, can you please forward those posts to me? I use Exim and not Sendmail. What permissions are supposed to be on /usr/bin/mutt_dotlock ? lrwxrwxrwx1 root root 27 Jan 31 20:42 /usr/bin/mutt_dotlock - /usr/local/bin/mutt_dotlock -- Patrick Shanahan Registered Linux User #207535 @ http://counter.li.org