From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Yanking as HTML Date: Sun, 30 Oct 2016 16:59:15 +0600 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477826021 14370 195.159.176.226 (30 Oct 2016 11:13:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2016 11:13:41 +0000 (UTC) Cc: YAMAMOTO Mitsuharu , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 30 12:13:33 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0o3K-00021K-O1 for ged-emacs-devel@m.gmane.org; Sun, 30 Oct 2016 12:13:26 +0100 Original-Received: from localhost ([::1]:57838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0o3N-0000ES-25 for ged-emacs-devel@m.gmane.org; Sun, 30 Oct 2016 07:13:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0nq2-0006eo-Vh for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:59:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0npy-0005oF-2Q for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:59:43 -0400 Original-Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]:35771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0npx-0005nt-Q5 for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:59:37 -0400 Original-Received: by mail-lf0-x22d.google.com with SMTP id f134so80248180lfg.2 for ; Sun, 30 Oct 2016 03:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=VoBsnkqcg2tOqEDIKMZxqV/kLi2BOjMtkX8/crcXXIE=; b=ZfbHoIYq2tW32LLAhCdXezi6a3O2ilWArGjYtpptu2GunfSXm+qT/YiuD76ttFwfm4 XRAleMegGeEVEvvTuOh4TANIiLb9foTd0w9hypReS+vEVvn0nTxlYSD9SyF8ACrOBIma I7apG/rETzvvMGwVnDc1Jkb7F44+MeT+4kyU8ZXxHWnIFBUQc+eXu75RfZRAo/0Zadsv 12b3/ncrq18xSuSpo7Ugm1aYgLhFySUYKMdm3d0RB95AvtGiuxLLZKTF8wVI6nrAEUXb YWchAUfJytdILI+1V7Q+4ClbQR5NeKTWo3eKMAcNqXUxdDfjU6Cwpb5TY5M2C83aLlog NrHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=VoBsnkqcg2tOqEDIKMZxqV/kLi2BOjMtkX8/crcXXIE=; b=XYIhbF1ps3VOmBQhS0LpafSGjTkdFQ+4P1v8dPWwXdDLBe3PcwcWY+iX0E565rccCi r21J1TwfIyMlMkVb55I4Al1qspBwQKylHqUQnmKMqrCzqCYcFaxN7zvC21IRCBL5noMM TYd0YBfgpFkHuh4tzTS+IvcsB60tPFqABBENgeddCZ0B9fM6msWwJmw23wd4qbUSmu+Y TNCOS0nwxCpInrYAJUQ3QpmaZx5ncveZ77LU5vh7+TaKiIAEEdX7hw6b+fPTN3LV87ZU Sl+MKK7w2V6glnVNhmh2eL0Ag2BVf5O955Mqdmkin0SO/wXyv611rhHmPfGkl53bpOqw Vp8Q== X-Gm-Message-State: ABUngveNXnW2CviBbgIVBsER62fKglIl+DxqjMXmyiGvXAFfxh33W/4XkX+p3tumLTVOoV6WPQHzQZXEHShu6w== X-Received: by 10.25.15.169 with SMTP id 41mr12476963lfp.19.1477825175809; Sun, 30 Oct 2016 03:59:35 -0700 (PDT) Original-Received: by 10.114.185.4 with HTTP; Sun, 30 Oct 2016 03:59:15 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: yWaOxrzyXQfBHoK7YY7rZZHZqY4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208979 Archived-At: On Sun, Oct 30, 2016 at 5:43 PM, Lars Ingebrigtsen wrote: > (gui-get-selection 'CLIPBOARD 'TARGETS) > =3D> [TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS UTF8_STRING COMPOUND_TEXT T= EXT STRING] > > Hm... so it lacks the "text/html" target that xclip -o -t TARGETS > lists? Your xclip invocation targets the PRIMARY selection (by default) while the elisp snippet examines CLIPBOARD. This might be a reason for the difference you observe. In my test, text/html was present and I was able to see it as an Emacs propertized string containing HTML tags. Note that, in general, it is impossible to correctly copy-paste styled HTML between documents: * If you paste only the HTML, half the users will complain that =E2=80=9Cwh= at you get=E2=80=9D in the target document differs from =E2=80=9Cwhat you see= =E2=80=9D of the source document. * If you paste both the HTML and CSS of the source, you introduce a non-local effect (HTML is pasted at point while CSS needs to be pasted at a different location). * In a misguided attempt to sidestep the issue above, some programs parse the HTML and CSS and apply CSS as direct formatting (HTML style=3D"" attribute). At this point, the other half of the users (myself included) will complain that direct formatting is evil and any tool that produces such where there was none is broken.