Customize To: field

2008-11-17 Thread steve
Hi,

Sometimes people send their message with the following headers:

From: email-address email-address

which isn't very nice in the index menu.

I would like to re-write this line as following :

From: a chosen name email-address

I tried a reply-hook in the config file for that particular recipient:

reply-hook . 'set To: a chosen name email-address'

but when I hit 'r' to reply, I see 'unknown variable' in the bottom bar
and the To: field hasn't change.


Any help would be appreciated.

Steve



Re: Customize To: field

2008-11-17 Thread Michael Elkins
On Mon, Nov 17, 2008 at 03:37:00PM +0100, steve wrote:
 Sometimes people send their message with the following headers:
 From: email-address email-address
 which isn't very nice in the index menu.
 I would like to re-write this line as following :
 From: a chosen name email-address
 I tried a reply-hook in the config file for that particular recipient:
 reply-hook . 'set To: a chosen name email-address'
 but when I hit 'r' to reply, I see 'unknown variable' in the bottom bar
 and the To: field hasn't change.

Mutt doesn't currently have any way to delete or alter the recipient
list.  What you want is *almost* what 'set reverse_alias' does, except
that reverse_alias only controls what is displayed in the index.

What does mutt-dev think about making $reverse_alias apply to replies?

me


Re: Customize To: field

2008-11-17 Thread Brendan Cully
Seems fine. Does anyone object?

On Tuesday, 18 November 2008 at 01:59, TAKAHASHI Tamotsu wrote:
 * Mon Nov 17 2008 Michael Elkins [EMAIL PROTECTED]
  What does mutt-dev think about making $reverse_alias apply to replies?
 
 It looks easy.
 I don't set $reverse_alias though.
 

 diff -r 8199185fa595 send.c
 +++ b/send.c  Tue Nov 18 01:53:21 2008 +0900
 @@ -192,11 +192,23 @@
char buf[HUGE_STRING];
char *err = NULL;
int idna_ok = 0;
 +  ADDRESS *rev, *i;

do
{
  buf[0] = 0;
  mutt_addrlist_to_local (*a);
 +if (option (OPTREVALIAS))
 +{
 +  for (i = *a; i; i = i-next)
 +  {
 + if ((rev = alias_reverse_lookup (i))  rev-personal)
 + {
 +   FREE (i-personal);
 +   i-personal = safe_strdup (rev-personal);
 + }
 +  }
 +}
  rfc822_write_address (buf, sizeof (buf), *a, 0);
  if (mutt_get_field (field, buf, sizeof (buf), M_ALIAS) != 0)
return (-1);



Re: Customize To: field

2008-11-17 Thread Michael Elkins
On Mon, Nov 17, 2008 at 09:32:52PM -0800, Brendan Cully wrote:
 Seems fine. Does anyone object?

I think this makes sense.  The user is already requesting that it be displaying 
this way in the index, so it should
not be a problem to display it this way when replying.

me


Re: Customize To: field

2008-11-17 Thread Anders Karlsson
* Michael Elkins [EMAIL PROTECTED] [20081118 06:47]:
 On Mon, Nov 17, 2008 at 09:32:52PM -0800, Brendan Cully wrote:
  Seems fine. Does anyone object?
 
 I think this makes sense.  The user is already requesting that it be
 displaying this way in the index, so it should not be a problem to
 display it this way when replying. 
 
 me

Will this patch apply to 1.5.18 and will it be included in 1.5.19?
Also, when is 1.5.19 due? :)

Thanks!

-- 
Anders Karlsson [EMAIL PROTECTED]
All-Round Linux Tinkerer  RHCE