all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vasilij Schneidermann <v.schneidermann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27122@debbugs.gnu.org
Subject: bug#27122: 26.0.50; [PATCH] Add customizable to display unprintables as hex
Date: Mon, 29 May 2017 08:28:59 +0200	[thread overview]
Message-ID: <20170529062859.mwoveygr5oh5iphz@odonien.localdomain> (raw)
In-Reply-To: <83o9ucfl37.fsf@gnu.org>

> 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	other threads:[~2017-05-29  6:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 20:42 bug#27122: 26.0.50; [PATCH] Add customizable to display unprintables as hex Vasilij Schneidermann
2017-05-29  2:33 ` Eli Zaretskii
2017-05-29  6:28   ` Vasilij Schneidermann [this message]
2017-05-29 18:46     ` Robert Cochran
2017-05-29 19:52       ` Eli Zaretskii
2017-05-29 20:20         ` Vasilij Schneidermann
2017-05-29 23:55           ` Robert Cochran
2017-05-30  0:11             ` npostavs
2017-05-30  0:47               ` Robert Cochran
2017-05-29 19:39     ` Eli Zaretskii
2017-05-29 20:15       ` Vasilij Schneidermann
2017-05-30  6:24         ` Eli Zaretskii
2017-05-30  8:16           ` Vasilij Schneidermann
2017-05-30  8:38             ` Eli Zaretskii
2017-06-01 17:05               ` Vasilij Schneidermann
2017-06-01 18:19                 ` Eli Zaretskii
2017-05-30 12:06           ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170529062859.mwoveygr5oh5iphz@odonien.localdomain \
    --to=v.schneidermann@gmail.com \
    --cc=27122@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.