all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: luangruo@yahoo.com, 51716@debbugs.gnu.org
Subject: bug#51716: 29.0.50; [PATCH] Expose xwidget navigation history to Lisp code
Date: Sun, 14 Nov 2021 09:20:01 +0200	[thread overview]
Message-ID: <837ddbw6e6.fsf@gnu.org> (raw)
In-Reply-To: <87k0hb9qbg.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  14 Nov 2021 07:58:11 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Po Lu <luangruo@yahoo.com>,  51716@debbugs.gnu.org
> Date: Sun, 14 Nov 2021 07:58:11 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > If they cannot include invalid UTF-8, then using decode_string_utf_8
> > is what you need to do.  You cannot use those strings directly in
> > Lisp, because they will be unibyte strings.  IOW, using build_string
> > there is incorrect, you need to use make_unibyte_string and
> > decode_string_utf_8 instead.  build_string is correct only for
> > plain-ASCII strings.
> 
> Can't he use make_multibyte_string instead?

I'd rather not.  Code which uses external strings without decoding
looks wrong, and the time it takes to convince yourself it does TRT
(if it does) is time lost.

decode_string_utf_8 is very fast, and xwidgets aren't supposed to be
in the inner loops of Emacs.  So I see no reason for shortcuts here.





  parent reply	other threads:[~2021-11-14  7:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <871r3p8r05.fsf.ref@yahoo.com>
2021-11-09 12:15 ` bug#51716: 29.0.50; [PATCH] Expose xwidget navigation history to Lisp code Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-09 13:33   ` Eli Zaretskii
2021-11-09 13:44     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-09 13:58       ` Eli Zaretskii
2021-11-09 14:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-09 14:10           ` Eli Zaretskii
2021-11-09 23:57             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-10 15:25   ` Eli Zaretskii
2021-11-11  1:03     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-13 15:02       ` Eli Zaretskii
2021-11-14  0:18         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-14  6:53           ` Eli Zaretskii
2021-11-14  6:58             ` Lars Ingebrigtsen
2021-11-14  6:59               ` Lars Ingebrigtsen
2021-11-14  7:11                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-14  7:18                   ` Lars Ingebrigtsen
2021-11-14  7:20                     ` Lars Ingebrigtsen
2021-11-14  7:21                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-14  7:29                   ` Eli Zaretskii
2021-11-14  7:33                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-14  8:04                       ` Eli Zaretskii
2021-11-14  9:45                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-14  7:20               ` Eli Zaretskii [this message]
2021-11-14 13:29   ` Po Lu

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=837ddbw6e6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=51716@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    /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.