From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iHAnK7J4N2X4tAAA9RJhRA:P1 (envelope-from ) for ; Tue, 24 Oct 2023 09:56:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iHAnK7J4N2X4tAAA9RJhRA (envelope-from ) for ; Tue, 24 Oct 2023 09:56:34 +0200 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 9868D5AF9D for ; Tue, 24 Oct 2023 09:56:34 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SJnCbVtP; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698134194; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=B3DlM4FfU87UQkbzBlf4MGY2xJSGAEsgl9RIFyCmFRo=; b=rlF1/7XsDJ36QP9NkkUETBlQ77Gpsslq4Vo8jLIB/QjK1bLX/jJ5cNeKB4JOW5WkD6I3QO Q4zWtC5PxTt0cG6BsGuLDuGvLq4v9mYJd122KJsousD25nIn7c+oy3Hr/DR4iVrONGzX0V zxbBngDjzPSLIZ2Nv9lllRZ0g4V1daQ+QjsQ/YJYuG3a2LQP6js3EmmwSc1nFuPCvOHiob cD5BABXuy0kFj/Wj+O9qpRdPj60+odLKUq36v21ht4QoG1CViG+Mm9D52lG1F713o0EKGp v8FSQBX1sQRRItTPmc+HTYsac/QK2ajIRVfFEj7aoY3YOWKPamiTbkXPXXVE4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SJnCbVtP; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698134194; a=rsa-sha256; cv=none; b=q3KC/8/uyuU1Uk6jyZqNFA+33bJz5mr3xb3ZnASaAQv6v6VKFTadm9zt9PwqJ6TybntuC7 JM1e8qAqqKRvUHmpowxfmKUG2rkXGam9krfb3aUHx+ZXm3okyVHiVWZmzyrEYGLOImxXSE 2bgkw+DNGOPwQYo5XjkZyyZkSD/nCAsyo9vsfskvio35QCPkkXlbzciRx6qT6z/ffftmMN +4suc+ChQjUJmguKq9cqswp1JK7KYzr3CigFxKLnJaBse6+XPz30LLuT53RshK6W/jv8Z0 SDb3dqJ6AuDIhKzNPEv0M/Vwz+6OFHy3fOQxZsO7Mw1YE2eJNJSzXmywYSwogQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvCGN-0003U8-Jd; Tue, 24 Oct 2023 03:55:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvCGL-0003Sq-NF for emacs-orgmode@gnu.org; Tue, 24 Oct 2023 03:55:41 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvCGJ-0002Uz-5g for emacs-orgmode@gnu.org; Tue, 24 Oct 2023 03:55:41 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507c78d258fso5981870e87.2 for ; Tue, 24 Oct 2023 00:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698134136; x=1698738936; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:cc:to:from :references:content-language:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=B3DlM4FfU87UQkbzBlf4MGY2xJSGAEsgl9RIFyCmFRo=; b=SJnCbVtPJL1JzufB0iv7sKSMc/8a8Da/xLhgui9vnzokI0camBjVidtW0SCpzSvnvM cZ0FFHb129Dej5EOLAlhrkba+NCD2nd1ffHRwm5WcQL+TBgwJEtVBJtJRbUesMoQmzmh RiR/I/kF1vdNhJFAOwwd0KSKwhyjcXyq/llwrZwjlscekfSf1tBTja2LVVeL/ZAqnddp flqz6VcBl5cCPkHftMoLZZYSEStwAmsMF+smxnJZWW8ags/OfJrfO7TesYrQPSMzh63u wv1yCaSUBiOgDIJPJcy9vZEsaEj4NHj0+9RscpCuDOS3Psb4WKEFstmh0b6tXeOsybmK uBEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698134136; x=1698738936; h=content-transfer-encoding:in-reply-to:mail-followup-to:cc:to:from :references:content-language:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B3DlM4FfU87UQkbzBlf4MGY2xJSGAEsgl9RIFyCmFRo=; b=gJWp7VW5XKb2L5BnVVZWCs2nUxto5/k6Hna4qmAZy/xnXfpi5raCMmXH9lIhmxEr60 8PybUDC2T+npG9Ye4MhvNa3K6pkDpnNSPNLzhYU/W5ggm/kTvLksMtt53cNIGKF/qbNt jzuWdvQODHNS/cFrGvminpqq/3S7Cpwo4/QRIOlFk3k5mdW0OfD1Yy4TrTiqmGqh0hn7 nalmrPvzYnLzAniNK9eH994iq01+AeL5zbh8dpny9bUfQZXTqybL9VdgYn6NHvZS39SS aa3HQhla9EEIbzFOPfO0Z5eGqOqnwnz+WDM3SrpFHq+T3qeeMvesg0K9FVzwj73BNVoP 44eQ== X-Gm-Message-State: AOJu0Yye6nUl4MgQFJQHPvk0jZaUyLXUB/32xNBcR4TihlW5hpGSoHuE m0NzrxVlk+2qa9QheGdLD1D6E1VKw70= X-Google-Smtp-Source: AGHT+IHjxrQt7lOmiEpc4aV2+ycysnRzcYDZmrdzYySoklLErzdiECFK1b8bu+4Q4b214SPKCnvWrw== X-Received: by 2002:ac2:5308:0:b0:507:976d:89aa with SMTP id c8-20020ac25308000000b00507976d89aamr7999755lfh.67.1698134136050; Tue, 24 Oct 2023 00:55:36 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id w14-20020ac2598e000000b00507b085e995sm2028215lfn.44.2023.10.24.00.55.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 00:55:35 -0700 (PDT) Message-ID: Date: Tue, 24 Oct 2023 14:55:33 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: org-ditaa woes Content-Language: en-US, ru-RU References: <87wmvhnr8b.fsf@t14.reltub.ca> <31b83821-3468-499c-a7f8-54912e5caf90@gmail.com> From: Max Nikulin To: emacs-orgmode@gnu.org Cc: Florin Boariu Mail-Followup-To: emacs-orgmode@gnu.org, Florin Boariu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.92 X-Spam-Score: 2.92 X-Migadu-Queue-Id: 9868D5AF9D X-Migadu-Scanner: mx2.migadu.com X-TUID: sIjW1lfthsLb On 23/10/2023 18:18, Florin Boariu wrote: > >> sh-5.1$ flatpak-spawn --host toolbox run /usr/bin/ditaa /tmp/foo.txt >> -o /tmp/foo.png thanks > I really _need_ to generically execute a command. I hope, a couple of workarounds are still possible. 1. Get java command by adding bash -x (or /usr/bin/bash, or "/usr/bin/env bash") flatpak-spawn --host toolbox run bash -x /usr/bin/ditaa \ /tmp/foo.txt -o /tmp/foo.png - set `org-babel-ditaa-java-cmd' to something like "flatpak-spawn --host toolbox run /usr/bin/java", - set `org-ditaa-jar-path' to path to ditaa.jar reported by the command above, - add other options to either `org-babel-header-args:ditaa' :java property or to `org-babel-ditaa-java-cmd' - perhaps add /usr/bin/env JAVA_HOME=... and other required environment variables before java binary. 2. - set `org-babel-ditaa-java-cmd' to "flatpak-spawn --host toolbox run /usr/bin/ditaa". - set `org-ditaa-jar-option' to empty string. - Call of `shell-quote-argument' makes it impossible to set `org-ditaa-jar-path' to empty string, so set the following variables to some harmless value, e.g. "-Dfile.encoding=UTF-8" (anything added through :java babel header argument): + `org-ditaa-jar-path' + `org-ditaa-eps-jar-path' I agree that it should be possible to call ditaa executable directly. Perhaps it is not possible because for a long time ditaa.jar was a part of Org mode repository (there were a lot of messages against dropping of jar files from the repository). It seems, nobody is ready to take responsibility and to become maintainer of ob-ditaa.el while active users have no ability to install ditaa as a package, so they anyway have to download .jar from upstream. I find it tedious to add "flatpak-spawn ..." to every tool used by Emacs. Who is the publisher of the flatpak? I would expect a directory with symlinks named ditaa, java, git, gcc, cpp, etc to a script line #!/bin/sh exec flatpak-spawn --host toolbox run /usr/bin/env "$0" "$@" (or "$(basename "$0")") mounted to flatpak runtime and added to $PATH. Perhaps another approach exist and it should be discussed with the packager and Emacs developers.