Re: Customize To: field

2008-11-18 Thread David Haguenauer
* Michael Elkins [EMAIL PROTECTED], 2008-11-17 21:46:02 Mon:
 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.

I was about to suggest making the To: change conditional on the value
of a configuration variable, because reverse aliases may be used to
reply to people who don't know how to spell their own name properly,
and we may want to keep that kind of fix private.

But then I noticed that the reverse-alias name is already being used
in attribution lines, leaking the local alias to the recipient, so
that adding it to the To header as well does not change the situation
much.

So, unless someone else advocates in favor of an extra configuration
variable controlling this behavior, I guess I consider this change
acceptable.

-- 
David Haguenauer


pgpaoJnY1fAF9.pgp
Description: PGP signature


Re: Customize To: field

2008-11-18 Thread Michael Elkins
On Tue, Nov 18, 2008 at 03:48:05PM -0500, David Haguenauer wrote:
 I was about to suggest making the To: change conditional on the value
 of a configuration variable, because reverse aliases may be used to
 reply to people who don't know how to spell their own name properly,
 and we may want to keep that kind of fix private.
 
 But then I noticed that the reverse-alias name is already being used
 in attribution lines, leaking the local alias to the recipient, so
 that adding it to the To header as well does not change the situation
 much.

Excellent observation.  I did consider that someone might want the display
name to be kept private, but I imagine that use is probably a distinct
minority--most of the time its to fix the sender's address for them since
they can't seem to be bothered.  The fact that we already leak this
information it a boost to the change.

me


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