Re: send-hook and my_hdr

2001-10-25 Thread Lars Becker

On Thu, Oct 11, 2001 at 02:53:29PM +0200, Thomas Roessler wrote:

 >>See that header in this mail.  That is from a send-hook. Problem 
 >>is that once that hook is activated, the header ends up in all 
 >>mails (like this one).
 >>How to fix?
 > Add a hook matching all messages which unmy_hdrs the entry in 
 > question.

That won't work in all cases. If i set unmy_hdr in a sent-hook,
all from-headers set by a folder-hook are removed too, and not
only the hooks which were set by send-hooks.

Is there any way to use folder-hooks *and* send-hooks together
to modify the From-headers in a way that i want?

Some days ago i've described this problem in greater detail
in d.c.s.mailreader.misc <[EMAIL PROTECTED]>
but got no solution for it. If somebody has a workaround i would
greatly appreciate to hear it.

Greetings
- Lars.



Re: send-hook and my_hdr

2001-10-26 Thread Lars Becker

On Fri, Oct 26, 2001 at 10:28:20AM +0200, Thomas Roessler wrote:

 >>That won't work in all cases. If i set unmy_hdr in a sent-hook,
 >>all from-headers set by a folder-hook are removed too, and not
 >>only the hooks which were set by send-hooks.
 > I'd set the $from variable from folder-hooks and use my_hdr from 
 > send-hooks to override it from case to case.

Thanks Thomas. This works great!

Greetings
 - Lars.



Re: send-hook and my_hdr

2001-10-26 Thread Lars Becker

On Thu, Oct 25, 2001 at 11:44:12PM -0700, Gary Johnson wrote:

 > folder-hook .   unhook send-hook
 > folder-hook .   'unmy_hdr From:'
 > folder-hook folder1 send-hook .  'my_hdr From: default_for_folder1'
 > folder-hook folder2 send-hook .  'my_hdr From: default_for_folder2'
 > folder-hook .   'send-hook "~t person1" "my_hdr From: for_person1"'
 > 
 > In this example, send-hooks and "my_hdr From:" settings are first
 > cleared when any folder is entered.  Then any folder-specific "my_hdr
 > From:" settings are made as default send-hooks.  Finally, any special
 > send-hooks are set, either for all folders as shown, or as a function of
 > the folder.

Thanks. It's an interesting solution. However i have sticked to
Thomas suggestion since i'm also using "set reverse_name" which
also works if i set the from-header with "set
[EMAIL PROTECTED]". Of course i haven't told you therefore you
couldn't know it.

Greetings
 - Lars.



Minor annoyance with fcc-save-hooks

2002-07-02 Thread Lars Becker

Hi all,

i've set up a lot of fcc-save-hooks to set the default folders
for certain people ("~L pattern folder").  This works quite good
if there's only one recipient in the headers or one person to whom
i send mail. If there are many recipients in the headers or me doing
a group-reply, the hook matches one (the first it seems) of them and
set the fcc or save-folder accordingly.

If i prepend the pattern with "^" then the fcc-hooks won't match
if there is more than one recipient, so the fcc's are going to my
default send-mail-folder, which is fine. The save-hook of course
also won't match and mutt will present me the default-save-folder,
which isn't the behaviour i want.

Is there any chance in a future version that the behaviour
of fcc-save-hooks with the ~L-patterns will get modified to
address this issue? I know it's possible to reach my goal if
i use save-hooks and fcc-hooks instead of fcc-save-hooks.
The disadvantage of this is clear: i (and any other mutt
user) will have to set two hooks for every correspondent.
With some 50+ correspondents in the configuration file it
becomes quite intricate.

regards
- Lars.



Trouble with macros

2002-07-02 Thread Lars Becker

Hi everybody,

i've got some problems with setting the attributions lines
in dependence of the folder and the reply-function used
(e.g. reply, group-reply and list-reply).

My goal is to set up separate attributions for replies to personal
mails (which should be personalised), for group-replies (which
of course should name the sender to whoms mail i replied) in the
adequate language - which is the problem.

The macros...

| macro index g ':set attribution="%n schrieb am %[%d.%m.%Y]:\n" \
|'
| macro index r ':set attribution="Hallo %v,\n" \
|'

... work as expected. Then i tried the following:

| folder-hook . "macro index L 'set attribution="%n schrieb \
|am %[%d.%m.%Y]:\n"'"

It doesn't work. Then after a suggestion from Rocco i tried to source
the macros from separate files:

| folder-hook . "source /home/lars/.mutt/.attributions"
| folder-hook %personal "source /home/lars/.mutt/.attributions.personal"
| folder-hook %englishlists "source /home/lars/.mutt/.attributions.english"

Again it didn't worked out as i hoped. Has anybody an idea? Is it
possible?

I tried other ways too, for example checking for multiple recipients
with a send-hook

| send-hook "~C @.+@" 'set attribution="%n schrieb am %[%d.%m.%Y]:\n"'

It doesn't do it. I guess it's because mutt checks every recipient
against the regexp and not the whole to/cc-header?

TIA.

regards,
- Lars.