From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AD1oKHB3nmERVAEAgWs5BA (envelope-from ) for ; Wed, 24 Nov 2021 18:33:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kLMVJHB3nmGqLgAA1q6Kng (envelope-from ) for ; Wed, 24 Nov 2021 17:33:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EB24AE27F for ; Wed, 24 Nov 2021 18:33:35 +0100 (CET) Received: from localhost ([::1]:53030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpw9G-00013F-KW for larch@yhetil.org; Wed, 24 Nov 2021 12:33:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpw5o-0006vq-Kv for emacs-orgmode@gnu.org; Wed, 24 Nov 2021 12:30:02 -0500 Received: from st43p00im-zteg10071901.me.com ([17.58.63.169]:47276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpw5l-0000Lp-5X for emacs-orgmode@gnu.org; Wed, 24 Nov 2021 12:29:58 -0500 Received: from smtpclient.apple (unknown [173.38.220.38]) by st43p00im-zteg10071901.me.com (Postfix) with ESMTPSA id C7ABED80F0A for ; Wed, 24 Nov 2021 17:29:30 +0000 (UTC) From: guillaume@gbuisson.com Content-Type: multipart/mixed; boundary="Apple-Mail=_AF5B7DF4-E578-45D3-928C-1825C49445B1" Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: [PATCH] Fix ob-plantuml over TRAMP Message-Id: Date: Wed, 24 Nov 2021 18:29:28 +0100 To: emacs-orgmode@gnu.org X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-24=5F04:2021-11-23=5F01,2021-11-24=5F04,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=671 phishscore=0 bulkscore=0 clxscore=1030 mlxscore=0 adultscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111240094 Received-SPF: pass client-ip=17.58.63.169; envelope-from=guillaume@gbuisson.com; helo=st43p00im-zteg10071901.me.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637775216; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=/P/tehS7Bz5cn4sN95ey9lwNHgxfTxS8f1Dv0Ouo1CM=; b=drjYhfMOqNX4jxhQ5Vfqmm09P8LL2lFW1yILXM2DceDDly1VI3ukfw/5jviDKGhJ51F1+G fo3MilkhpisHapzElgxPQxRm5Sefaze6PH3CjwVErJm3kQC5HrO+gN6AtjPswXt6UNKZrA 8RALDLvBhKBZkhnMtDYgLFnoGyYhXPJxHBt5HoQ7Ekn5HYynuUvOBrKNtSSlknzX8RR4aG q07QSt/FzM0OOE8xJQKUboU4w6BxssQpzY3dJUf5ONAmKezYfrfWE9BExOY0UCeBWfwW4J xJVbvz6N4O/RdqkkbjzL3LkUfmPKtledUWDdwHiRjBFLSCoS+sZ5jTpveGKSNA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637775216; a=rsa-sha256; cv=none; b=lga9VAkqhp+2n0ViZthiRuLoC1RKlVoYDkoLAr1pq+iVpQlK67KTuqj6h/pD+195gzlZWr wwa37mzPvernbFJZ/8itLcTztEmG/gysmXSoCnolS0NiG/NrrvOaj7fthv9IqHdEvy0Jk0 Fc9F6nmMfD1llpIDo6EpCJaYjQ2BpV5aZs7D9VsR7Tut0RXEoUIYplJeCKzGdrRFYViQJR ACcRP25eLqqU7kQWVUrOthsyFPgZ4TY7TxiYeFvJauj7PMfb0AuJWbvDMGqmN7KE/hDrmf CUL55skuNxDxpEEoJV/K8UoTv3I0zoUh5r5Q9FyRcotuEpD4PtTV/VxfqSO2lA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: EB24AE27F X-Spam-Score: -2.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: Jr8naPzpeicT --Apple-Mail=_AF5B7DF4-E578-45D3-928C-1825C49445B1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi All, My Emacs Workflow involves connecting to a dev server over SSH so I can = use my machines as thin clients and avoid synchronizing files, for that I do pretty much everything over TRAMP as I don=E2=80=99t want = to lose the benefits of GUI Emacs. While everything mostly works impressively fine, I noticed writing my = specifications that ob-plantuml fails to generate diagrams. It seems to me that there is a redundant check which uses = `file-exists-p` even if using TRAMP, the plantuml jar is located on the = remote server, so=20 it fails with an error even though the command to actually render the = diagrams works fine. The patch I propose involves keeping this check but moving it so it only = generates a message instead of failing the whole generation process, doing so allows to restore the functionality and I can finally generate = my sequence diagrams over TRAMP. For more details, see the attached patch. -- Guillaume --Apple-Mail=_AF5B7DF4-E578-45D3-928C-1825C49445B1 Content-Disposition: attachment; filename=0001-Allow-ob-plantuml-to-work-over-Tramp.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Allow-ob-plantuml-to-work-over-Tramp.patch" Content-Transfer-Encoding: quoted-printable =46rom=2091c07f05988190adf51bbf33fd64f34245bc97be=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Guillaume=20Buisson=20=0A= Date:=20Wed,=2024=20Nov=202021=2016:42:31=20+0100=0ASubject:=20[PATCH]=20= Allow=20ob-plantuml=20to=20work=20over=20Tramp=0A=0A*=20= lisp/ob-plantuml.el=20(org-babel-plantuml):=20Modify=20the=20jar=20file=20= check=20so=20it=20doesn't=20fail=20the=20generation,=0Aallowing=20= ob-plantuml=20to=20be=20used=20with=20TRAMP=20setups.=0A=0A---=0A=20= lisp/ob-plantuml.el=20|=204=20++--=0A=201=20file=20changed,=202=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/ob-plantuml.el=20b/lisp/ob-plantuml.el=0Aindex=20= fc621600c..e8fff0742=20100644=0A---=20a/lisp/ob-plantuml.el=0A+++=20= b/lisp/ob-plantuml.el=0A@@=20-116,11=20+116,11=20@@=20This=20function=20= is=20called=20by=20`org-babel-execute-src-block'."=0A=20=09=20(java=20= (or=20(cdr=20(assq=20:java=20params))=20""))=0A=20=09=20(executable=20= (cond=20((eq=20org-plantuml-exec-mode=20'plantuml)=20= org-plantuml-executable-path)=0A=20=09=09=09=20=20=20(t=20"java")))=0A+=20= =20=20=20=20=20=20=20=20(jar-exists?=20(or=20(file-exists-p=20= org-plantuml-jar-path)=0A+=09=09=09=20=20(message=20"Could=20not=20find=20= plantuml.jar=20at=20%s"=20org-plantuml-jar-path)))=0A=20=09=20= (executable-args=20(cond=20((eq=20org-plantuml-exec-mode=20'plantuml)=20= org-plantuml-executable-args)=0A=20=09=09=09=09((string=3D=20""=20= org-plantuml-jar-path)=0A=20=09=09=09=09=20(error=20= "`org-plantuml-jar-path'=20is=20not=20set"))=0A-=09=09=09=09((not=20= (file-exists-p=20org-plantuml-jar-path))=0A-=09=09=09=09=20(error=20= "Could=20not=20find=20plantuml.jar=20at=20%s"=20org-plantuml-jar-path))=0A= =20=09=09=09=09(t=20(list=20java=0A=20=09=09=09=09=09=20"-jar"=0A=20=09=09= =09=09=09=20(shell-quote-argument=20(expand-file-name=20= org-plantuml-jar-path))))))=0A--=20=0A2.31.1=0A=0A= --Apple-Mail=_AF5B7DF4-E578-45D3-928C-1825C49445B1--