GNU bug report logs -
#52459
28.0.90; prin1-to-string does not escape bidi control characters despite print-escape-control-characters=t
Previous Next
Full log
Message #14 received at 52459 <at> debbugs.gnu.org (full text, mbox):
On 12/12/21 10:11 PM, Daniel Mendler wrote:
> Example packages which are affected by this issue are for example the
> Helpful package, which provides an enhanced Help buffer. Another package
> affected by the issue is the Marginalia package which adds annotations
> to `describe-variable` in the minibuffer. The annotations show the
> variable value. I would like to print the variable values in a safe way
> which does not mess up the display. Instead of "string" these packages
> show "str"gnandallthatfollowsisgarbage. How is this supposed to be done?
>
> I propose the addition of an additional variable which configures
> prin1-string such that all control characters which affect the display
> in special ways are escaped. Is there an alternative approach to achieve
> this goal?
There is actually one function which comes close in functionality -
`bidi-string-mark-left-to-right`. However this function is not really a
pure string manipulation function since it adds display properties. So
this function can only be used if the string is directly displayed as
is. The function is not a good fit if the resulting string is
manipulated further, truncated, etc.
This bug report was last modified 3 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.