l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2002 Oct 06 10:15

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] two mutt questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] two mutt questions



I just sent a message to vox-tech that exactly quoted somebody else's
post but didn't contribute anything of my own. I appologize.

I'm writing a shell script whose purpose it is to reply to individual
messages from a vox or vox-tech digest. The script (which lives as
$HOME/bin/vox is meant to be invoked from mutt using the keystrokes
"|vox 10" where 10 is the number in the digest of the message to which I
want to respond. I've got the text matching stuff working correctly, but
I had a couple of questions about mutt.



The first (which explains the message for which I am appologizng) is
that the script worked fine until the 'mutt' line. When mutt ran, it
just up and sent the message without giving me a chance to edit the
message. 

Running a similar command from an interactive shell would give
me a chance to edit the message before sending it. I tried using the
construction "mutt ... < `tty`", but when running in the script, `tty`
returns "not a tty" and so I can't make mutt read input from the tty.

How can I make mutt show its face when invoked from this shell script?
(Remember, the script itself reads the full text of the original digest
from STDIN).



The second question: when I get the script working, I'd like to rebind
the r key (for reply) when I'm viewing vox and vox-tech digests (and only
when I'm viewing these digests) so that instead of replying by default,
it instead types "|vox " and waits for me to input the message number and
hit return. Is there a way I can do this?



A third queston: I've written several good shell scripts for mutt, but I
also use Mozilla mail as a mail client. Any way to convince it to pipe
messages through shell scripts?


###################shell script $HOME/bin/vox starts on next line
#!/bin/tcsh

set FNAME=/tmp/vox_digest_reply-`date +%m.%d.%Y-%H.%M.%S`

awk '/Message: '$1'/,/--__--__--/{print "> "$0}' > $FNAME
#               ^^this is the shell's $1    ^^this one is awk's $0
#                                       and it means the whole input line

set SUBJECT=`grep '^> Subject' $FNAME | head -1 | sed 's/> Subject: //'`
set TOADDR=`grep '^> Reply-To' $FNAME | head -1 | sed 's/> Reply-To: //'`

mutt $TOADDR -s "$SUBJECT" -i $FNAME

rm -f $FNAME
###################### end of script ###########################
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.