Re: send-hook and subject

2002-08-21 Thread Fernan Aguero

+[ Asi hablaba Aaron Schrab ([EMAIL PROTECTED]):
|
| At 16:39 -0300 20 Aug 2002, Fernan Aguero [EMAIL PROTECTED] wrote:
|Is it possible to use a send hook to set the subject?
| 
| No.  To quote the manual:
| 
| ] Note: the send-hook's are only executed ONCE after getting the initial
| ] list of recipients.  Adding a recipient after replying or editing the
| ] message will NOT cause any send-hook to be executed.  Also note that
| ] my_hdr commands which modify recipient headers, or the message's
| ] subject, don't have any effect on the current message when executed
| ] from a send-hook.
|
+]

Thanks Martin and Aaron.

Setting/unsetting autoedit does not help. I had already tried that,
and edit_headers also ... 

Seems that it is not possible. I will stop experimenting.

Still I'm curious why once in a very while, the subject will get set
by the send hook ... a bug?

Thanks for your reply,

Fernan

-- 

F e r n a n   A g u e r o
http://genoma.unsam.edu.ar/~fernan

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GS d- s:+ a C++ BU++ P+++ 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--



Re: send-hook and subject

2002-08-21 Thread Martin Karlsson

* Fernan Aguero [EMAIL PROTECTED] [2002-08-21 10.51 -0300]:
 
This is weird. I have 'unset autoedit' in my muttrc, and the
send-hook 'send-hook @visit\.se$ my_hdr Subject: shazam! 

However, it doesn't work unless I specifically type
:unset autoeditenter
in mutt.

Strange. Is this just me? Can anyone verify this?


-- 
  _ Martin Karlsson
 ( )
  \ ASCII Ribbon Campaign
 / \Against HTML and proprietary attachments in e-mail



msg30410/pgp0.pgp
Description: PGP signature


send-hook and subject

2002-08-20 Thread Fernan Aguero

 Send-Hooks, and the Subject, revisited.
 ___

  I have asked a similar question before, with no clear answer.
  I will try to rephrase it. I hope that perhaps some developer
  is reading, and can say 'this is not possible' or 'it should
  be possible'. Now, the question:

  Is it possible to use a send hook to set the subject?

  My common sense tells me it is possible. However, I have
  tried several combinations of send-hooks without success.

  Examples:
  send-hook '~t ^[EMAIL PROTECTED]$' 'my_hdr Subject: [test] '
  send-hook [EMAIL PROTECTED] 'my_hdr Subject: [test] '
  ...

  This does not result in the subject line set to start with
  [test] as expected. However, and strangely enough, every one
  in a hundred messages or so (i.e. very infrequently) the subject
  line will start with [test], even though I'm not sending the 
  message to the magic incantation of [EMAIL PROTECTED] 
 
  Using 'unmy_hdr Subject' or not doesn't appear to affect
  this behaviour.
 
  Perhaps my_hdr can be used with other headers, but not with 
  the subject. I'm not a developer myself, so I cannot read 
  mutt's sources and figure this out, but I guess it should be
  possible ... right?

  I've tried several options to make mutt avoid asking for the 
  subject upon hitting 'm' to start a new message. No change.

  Upon searching google with 'unmy_hdr Subject:' I see that most
  of the hits are to documents with the words 'unmy_hdr' and 'Subject'
  not connected (not near). One document, however contains the following
  send-hook (it's from a mailing list archive):

  send-hook '[EMAIL PROTECTED]' \
  'set mime_forward ; set pgp_autosign=no ; set editor=/bin/true ; \
  my_hdr Fcc: /dev/null ; my_hdr From: [EMAIL PROTECTED] ; my_hdr Subject: spam ; \
  push y'

  However, a comment on top of the send-hook says:
  # mystery:  The subject isn't being set.   Why?!?

  We're two now.

  Any idea why the Subject header doesn't like being set this way?

  Thanks in advance,

  Fernan.

 
-- 

F e r n a n   A g u e r o
http://genoma.unsam.edu.ar/~fernan

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GS d- s:+ a C++ BU++ P+++ 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--



Re: send-hook and subject

2002-08-20 Thread Martin Karlsson

* Fernan Aguero [EMAIL PROTECTED] [2002-08-20 16.39 -0300]:
 
Hi Fernan.

   Is it possible to use a send hook to set the subject?

Yes, but you must have 'unset autoedit' in your muttrc; if not set,
there isn't any data for the send-hook to work with.

HTH
-- 
  _ Martin Karlsson
 ( )
  \ ASCII Ribbon Campaign
 / \Against HTML and proprietary attachments in e-mail



msg30386/pgp0.pgp
Description: PGP signature


Re: send-hook and subject

2002-08-20 Thread Aaron Schrab

At 16:39 -0300 20 Aug 2002, Fernan Aguero [EMAIL PROTECTED] wrote:
   Is it possible to use a send hook to set the subject?

No.  To quote the manual:

] Note: the send-hook's are only executed ONCE after getting the initial
] list of recipients.  Adding a recipient after replying or editing the
] message will NOT cause any send-hook to be executed.  Also note that
] my_hdr commands which modify recipient headers, or the message's
] subject, don't have any effect on the current message when executed
] from a send-hook.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.schrab.com/aaron/
 Besides, including std_ice_cubes.h is a fatal error on machines that
 don't have it yet.  Bad language design, there...  :-)--Larry Wall



Re: send-hook and subject

2002-08-20 Thread Martin Karlsson

* Martin Karlsson [EMAIL PROTECTED] [2002-08-21 03.02 +0200]:
 
 Yes, but you must have 'unset autoedit' in your muttrc; if not set,
 there isn't any data for the send-hook to work with.

s/unset/set

And it doesn't work if you're replying, only when you write a new
mail. I think.

-- 
  _ Martin Karlsson
 ( )
  \ ASCII Ribbon Campaign
 / \Against HTML and proprietary attachments in e-mail



msg30388/pgp0.pgp
Description: PGP signature


Re: send-hook and subject

2002-08-20 Thread Martin Karlsson

* Martin Karlsson [EMAIL PROTECTED] [2002-08-21 03.19 +0200]:
 * Martin Karlsson [EMAIL PROTECTED] [2002-08-21 03.02 +0200]:
  
  Yes, but you must have 'unset autoedit' in your muttrc; if not set,
  there isn't any data for the send-hook to work with.
 
 s/unset/set
 
 And it doesn't work if you're replying, only when you write a new
 mail. I think.

I need a vacation. Just ignore me. *sigh*

-- 
  _ Martin Karlsson
 ( )
  \ ASCII Ribbon Campaign
 / \Against HTML and proprietary attachments in e-mail



msg30389/pgp0.pgp
Description: PGP signature