On Sun, Jun 23, 2024 at 06:29:45AM +0200, Rene Kita wrote: > On Sat, Jun 22, 2024 at 11:23:40AM +0200, Walter Alejandro Iglesias wrote: > > I was lazy, I didn't take a look at the code before sending this > > suggestion. Now I tested your patch and it works, but I don't > > understand what your diff does exactly, does it tells mutt to just > > ignore the quotes? Because if this is the case it shouldn't breake the > > old behavior. > > MUTT_TOKEN_QUOTE tells mutt to tread quotes as parts of the string, from > the header: > #define MUTT_TOKEN_QUOTE (1<<3) /* don't interpret quotes */
I saw that definition yesterday. So, it's the opposite to what I intuitively thought. Confusing. > > AFAIU, this should not have undesired side effects. But I have never > read this part of the code before, I might be wrong. > Let's take this alias: alias walter '"Walter A. Iglesias" <wal...@example.com>' Without your patch: $ /usr/local/bin/mutt -d3 walter The header results: To: "' Walter A. Iglesias" <wal...@example.com>, '@localhost.localdomain The debug level 3 message: parse_alias: Second token is ''"Walter A. Iglesias" <wal...@example.com>''. With your patch: $ ~/bin/mutt -d3 walter The header results: To: "Walter A. Iglesias" <wal...@example.com> The debug level 3 message: parse_alias: Second token is '"Walter A. Iglesias" <wal...@example.com>'. Now this second example: alias walter "Walter Alejandro Iglesias <wal...@example.com>" Without your patch: $ /usr/local/bin/mutt -d3 walter The header results: To: walter@localhost.localdomain The debug level 3 message: parse_alias: Second token is '"Walter Alejandro Iglesias <wal...@example.com>"' With your patch: $ ~/bin/mutt -d3 walter The header results: To: Walter Alejandro Iglesias <wal...@example.com> The debug level 3 message: parse_alias: Second token is 'Walter Alejandro Iglesias <wal...@example.com>'. -- Walter