From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#30063: 26.0.90; Silent fail with `rst-compile-pdf-preview' Date: Sat, 27 Jan 2018 12:59:55 +0100 Message-ID: <1517054395.9954.0@smtp.gmail.com> References: <87o9m14y0x.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-8VkI/VZXcNUeirq3AdPK" X-Trace: blaine.gmane.org 1517054358 11254 195.159.176.226 (27 Jan 2018 11:59:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 11:59:18 +0000 (UTC) To: 30063@debbugs.gnu.org, stefan@merten-home.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 27 12:59:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1efP8X-0002PP-LC for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jan 2018 12:59:09 +0100 Original-Received: from localhost ([::1]:44319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efPAY-0000AS-58 for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jan 2018 07:01:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efPAR-00008i-F6 for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 07:01:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efPAM-0004Vj-Gd for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 07:01:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efPAM-0004VV-BI for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 07:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1efPAL-0004TJ-UI for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2018 07:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jan 2018 12:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30063 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30063-submit@debbugs.gnu.org id=B30063.151705440617101 (code B ref 30063); Sat, 27 Jan 2018 12:01:01 +0000 Original-Received: (at 30063) by debbugs.gnu.org; 27 Jan 2018 12:00:06 +0000 Original-Received: from localhost ([127.0.0.1]:44418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efP9S-0004RG-B0 for submit@debbugs.gnu.org; Sat, 27 Jan 2018 07:00:06 -0500 Original-Received: from mail-lf0-f52.google.com ([209.85.215.52]:36266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efP9Q-0004Q0-Rl for 30063@debbugs.gnu.org; Sat, 27 Jan 2018 07:00:05 -0500 Original-Received: by mail-lf0-f52.google.com with SMTP id t79so3837535lfe.3 for <30063@debbugs.gnu.org>; Sat, 27 Jan 2018 04:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:message-id:in-reply-to:references:mime-version; bh=23BNgF+zAUHRSsTHaK8qZO2iu41PRdxrmXVTqFyQFyk=; b=B+aY/olIFRKieL/j7N14Oq5xxMP8pyGb6l+2hFzDrVJcgJs97VljeJvtw7S9uiPSeh w5X9AomyfbbmKEXJTchC5r67kOz1nDGJa166d4H0nuuXQJbx0eyz7YH5HC5Q0Vqw2hhU 3DfSfn13iZtRlSr41eBrInqlX/NzlQzflyWjZaciUlyW57YZ6rPHolUrXCSQ5PtPuXtl uyL7UjbMILIvjdPoHVRN5IgQ5CcHORkQ2U7aWR+qqo2KDPivplksvyc98MEaESShZNbd EtgOaU3yNkEgID+19Szf/4Y8Dt3hjzDkRRhHnjnSiM8IMUYnrxMNFMy4NT9Evn0YuXln nIpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:message-id:in-reply-to :references:mime-version; bh=23BNgF+zAUHRSsTHaK8qZO2iu41PRdxrmXVTqFyQFyk=; b=AyQyLlcnUkHF8m7DqtiiLxnwZ4V50Jny8aewJd9wAiVHqBBwD1v9B1ViIIUWOp6NL2 VYEkaCHx6pM8MUsQQQNtHJZvPCLgjXNHhGfgvKhNwOBK+ahxN0USA5HFG3Eb9mQTxC0y C+Qd6kl38Ka5vZKynzcG0EYAOoxEvDlyrSfZQ7E3EtVIZfkKPN4o6mo6UCLwwtAuhIiL ZVRK9uzU+4nT2WhuQBg9RhlKzpNLH2zSxX6YVHUQvW57etbgFUOU96A1VqrNe7Gra/Dv EVFmOC7vIuX/Q8ArBrTXqjjI3or0e7LpPnPnP1GnM8ONlSN+cJ3hS8oKfgPA1bQkXpGV gWzQ== X-Gm-Message-State: AKwxytfFZnxIQVISYjPxcn7iReBgHsBJEHmVu7e+ta1vXIv7FQ7DnhDA DADoofEXPfIVw20pYUhg69Qtkg== X-Google-Smtp-Source: AH8x227SKEYN+wsO0CbDmuyban9VjL0Pxh+strfGkHwyKmFfohREUXJxRjwQZ30XbRW3EC80EYwxBw== X-Received: by 10.25.160.129 with SMTP id j123mr10006073lfe.136.1517054398458; Sat, 27 Jan 2018 03:59:58 -0800 (PST) Original-Received: from [192.168.100.3] (cm-84.210.143.4.getinternet.no. [84.210.143.4]) by smtp.gmail.com with ESMTPSA id o68sm1902631lfc.61.2018.01.27.03.59.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Jan 2018 03:59:57 -0800 (PST) In-Reply-To: <87o9m14y0x.fsf@gmail.com> X-Mailer: geary/0.12-dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:142579 Archived-At: --=-8VkI/VZXcNUeirq3AdPK Content-Type: multipart/alternative; boundary="=-21JcaY3CQY63Y4wBFU1J" --=-21JcaY3CQY63Y4wBFU1J Content-Type: text/plain; charset=us-ascii; format=flowed How about something like the attached patch? -- Simen --=-21JcaY3CQY63Y4wBFU1J Content-Type: text/html; charset=us-ascii
How about something like the attached patch?

-- Simen
--=-21JcaY3CQY63Y4wBFU1J-- --=-8VkI/VZXcNUeirq3AdPK Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Warn-about-missing-executables-in-RST-PDF-preview.patch Content-Transfer-Encoding: quoted-printable >From 11bb53e567588539c92a520db321a5a9b746df58 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Simen=3D20Heggest=3DC3=3DB8yl?=3D Date: Sat, 27 Jan 2018 12:18:40 +0100 Subject: [PATCH] Warn about missing executables in RST PDF preview * lisp/textmodes/rst.el (rst-compile-pdf-preview): Warn about missing executables when attempting to compile and preview an RST file as PDF. (Bug#30218) --- lisp/textmodes/rst.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index c93e4e474c..a16d5bca3a 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -4382,10 +4382,15 @@ rst-compile-pdf-preview "Convert the document to a PDF file and launch a preview program." (interactive) (let* ((tmp-filename (make-temp-file "rst_el" nil ".pdf")) + (pdf-compile-program (cadr (assq 'pdf rst-compile-toolsets))) (command (format "%s %s %s && %s %s ; rm %s" - (cadr (assq 'pdf rst-compile-toolsets)) + pdf-compile-program buffer-file-name tmp-filename rst-pdf-program tmp-filename tmp-filename))) + (unless (executable-find pdf-compile-program) + (error "Cannot find executable `%s'" pdf-compile-program)) + (unless (executable-find rst-pdf-program) + (error "Cannot find executable `%s'" rst-pdf-program)) (start-process-shell-command "rst-pdf-preview" nil command) ;; Note: you could also use (compile command) to view the compilation ;; output. --=20 2.15.1 = --=-8VkI/VZXcNUeirq3AdPK--