From: Eli Zaretskii <eliz@gnu.org>
To: mattiase@acm.org
Cc: 43632@debbugs.gnu.org
Subject: bug#43632: Raw bytes printed as latin-1 in echo area and *Messages*
Date: Sat, 26 Sep 2020 20:27:23 +0300 [thread overview]
Message-ID: <83tuvkphxg.fsf@gnu.org> (raw)
In-Reply-To: <83wo0gpjbj.fsf@gnu.org> (message from Eli Zaretskii on Sat, 26 Sep 2020 19:57:21 +0300)
> Date: Sat, 26 Sep 2020 19:57:21 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 43632@debbugs.gnu.org
>
> > From: Mattias Engdegård <mattiase@acm.org>
> > Date: Sat, 26 Sep 2020 18:53:39 +0200
> > Cc: 43632@debbugs.gnu.org
> >
> > --- a/lisp/simple.el
> > +++ b/lisp/simple.el
> > @@ -1797,6 +1797,7 @@ eval-expression
> > (let ((print-length (unless no-truncate eval-expression-print-length))
> > (print-level (unless no-truncate eval-expression-print-level))
> > (eval-expression-print-maximum-character char-print-limit)
> > + (print-escape-nonascii t)
> > (deactivate-mark))
> > (let ((out (if insert-value (current-buffer) t)))
> > (prog1
>
> We are going to disregard user preferences regarding escapes? For an
> obscure use case? That doesn't make too much sense to me.
I'd rather risk something like the below instead:
diff --git a/src/print.c b/src/print.c
index 0ecc98f..5d878c9 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1993,6 +1993,10 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
}
else if (print_escape_control_characters && c_iscntrl (c))
octalout (c, SDATA (obj), i_byte, size_byte, printcharfun);
+ else if (!multibyte
+ && SINGLE_BYTE_CHAR_P (c)
+ && !ASCII_CHAR_P (c))
+ printchar (BYTE8_TO_CHAR (c), printcharfun);
else
printchar (c, printcharfun);
need_nonhex = false;
next prev parent reply other threads:[~2020-09-26 17:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 12:51 bug#43632: Raw bytes printed as latin-1 in echo area and *Messages* Mattias Engdegård
2020-09-26 14:05 ` Andreas Schwab
2020-09-26 14:14 ` Eli Zaretskii
2020-09-26 14:22 ` Lars Ingebrigtsen
2020-09-26 14:26 ` Eli Zaretskii
2020-09-26 16:00 ` Mattias Engdegård
2020-09-26 16:10 ` Eli Zaretskii
2020-09-26 16:53 ` Mattias Engdegård
2020-09-26 16:57 ` Eli Zaretskii
2020-09-26 17:27 ` Eli Zaretskii [this message]
2020-09-27 10:58 ` Lars Ingebrigtsen
2020-09-27 11:05 ` Eli Zaretskii
2020-09-27 11:13 ` Lars Ingebrigtsen
2020-09-27 11:25 ` Eli Zaretskii
2020-09-27 11:36 ` Lars Ingebrigtsen
2020-09-27 11:43 ` Eli Zaretskii
2020-09-26 19:53 ` Mattias Engdegård
2020-09-27 5:56 ` Eli Zaretskii
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=83tuvkphxg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=43632@debbugs.gnu.org \
--cc=mattiase@acm.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.