From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id SIQiIMarK2ZMcAAAe85BDQ:P1 (envelope-from ) for ; Fri, 26 Apr 2024 15:27:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id SIQiIMarK2ZMcAAAe85BDQ (envelope-from ) for ; Fri, 26 Apr 2024 15:27:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OwaKHhoS; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714138054; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UMEEMhpbpvIHLDa7gBiRgAvkyziX9Xf79kAV1ZL/7nI=; b=TJq4q2uSgdWUSWuS6GH6IWqOVNac4H9FP9SwSDd1IqY2UaanEviBIxU6TJolZES3PYEUcE 4wqfZ/cHAzOJFFFBK5IPTiVwEM6zQs2O9hDZ+lGvNI9O+Q/y399WviO138SmDa5lqga3Zv xJv0iBGZtXAaq2G+wZ590xeqEsc+t2Asj0w8J5dCS2IVjo/hDjbLVKRbT2niJ2MrgDCMVO e1NXLPIV7sgok73yBglm0qkzR7l99RLcTi9whioDAEwVQS8vGGgEDX6yGTFXlIvzoHzKpw ls36xEeWtoUAWY8sXgSc1JQKmI6QI6quOGJTRnjUz80HODiXDsyt/ggmj/A3XA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OwaKHhoS; 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=1714138054; a=rsa-sha256; cv=none; b=WrDWarvmY+lhyrWEdYSjwecULqw+tt6uqxnQJfwpoyiUHHtMJE5W399rbfIThMYWoAW3Qe A2pYTXsuUG7dGRAp/Uj2DXznYfLdOPAL4PMy18MfllEHPXJn6OJZFgxTHRF6X7wPYWBFBu ZWenPIPgkBDIPzHscRoW8Iftz+UpViswhaXXIT07qn9qhr7oxUDGnIn5ddKHy8gl2n8cQ8 58UanmcpiXJKJ4A7NYm31f2748II9w+ekoFl7Mstm5p99Rm8OV1wK6LxWuSYD0reBHHSD4 o1AV+0GTJe+aPg1oF6BihSrloCJV+D4s46ZB97yV1wurb9t9OtcfOkFnYjZMqg== 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 3681B3E1A9 for ; Fri, 26 Apr 2024 15:27:33 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0Lb8-0001co-O6; Fri, 26 Apr 2024 09:26:42 -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 1s0Lav-0001Z8-VW for emacs-orgmode@gnu.org; Fri, 26 Apr 2024 09:26:31 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s0Lar-0004kC-K5 for emacs-orgmode@gnu.org; Fri, 26 Apr 2024 09:26:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9E7D9240103 for ; Fri, 26 Apr 2024 15:26:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714137982; bh=hpm1TfdlYV3j9+V6spcbfRJUoFsxzpblKfPZJeU7o/w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=OwaKHhoSt7c84yTkaCaTJPxJd3808P9LPc5zwdP1Qb3PKSGy0B8m1QApXhjFsiLH4 GIVSaRxXvyGEVU0F8EhGpMeIKIj+RlChkPVwa7tPRxNtvxbdgcmdIk991nvdUaFGVT /qFPaQLPGeGZXxXR9ln7CB0q9qfsV4T3xsydluH/OpLf2qgPQNE2dfMkujuf1dRY2E PCTGXuxA/A37mlnPed29u9B8FTXzD6zvqkOD7A0CXe9XKbZnnfSJ5WyYjOUcHI+eJz VwyMbO4UnlV5/dJpXJZX37p0tHli1I4LFyHrutveA5Gnp65aLIfchfP3IL4IEHdjnY kyS6/bzEeBpfg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VQtlx5R4lz9rxD; Fri, 26 Apr 2024 15:26:21 +0200 (CEST) From: Ihor Radchenko To: Justin Veilleux Cc: emacs-orgmode@gnu.org Subject: Re: org-babel: complete control over org-babel-execute-src-block behavior In-Reply-To: <87zftqeihe.fsf@cock.li> References: <87zftqeihe.fsf@cock.li> Date: Fri, 26 Apr 2024 13:27:22 +0000 Message-ID: <87v844tft1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.41 X-Spam-Score: -8.41 X-Migadu-Queue-Id: 3681B3E1A9 X-Migadu-Scanner: mx13.migadu.com X-TUID: GLS3nBGlLOy7 Justin Veilleux writes: > Hi. I'm currently trying to write a org-babel-julia backend and I am > having problems. The way I wanted it to work is by executing the code, > and then inserting the results block manually using > `org-babel-insert-result`. I would have passed either :output or a mime > type (such as application/org) to the julia function and received > correctly formatted (with the format function extendable from the julia > side) text. > > However, as I understand it, the result of the org-babel-execute:julia > function will be modified by the org babel infrastructure (with regards > to the src block params). > > Is there a way to bypass this so that I can offload the data > transformation as much as possible to the julia side? I strongly discourage you from doing such thing. There is a reason Org babel wants the output to be in Elisp form, not in the final Org mode form - `org-babel-execute-src-block' takes care about processing various user customizations, like :file and :post header arguments; and respecting user choices about result type. If you want to generate Org mode markup as the output of your babel backend, you can simply set the default result type to raw in org-babel-default-header-args:julia. Then, if your org-babel-execute:julia returns a string containing Org markup, it will be interpreted as Org, unless the user explicitly chooses otherwise. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at