unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 31149@debbugs.gnu.org, monnier@IRO.UMontreal.CA
Subject: bug#31149: 27.0.50; (gui-get-selection nil 'text/html) returns mis-decoded text
Date: Sun, 29 Sep 2019 12:02:42 +0200	[thread overview]
Message-ID: <87tv8vpghp.fsf@gnus.org> (raw)
In-Reply-To: <83lfu7fmzw.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 29 Sep 2019 12:52:19 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> Ah, thanks.  So should I go ahead and make this change?  It looks pretty
>> trivial, but I guess there could be interop problems with code that
>> assumes the current odd behaviour.
>
> What odd behavior is that?  I understood that we just display binary
> garbage, something that no one should miss.

We don't have any commands to yank HTML, so we don't display anything,
but I've got code like the following in one of my out-of-tree packages
(which will fail after the fix).  I'm with that, though, but I have no
idea how much other people would be impacted.

(defun ewp-yank-html ()

[...]

  (let ((data (loop for type in '(PRIMARY CLIPBOARD)
		    for data = (x-get-selection-internal type 'text/html)

[...]

      ;; Somehow the selection is UTF-16 when selecting text in
      ;; Firefox.
      (decode-coding-string data 'utf-16-le)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-09-29 10:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 20:55 bug#31149: 27.0.50; (gui-get-selection nil 'text/html) returns mis-decoded text Stefan Monnier
2018-04-13 21:05 ` Lars Ingebrigtsen
2018-04-14  6:32 ` Eli Zaretskii
2018-04-24 18:11   ` Eli Zaretskii
2018-05-05  9:37     ` Eli Zaretskii
2018-05-11  9:18       ` Eli Zaretskii
2018-05-19  8:50         ` Eli Zaretskii
2019-09-29  8:44 ` Lars Ingebrigtsen
2019-09-29  9:31   ` Eli Zaretskii
2019-09-29  9:37     ` Lars Ingebrigtsen
2019-09-29  9:52       ` Eli Zaretskii
2019-09-29 10:02         ` Lars Ingebrigtsen [this message]
2019-09-29 10:21           ` Eli Zaretskii
2019-09-29 11:48             ` Lars Ingebrigtsen
2021-11-08  1:07 ` Lars Ingebrigtsen
2021-11-08  1:12   ` Lars Ingebrigtsen
2021-11-09  3:44   ` Lars Ingebrigtsen
2021-11-11  4:24     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87tv8vpghp.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=31149@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).