Re: dynamic headers

2000-02-08 Thread David T-G

David --

...and then David Petrou said...
% 
% the only problem is that after i finish writing a message and am
% presented with the compose menu, i do not see my new header.  is there
% a way to add header types that are shown at the compose menu, so that
% i can see what my dynamic header is before sending a message?

IIRC I was able to see my new header, so try setting up your .muttrc with
the simple `` method and see if that puts 'em in.  You might also try
turning on edit_hdrs, since I *know* that I was able to selectively
delete the headers from emails that didn't want them...


% 
% thanks,
% david


:-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.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001.  There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: dynamic headers

2000-02-08 Thread David Petrou

 IIRC I was able to see my new header, so try setting up your .muttrc with
 the simple `` method and see if that puts 'em in.

Nope.  That doesn't work either.

 You might also try turning on edit_hdrs, since I *know* that I was
 able to selectively delete the headers from emails that didn't want
 them...

This does work.  I do see my custom header with edit_headers.  But I
don't really like edit_headers.  It would be great if I could see the
header after composing my message.

 David T-G   * It's easier to fight for one's principles

david



Re: dynamic headers

2000-02-07 Thread Mikko Hänninen

David Petrou [EMAIL PROTECTED] wrote on Mon, 07 Feb 2000:
 is it possible to have a dynamic my_hdr?  i want to add a line to the
 header of my outgoing email, but i want the line to be generated
 dynamically.


I'm not sure if you can do it with a simple call to my_hdr (I doubt
that), but it should be possible to have something like:

  send-hook . 'my_hdr Reply-To: `your_perl_script.pl`'

... which will execute the above hook command for every new email.  If
you get the quoting level right, the command in the backtics (`) will be
re-invoked for each email, giving you a different output for each email.
Note that the above may not be the right level of quoting, I didn't test
it in any way, you may need to experiment a bit to get it working.

Also remember that the script needs to print out a \n at the end, or
Mutt won't recognize the output.


Hope this helps,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
Woe unto them that rise up early in the morning -- Isaiah 5:11



Re: dynamic headers

2000-02-07 Thread David T-G

David --

...and then Mikko Hänninen said...
% David Petrou [EMAIL PROTECTED] wrote on Mon, 07 Feb 2000:
%  is it possible to have a dynamic my_hdr?  i want to add a line to the
%  header of my outgoing email, but i want the line to be generated
%  dynamically.
% 
% I'm not sure if you can do it with a simple call to my_hdr (I doubt
% that), but it should be possible to have something like:
% 
%   send-hook . 'my_hdr Reply-To: `your_perl_script.pl`'

It sure is.


% 
% ... which will execute the above hook command for every new email.  If
% you get the quoting level right, the command in the backtics (`) will be
% re-invoked for each email, giving you a different output for each email.

That's the trick, in fact.


% Note that the above may not be the right level of quoting, I didn't test
% it in any way, you may need to experiment a bit to get it working.

  send-hook .   my_hdr X-Wedding-Date: 94/01/15-19:30
  send-hook .   'my_hdr X-Wedding-Time: `wed.one`'

You got it right, Mikko.  See the example from my .muttrc (which I'm no
longer using, BTW, which is why you don't see it in these headers).  The
Date never changes, so I can set that statically.  The Time, however,
should be updated freshly with every new email, so I put it in '' to make
it evaluate at call time.  [Without, wed.one gets run only when I start
mutt or otherwise source my.muttrc file.]


% 
% Also remember that the script needs to print out a \n at the end, or
% Mutt won't recognize the output.
% 
% 
% Hope this helps,

What he said :-)


% Mikko
% -- 
% // Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
% // The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
% // Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
% Woe unto them that rise up early in the morning -- Isaiah 5:11


:-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.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001.  There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature