From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74650 Path: news.gmane.org!not-for-mail From: =?UTF-8?q?Adam=20Sj=C3=B8gren?= Newsgroups: gmane.emacs.gnus.general Subject: =?UTF-8?q?=5BPATCH=5D=20=28shr-urlify=29=3A=20show=20title=20attribute=20as=20well=20as=20URL=2C=20if=20provided=2E=20=28shr-tag-a=29=3A=20pass=20title=20to=20shr-urlify=2E?= Date: Sat, 4 Dec 2010 22:59:41 +0100 Message-ID: <1291499981-1868-1-git-send-email-asjo@koldfront.dk> References: <87ei9xjlfj.fsf@topper.koldfront.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291500051 5493 80.91.229.12 (4 Dec 2010 22:00:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 22:00:51 +0000 (UTC) Cc: =?UTF-8?q?Adam=20Sj=C3=B8gren?= To: ding@gnus.org Original-X-From: ding-owner+M23006@lists.math.uh.edu Sat Dec 04 23:00:46 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PP09o-00070z-UF for ding-account@gmane.org; Sat, 04 Dec 2010 23:00:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PP09c-0008CT-5N; Sat, 04 Dec 2010 16:00:28 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PP09a-0008CF-Gz for ding@lists.math.uh.edu; Sat, 04 Dec 2010 16:00:26 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PP09Z-0007Bd-GT for ding@lists.math.uh.edu; Sat, 04 Dec 2010 16:00:26 -0600 Original-Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143] helo=topper.koldfront.dk) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PP09Y-00045T-00 for ; Sat, 04 Dec 2010 23:00:24 +0100 Original-Received: by topper.koldfront.dk (Postfix, from userid 1000) id 8E3AD40EFB20; Sat, 4 Dec 2010 22:59:54 +0100 (CET) X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <87ei9xjlfj.fsf@topper.koldfront.dk> X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74650 Archived-At: Make the mouse over pop up text of links show the title as well as the UR= L, if present. Signed-off-by: Adam Sj=C3=B8gren --- Let me try again, this time with the email comment in the right place (I = hope), and skipping the extra variable that was just too much indentation change= for very little clarity. Please disregard my previous attempt: <1291499077-1619-1-git-send-email-a= sjo@koldfront.dk> lisp/shr.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/shr.el b/lisp/shr.el index 69973fb..5d24479 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -506,10 +506,10 @@ START, and END." =20 (autoload 'widget-convert-button "wid-edit") =20 -(defun shr-urlify (start url) +(defun shr-urlify (start url &optional title) (widget-convert-button 'url-link start (point) - :help-echo url + :help-echo (if title (format "%s (%s)" title url) url) :keymap shr-map url) (put-text-property start (point) 'shr-url url)) @@ -631,10 +631,11 @@ text will be inserted at start." =20 (defun shr-tag-a (cont) (let ((url (cdr (assq :href cont))) + (title (cdr (assq :title cont))) (start (point)) shr-start) (shr-generic cont) - (shr-urlify (or shr-start start) url))) + (shr-urlify (or shr-start start) url title))) =20 (defun shr-tag-object (cont) (let ((start (point)) --=20 1.7.2.3