From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?R=C3=BCdiger?= Sonderfeld Newsgroups: gmane.emacs.bugs Subject: bug#15705: [PATCH 3/8] shr: Display content for video if no poster is available. Date: Fri, 25 Oct 2013 01:43:39 +0200 Message-ID: <4296426.1vNUsUNvhh@descartes> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1382658320 8887 80.91.229.3 (24 Oct 2013 23:45:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2013 23:45:20 +0000 (UTC) Cc: Lars Magne Ingebrigtsen To: 15705@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 25 01:45:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VZUaf-0006Tc-Mn for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Oct 2013 01:45:21 +0200 Original-Received: from localhost ([::1]:56656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUaf-0006QI-9r for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 19:45:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUaT-0006Pd-UN for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:45:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZUaN-0007Oi-0r for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:45:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUaM-0007Od-UR for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VZUaL-0005wx-WB for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?R=C3=BCdiger?= Sonderfeld Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2013 23:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138265825722761 (code B ref -1); Thu, 24 Oct 2013 23:45:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Oct 2013 23:44:17 +0000 Original-Received: from localhost ([127.0.0.1]:42073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZUZc-0005v0-K8 for submit@debbugs.gnu.org; Thu, 24 Oct 2013 19:44:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59333) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZUZX-0005tE-DN for submit@debbugs.gnu.org; Thu, 24 Oct 2013 19:44:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZUZK-000733-KH for submit@debbugs.gnu.org; Thu, 24 Oct 2013 19:44:06 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUZK-00072t-IJ for submit@debbugs.gnu.org; Thu, 24 Oct 2013 19:43:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUZE-0005yp-IM for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:43:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZUZ8-0006mZ-C3 for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:43:52 -0400 Original-Received: from ptmx.org ([178.63.28.110]:41409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZUZ8-0006lS-6j for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 19:43:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id A65322B155; Fri, 25 Oct 2013 01:43:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ptmx.org Original-Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RJhtZFWpLnpV; Fri, 25 Oct 2013 01:43:44 +0200 (CEST) Original-Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id D9B572AEE8; Fri, 25 Oct 2013 01:43:43 +0200 (CEST) User-Agent: KMail/4.11.2 (Linux/3.11.0-12-generic; KDE/4.11.2; x86_64; ; ) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79610 Archived-At: * lisp/net/shr.el (shr-tag-video): If poster is nil display a default value instead. Signed-off-by: R=C3=BCdiger Sonderfeld --- lisp/net/shr.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index b742172..39e0470 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1101,7 +1101,9 @@ (defun shr-tag-video (cont) (let ((image (cdr (assq :poster cont))) =09(url (cdr (assq :src cont))) =09(start (point))) - (shr-tag-img nil image) + (if image + (shr-tag-img nil image) + (shr-insert " [video] ")) (shr-urlify start (shr-expand-url url)))) =20 (defun shr-tag-img (cont &optional url) --=20 1.8.4.1