Rocco, et al --

...and then Rocco Rutte said...
% 
% Hi,

Hello!


% 
% On Tue, Mar 26, 2002 at 03:29:58:PM -0500 David T-G wrote:
% > % The problem is the following: if I would type fast enough to send a few
% > % dozen mails a minute, I wanted to be abled to include the date and time
% 
% > Heh.  And you talk about not wanting to spam! :-)
% 
% You're lucky. I'm toooooo tired to type fast enough. ;-)

*grin*


% 
% > In general, if you set your config inside single quotes, it will be
% > evaluated at execution time (when you send the email or invoke the hook
% > or whatever) rather than read time (when you start mutt or reread your
% > muttrc file).
% 
% The following doesn't work, too:
% 
% set record='`date +/tmp/%H%M%S`'

Hmmm...

Oh, I get it -- $record is only parsed once, so it will only be set once,
no matter what.


% 
% What I thought of is that 'record' becomes a special type of 'path'
% allowing pipes. Appending '|' could cause mutt just to remember that
% string (instead of its expanded value) and evaluate it short before
% usuage.

Well, yeah, but that would require completely rewriting the code that
handles $record.  That would probably be welcomed, after all of the talk
of making fcc-save-hook able to save to a pipe so that a script can save
multiple copies of the message, but nobody has stepped up to *that* yet
and so I don't see it happening for this...


% 
% > You can see more on this if you search the archives for send-hook and
% > uptime; this typically comes up when people want their x-uptime headers
% > to be accurate to the time of the email rather than the time of the
% > mua initialization.
% 
% I'll have a look at the archive. But using hooks is not what I want.
% Just setting the variable.

That gives me an idea, though.  You could

  send-hook . 'set record="`date +/tmp/$H$M$S`"'

and then it *would* be repeatedly evaluated but not until the hook is
executed, and that should get you what you want.  Of course, you'd
probably only want to do this from within a folder-hook or a special
muttrc file.


% 
% > IIRC that would be a short section; if anything, perhaps just a note that
% > says "... and you can only do this pipe thing on the $signature variable
% > unless you see us talk about pipes on another variable".
% 
% Yepp.
% 
% Well, a while back I had this problem and (temporarily) solved it by
% using a hook which sources another file containing a my_hdr command.
% This special file was not sourced anywhere else. Seemed to work.

Yeah; I'd go that route with the send-hook above and see how it works.


% 
% ... and I thought that some more generall solutions would be
% interesting.

Interesting, to be sure, but someone has to want to code it :-)


% 
% Rocco


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!

Attachment: msg26253/pgp00000.pgp
Description: PGP signature

Reply via email to