Hi Walter, On Sat, Jun 22, 2024 at 10:36:52AM GMT, Rene Kita wrote: > On Sat, Jun 22, 2024 at 07:13:16AM +0200, Walter Alejandro Iglesias wrote: > > Traditional mailx (bsd versions and GNU mailutils) needs this syntax for > > aliases: > > > > alias john "John Dou <jo...@example.com>"
How about addresses that themselves contain quotes, such as "John R. Doe" <j...@example.com>? A lot of existing software requires quoting the name when it contains '.'. What does BSD or GNU mailutils with those? Does it use single quotes or what? Such as '"John R. Doe" <j...@example.com>' ? Have a lovely day! Alex > > > > With full addresses, since they contain spaces, you need to enclose them > > in quotes. Any unix user would tend to add those quotes since there are > > three fields there, not five. > > > > If you add those quotes in a mutt aliases file, mutt doesn't recognize > > that alias. This is an inconsistency. And an inconvenience, since it > > forces you to use two aliases files, one for mail(1) and another one for > > mutt. > > > > It would be logical to add mutt compatibility for this case and even > > more convenient if mutt added those quotes when generating aliases. > > Sounds reasonable. Allowing to read quoted aliases seems pretty straight > forward, see the patch below. Of course we might break some ones > existing aliases, so this might be better enabled via a new option. > > If it is a new option, should this also determine how we write it? Then > the option should probably make one style mandatory. I'm not sure if > this is worth the trouble. > > --- > diff --git a/init.c b/init.c > index c84815c2..a398ec90 100644 > --- a/init.c > +++ b/init.c > @@ -1661,7 +1661,7 @@ static int parse_alias (BUFFER *buf, BUFFER *s, union > pointer_long_t udata, BUFF > mutt_set_current_menu_redraw_full (); > } > > - mutt_extract_token (buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | > MUTT_TOKEN_SEMICOLON); > + mutt_extract_token (buf, s, MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON); > dprint (3, (debugfile, "parse_alias: Second token is '%s'.\n", > buf->data)); > -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature