bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27122: 26.0.50; [PATCH] Add customizable to display unprintables as


From: Vasilij Schneidermann
Subject: bug#27122: 26.0.50; [PATCH] Add customizable to display unprintables as hex
Date: Mon, 29 May 2017 08:28:59 +0200
User-agent: NeoMutt/20170428-45-01e908 (1.8.2)

> Please describe the use case where this happens.

OK, I'll go into a bit more detail on my envisioned use case.  Suppose
you open a buffer just to discover that some of the bytes aren't decoded
properly.  The culprits are \344, \366 and \374.  You suspect it's
latin-1, so you open a Wikipedia page on it and find a table of its
character mapping, however it's using hexadecimal instead of octal
formatting.  Generally it seems that the world has moved on and prefers
hexadecimal over octal formatting, except for `chmod` and Emacs.  You
sigh and convert the octal to hexadecimal.  Your hunch about this being
a latin-1 issue turns out to be true.  Why can't Emacs make this easier?

> We already have quite a few related features, and I wonder whether
> you could simply use one of them.

The only one I'm aware of you could use instead is to manipulate the
display table.  This allows for the same effect, but is problematic as
there are other modes manipulating it, such as whitespace-mode.  You'd
therefore need to manipulate `standard-display-table' and
`buffer-display-table'  with an appropriate hook to cover all cases.

I consider the patch to be a cleaner solution.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]