all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Yanking as HTML
Date: Sun, 30 Oct 2016 16:59:15 +0600	[thread overview]
Message-ID: <CAP_d_8XQqr9d=BT_gW80ZB=jdtx9D=UYofKLA4mVWzQb_Zy14w@mail.gmail.com> (raw)
In-Reply-To: <m3r36yqfr5.fsf@gnus.org>

On Sun, Oct 30, 2016 at 5:43 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> (gui-get-selection 'CLIPBOARD 'TARGETS)
> => [TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS UTF8_STRING COMPOUND_TEXT TEXT 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 “what
you get” in the target document differs from “what you see” 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="" 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.



  reply	other threads:[~2016-10-30 10:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30  9:42 Yanking as HTML Lars Ingebrigtsen
2016-10-30  9:51 ` Andreas Schwab
2016-10-30 10:41   ` Lars Ingebrigtsen
2016-10-30 11:01     ` Andreas Schwab
2016-10-30 11:08       ` Lars Ingebrigtsen
2016-10-30 11:25         ` Stephen Berman
2016-10-30 17:17     ` Richard Stallman
2016-10-30 10:05 ` Daniel Colascione
2016-10-30 10:47   ` Lars Ingebrigtsen
2016-10-30 10:52     ` Daniel Colascione
2016-10-30 10:15 ` YAMAMOTO Mitsuharu
2016-10-30 10:43   ` Lars Ingebrigtsen
2016-10-30 10:59     ` Yuri Khan [this message]
2016-10-30 11:18       ` Lars Ingebrigtsen
2016-10-30 11:34         ` mituharu
2016-10-30 12:01           ` Lars Ingebrigtsen
2016-10-30 15:26             ` Lars Ingebrigtsen
2016-10-31 12:41             ` Ted Zlatanov
2016-10-31 13:21               ` Lars Ingebrigtsen
2016-10-31 15:48                 ` Eli Zaretskii
2016-11-03 23:55                   ` Chad Brown
2016-10-30 11:25       ` Lars Ingebrigtsen
2016-10-30 10:38 ` Igor Sosa Mayor
2016-11-04  7:13 ` Thierry Volpiatto
2016-11-04  8:49   ` 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

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

  git send-email \
    --in-reply-to='CAP_d_8XQqr9d=BT_gW80ZB=jdtx9D=UYofKLA4mVWzQb_Zy14w@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /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.