From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman@google.com (T.V Raman) Newsgroups: gmane.emacs.devel Subject: Re: EWW/SHR Feature Request Date: Fri, 21 Mar 2014 11:36:43 -0700 Message-ID: <21292.34491.425345.339570@retriever.mtv.corp.google.com> References: <21292.24135.442736.223060@lapdog.roam.corp.google.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1395427002 18223 80.91.229.3 (21 Mar 2014 18:36:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 18:36:42 +0000 (UTC) Cc: emacs-devel@gnu.org, raman@google.com To: vibhavp@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 21 19:36:52 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 1WR4JH-000862-Bt for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2014 19:36:51 +0100 Original-Received: from localhost ([::1]:54171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4JG-0006wa-TB for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2014 14:36:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4JC-0006rb-Dd for emacs-devel@gnu.org; Fri, 21 Mar 2014 14:36:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR4JB-0001XW-EX for emacs-devel@gnu.org; Fri, 21 Mar 2014 14:36:46 -0400 Original-Received: from mail-oa0-x249.google.com ([2607:f8b0:4003:c02::249]:38873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4JB-0001XQ-7z for emacs-devel@gnu.org; Fri, 21 Mar 2014 14:36:45 -0400 Original-Received: by mail-oa0-f73.google.com with SMTP id n16so500275oag.2 for ; Fri, 21 Mar 2014 11:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:cc:subject:in-reply-to:references; bh=V+9AoLnYp4F2n81uRzk1Owd9k68SIT26Zyw7Qs5dD7g=; b=JGUzDyRhj0mRYWT2fSkmfhIqfcky4GsES+0VietlMhNTkqcvKX4hT5xYBkttijkz1p 4xIhI3vCtZve80NF9enN65mccN+S4tgTLwBC9nC7j+SYwf5G9/yi7Uxqb+vIKmcU5wdV yz0ExSRLk/W4a4lmR/EF6heRYZhSD6WwIRj2wtZwmBslPkTgMCN/6ARdRV5u1mGZJXM0 /sQcqMwmiXo/ot3NMgmh6fxIvroT8LQOB9r4R4UGaxiPfbE8ZYCBp8UtqlmsD7UmFuKP 6Z/ajOD3kqqm02a4Hxlbxr+foYk53RB7akcrRan3ceRwVWJAPxpFk8+M1mTafn//YZ/x ffHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=V+9AoLnYp4F2n81uRzk1Owd9k68SIT26Zyw7Qs5dD7g=; b=EodFjBpS0UjvtNuu/AN5gwXXzd3gPI0zg8EOqcQ72EuveNa6n5P3kMPnuAJqT/u3z4 1GA33zVjvH9ML9PqTeI9ZI0jdwihBxTOVJZw1zwlKWFPejm+ZbFBCu3LehTc/nX4rVna +KjqSLWHm+fipTf4aNh8DYprNGZPyHdKVQkDfLpqAae0SQ/NCUs0cAwaM8kBmHWPVDU+ ahH2UgjB97lFp/WNmYHQQSGA9dn8lbj55ZI6RpfnZygP2Fe/i63ibnvWci5ijwEuRk5D XGjn3pHMezOLWZr/z+556ohYT+O62uR7mIBir/hTtLeom/BQrcpTsY3pOm1ydTQjaKne zltA== X-Gm-Message-State: ALoCoQnV1+MYoO1RmY4Z73IlzuJunx/lhL70ZrRfULwIpqje5VhocHO/m3pBLGNl2fTH+VWK+862wcr2TXHZMPqMElGMJwD+TF8clVL+ud1ZyUjRQtJUvFpMd6QJjysLxAXAJIMG/mQH68MMDqUmI7DaSFKMiqKaqCDJ+Ur8MzRtohxsG0BPJYbkzTFzt2GFkW0eduostq2q X-Received: by 10.42.235.206 with SMTP id kh14mr888705icb.30.1395427004645; Fri, 21 Mar 2014 11:36:44 -0700 (PDT) Original-Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id jd10si723837igb.0.2014.03.21.11.36.44 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Mar 2014 11:36:44 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com (retriever.mtv.corp.google.com [172.27.84.55]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id F00D05A42C3; Fri, 21 Mar 2014 11:36:43 -0700 (PDT) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id 8219022132A; Fri, 21 Mar 2014 11:36:43 -0700 (PDT) In-Reply-To: X-Mailer: VM 8.1.1 under 24.3.50.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::249 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:170728 Archived-At: I mean the following: (shr-format-html-string "Strong") Returns a string with the font face set to 'bold or whatever else shr chooses to use. Here is the code I have in emacspeak: (defun emacspeak-webutils-html-string (html-string) "Return formatted string." (or (require 'shr) (error "Need emacs 24.4")) (with-temp-buffer "*html-format*" (setq buffer-undo-list t) (insert html-string) (shr-render-region (point-min) (point-max)) (buffer-string))) Vibhav Pant writes: > On Fri, Mar 21, 2014 at 9:14 PM, T. V. Raman wrote: > > 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. > > By formatted string, do you mean the entire content of the page to > which the address redirects too, or the webpage title? > > -- > Vibhav Pant > vibhavp@gmail.com