From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Willem Rein Oudshoorn Newsgroups: gmane.emacs.devel Subject: Re: EWW/SHR Feature Request Date: Sat, 22 Mar 2014 11:22:03 +0100 Message-ID: References: <21292.24135.442736.223060@lapdog.roam.corp.google.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395483748 10612 80.91.229.3 (22 Mar 2014 10:22:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Mar 2014 10:22:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 22 11:22:37 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WRJ4W-0002Ao-7R for ged-emacs-devel@m.gmane.org; Sat, 22 Mar 2014 11:22:36 +0100 Original-Received: from localhost ([::1]:56377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRJ4V-0007v9-PN for ged-emacs-devel@m.gmane.org; Sat, 22 Mar 2014 06:22:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRJ4M-0007lv-8m for emacs-devel@gnu.org; Sat, 22 Mar 2014 06:22:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRJ4E-0007Tx-Vo for emacs-devel@gnu.org; Sat, 22 Mar 2014 06:22:26 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRJ4E-0007Ti-PL for emacs-devel@gnu.org; Sat, 22 Mar 2014 06:22:18 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WRJ49-0001kY-Rg for emacs-devel@gnu.org; Sat, 22 Mar 2014 11:22:13 +0100 Original-Received: from ironhead.xs4all.nl ([80.101.115.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Mar 2014 11:22:13 +0100 Original-Received: from woudshoo by ironhead.xs4all.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Mar 2014 11:22:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ironhead.xs4all.nl User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (darwin) Cancel-Lock: sha1:jYzNR8ROfkT2EjxyIYNt8MYZPME= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170782 Archived-At: "T. V. Raman" writes: > Now that we have shr and eww, it would be nice to have a function > that takes an html string and returns a formatted representation > (replete with properties etc.) something like > (shr-format-html-string html-string) -> Return: Formatted string > suitable for insertion into a buffer. I have been using this function for a while (defun salesforce-insert-html (html) "Insert at current point, the 'rendered' HTML." (when html (shr-insert-document (with-temp-buffer (insert html) (libxml-parse-html-region (point-min) (point-max)))))) Wim Oudshoorn