Re: mutt/1911: macro expansion produces "editor" function instead of literal string when using "^A" (caret + character) in input lines for ctrl-chars bound in "editor" keymap
The following reply was made to PR mutt/1911; it has been noted by GNATS.
From: Rado S <rado@xxxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/1911: macro expansion produces "editor" function instead of
literal string when using "^A" (caret + character) in input lines for
ctrl-chars bound in "editor" keymap
Date: Sat, 27 Aug 2005 15:00:35 +0200
[=3D- Takahashi Tamotsu wrote on Sat 27.Aug'05 at 6:16:56 +0200 -=3D]
> Rado, read init.c.
> You can use "^^" for literal "^".
> So the problem is, "Should this be documented?"
>=20
> | else if (ch =3D=3D '^' && (flags & M_TOKEN_CONDENSE))
> | { ...
> | ch =3D *tok->dptr++;
> | if (ch =3D=3D '^')
> | mutt_buffer_addch (dest, ch);
> | ...
> | else if (isalpha ((unsigned char) ch))
> | mutt_buffer_addch (dest, toupper ((unsigned char) ch) - '@');
> | else
> | {
> | mutt_buffer_addch (dest, '^');
> | mutt_buffer_addch (dest, ch);
> | }
> | }
Tamo hi, haven't seen you for a while.
Thank you for this hint (grep "'^'" *.c would have been my next
step ;).
Now, is there really need for this behaviour?
There shouldn't be many valid reasons to use CTRL-chars in mutt
except for binding, and for the exceptions you still have the
\c notation, which is well documented for bindings, but should be
phrased to be generally valid, maybe with an extra paragraph in
the "Syntax" section.
Therefore let's _not_ have this _current_ behaviour documented but
change it to allow literal "^X" go through for regexp which is
intuitively expected to work, and \c be better documented.
Pro '^^' arguments?
--=20
=A9 Rado S. -- So much to do, but too little time to take care of it all.