Re: [h-e-w] emacs support for multiple clipboard formats

2013-03-30 Thread Stephen Leake
Buchs, Kevin buchs.ke...@mayo.edu writes:

 Thanks for the response. For example, visit http://sphinx-doc.org/ in a
 web browser (Chrome in my case). Select the contents of the page and
 Copy. Now if you go to paste into MS Word or Libre Office and choose
 Paste Special, you will see one of the available formats is HTML. If you
 paste it you will get working hyperlinks. Now, pasting into emacs, you
 get none of that but only the literal text, as Emacs is using only the
 Text format of the clipboard. You can reproduce such a paste in
 LibreOffice if you choose Paste Special and then text format. So,
 Windows is offering up several formats on the clipboard at once. 

Actually, it's Chrome that's offering several formats, and
LibreOffice that knows how to handle the formats. Windows clipboard
makes that possible, as does X clipboard.

 I was wondering if any work has been done to access the other formats,
 like HTML, which as you say is all ASCII text. It would be super to
 paste such HTML into org-mode, for example, and have it just pick up
 the hyperlinks.

So the issue is how to get Emacs to understand how to request the set of
available formats from the clipboard, and how to select one. Also then
to present that list to the user.

Have you tried this on X windows? I would not be surprised if Emacs on X
understands multi-format clipboards.

-- 
-- Stephe



Re: [h-e-w] emacs support for multiple clipboard formats

2013-03-30 Thread Eli Zaretskii
 From: Stephen Leake stephen_le...@stephe-leake.org
 Date: Sat, 30 Mar 2013 02:15:53 -0400
 
  I was wondering if any work has been done to access the other formats,
  like HTML, which as you say is all ASCII text. It would be super to
  paste such HTML into org-mode, for example, and have it just pick up
  the hyperlinks.
 
 So the issue is how to get Emacs to understand how to request the set of
 available formats from the clipboard, and how to select one.

Emacs already does that, see w32select.c.  It just doesn't support
CF_HTML format yet.

 Also then to present that list to the user.

What for?  Emacs currently includes logic for selecting the best
format out of those available.  Why would adding support for CF_HTML
need to change that?



Re: [h-e-w] emacs support for multiple clipboard formats

2013-03-29 Thread Stephen Leake
Buchs, Kevin buchs.ke...@mayo.edu writes:

 One of the cases where I seem to resort to tools other than emacs for
 capturing information involve copying from a web browser with text with
 hyperlinks. Has anyone opened a door to emacs accepting clipboard input
 in html format or other non-plain-text?

Could you give a more specific use case?

html is plain text, when displayed in Emacs in html mode, so I don't
understand your question.

-- 
-- Stephe