From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id INbcHU6erWNI3wAAbAwnHQ (envelope-from ) for ; Thu, 29 Dec 2022 15:03:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4Cm1HU6erWP3GQAAauVa8A (envelope-from ) for ; Thu, 29 Dec 2022 15:03:58 +0100 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 4194913670 for ; Thu, 29 Dec 2022 15:03:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAtV1-0004U6-6o; Thu, 29 Dec 2022 09:03:11 -0500 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 1pAtUr-0004Sn-Kd for emacs-orgmode@gnu.org; Thu, 29 Dec 2022 09:03:08 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAtUp-0008OA-H4 for emacs-orgmode@gnu.org; Thu, 29 Dec 2022 09:03:01 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 11723240165 for ; Thu, 29 Dec 2022 15:02:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672322577; bh=VTfZxVbA/eCdPoClp98o+n8oOybORViFcMBxI78erzU=; h=From:To:Cc:Subject:Date:From; b=B/krjeEnUEmGdFMQxwboJLrMwE5g4XuvvrOkefZug2WMtsCWoUz1VuF0qcKpKnsam 5f/df6MaFpb4xEzqj2ZJrUwYnJzHtFOSoBs0cP7cFm+mQ/2tNI7rYc2E2d9f6tsCD4 V+NBqHHZEpGq6duRJDTczo8kmwk//4O7grsPDfdqFTJ8Jy+lwJUWhSL6+sZ/BbZAOY 8rJvu6N6DdgmJ9UW/CZ199EOvak6q2Y5UciEd1/G1yDQIE87g5LxFq4eG4bR73v+iX cqLl7gq1fvVK2Kj1i4kOlDvPADjc8L/bowNdfqahdkYjpCogPOqhAPlnW0dS7OzwmC hRwk2wGaVIviQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NjVTX25RZz9rxL; Thu, 29 Dec 2022 15:02:56 +0100 (CET) From: Ihor Radchenko To: dalanicolai Cc: emacs-orgmode@gnu.org Subject: Re: [FR] Add support for racket images in org-babel In-Reply-To: References: <87mt7k7uph.fsf@localhost> Date: Thu, 29 Dec 2022 14:02:47 +0000 Message-ID: <87tu1etiig.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672322638; 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=VTfZxVbA/eCdPoClp98o+n8oOybORViFcMBxI78erzU=; b=rzWY9rhnoGMRnInyni2LwJk4LMnO7KdZeinwBmNYA6bxrqy1o2QFvppyraQZrYJL8V9ORn bhHu1yl4TwTA1710DYjGwuNDY8gmFg1O2cNW70WgyzyjZIxrVc+8xP5El7C/1nGub1+89G FI+o0EYbfs72b06YfDxCy0kojzCYu0ZdnJUdS5U7wANoOHt4stXrzS+gLiFTqqLqiIXjUK NmZo6Jm8PkZai7phWJSkQxyLCYlZal7ch8iNdXwI5na0QG7F5YSP+D8MCSU4OA4DQtMhTH jnM6eHSACzPg3l+Yu21EQsCqdPYzPkcx24gxXFzkB22ebQYav7CGnWr3+oIRFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="B/krjeEn"; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672322638; a=rsa-sha256; cv=none; b=h5XjiuKhVGGNOw7UaDuDGJy3fvBCUmHqa54lf1YW76ohMVMO68EAaXrtJU2vvUVM+sn4ZQ DX1a8fWWwPBb23gdbSBMdkbiHowtPhRCRjP4GgbXZVA2OSRtRnBPs3wKkJHnsuqg6lNLEJ nlU3LebnrIGKe/fNLMWZZhdU75MeOS0gSf3zowICtSJLTKgyt4RUgtqq2exNSPPw/us2DX 6fT+aE1q3cBwGakBsYWBYavj1ribqEw7iaOlYv14jBo93qLvjv7ptNNoLJfi7RVkjF5nv2 IEN6Bcn8Nfm+ZH2cvp70uTZ+6Rbu7Ibe4UpaZE3QAmgcUhQJFuj+FXcjmSGtEA== X-Spam-Score: -4.46 X-Migadu-Queue-Id: 4194913670 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="B/krjeEn"; 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=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.46 X-TUID: JaGpe+hZq9hd dalanicolai writes: >> You likely need to extend `org-babel-scheme--table-or-string' to >> understand Image: type. >> > > It looks to me that when `org-babel-execute:scheme` gets executed, then t= he > result will not get inserted as a link, as that would require the results > type 'file', right? > From the manual , = it > seems to me that using the 'file' type is required to get the result > inserted as a link. > > However, I can not see how the code does the following as explained in the > manual. > > The manual states > (under Type/file): > >> If =E2=80=98file=E2=80=99 header argument is missing, Org generates the = base name of the >> output file from the name of the code block, and its extension from the = =E2=80=98 >> file-ext=E2=80=99 header argument. In that case, both the name and the e= xtension >> are mandatory. >> > suggesting that a file gets written also when there is no :file header > argument. > But from the `and` condition here > > in `org-babel-execute-src-block`, it looks to me that a file is only > written when a :file argument is provided (via the `with-temp-file` that > follows within the 'when file ...'). > Anyway, this I only found when trying to find out how the result gets > formatted as a link. One can use :results file link without :file header argument. #+begin_src bash :results file link echo -n "~/Downloads/wallpaper.png" #+end_src #+RESULTS[9c92ca9d7a3cce34ddcc4714ea917225be60e080]: [[file:/home/yantar92/Downloads/wallpaper.png]] I now clarified this on main https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3Db2adb68af Hope it clarifies how to achieve what you want without advice. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at