From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Yanking as HTML Date: Sun, 30 Oct 2016 03:05:00 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477821930 16356 195.159.176.226 (30 Oct 2016 10:05:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2016 10:05:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 30 11:05:22 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 1c0mzQ-000308-Aa for ged-emacs-devel@m.gmane.org; Sun, 30 Oct 2016 11:05:20 +0100 Original-Received: from localhost ([::1]:57608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0mzT-0005ns-1S for ged-emacs-devel@m.gmane.org; Sun, 30 Oct 2016 06:05:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0mzH-0005nl-E5 for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:05:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0mzD-0007y2-Ac for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:05:11 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:50672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0mzC-0007wJ-Tf for emacs-devel@gnu.org; Sun, 30 Oct 2016 06:05:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:To:From; bh=k4vo/CuMx9UfgjtLyGFF5gYqIgBajauxYkl8PxNS70U=; b=M5kZVXvywIoC6la3/zQCztgPD3T3DCDzJrztA+TGUwKMa1VdVST5LS1V9lPtkoAlpKKxZoVciRnk+eMCMx5qAzz8HL7QIU/vcEXppnZN1P4yhA+q65U4XCWK6B2zeZP4f1H8l0nZvrQXhpGkfRWRocYwlS/KNKCICfz9Anx+reeG9EpWxeuKGJVo7UVBPGyxIndOee01LIj9CWbIZXMy+zzjh9kuz/F4qmDbSCCmo2nMaCfts8gxt8Ss3CEoMUtllBrNWMrlQs1uddiiGXii4gxP4B3WggZt0LSH0sM5HGa2uUXqkILaYz97X5fslthn+xlDBCTB8/qohKH84lYm1Q==; Original-Received: from c-73-97-199-232.hsd1.wa.comcast.net ([73.97.199.232] helo=dancol-glaptop0) by dancol.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1c0mzB-0007li-QE for emacs-devel@gnu.org; Sun, 30 Oct 2016 03:05:05 -0700 In-Reply-To: (Lars Ingebrigtsen's message of "Sun, 30 Oct 2016 10:42:10 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:208970 Archived-At: Lars Ingebrigtsen writes: > I've tried googling for this for a few minutes, but I haven't found > anything promising (without relying on uncommon external programs). > > I sometimes copy text from Firefox to Emacs, and when I'm pasting into > HTML documents, I would sometimes prefer to retain the HTML formatting > of what I'm copying. > > Does Emacs have support for this somehow? And if not, has anybody > thought about what this support should look like? Obviously, the user > must be able to control "how much" richness should be yanked when > yanking (just the text; the HTML formatting; perhaps images too?). A long time ago, I implemented support for rich-text copying _out_ of Emacs in the HAVE_NTGUI case, but that code never landed in the tree. The feature you're requesting is pretty straightforward to implement, but it needs platform-specific C code. I agree about the user options for controlling it --- perhaps on an operation-by-operation basis via some kind of special prefix flag.