From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qDvhIY+CZmFnbgAAgWs5BA (envelope-from ) for ; Wed, 13 Oct 2021 08:54:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AESUHY+CZmG7MQAA1q6Kng (envelope-from ) for ; Wed, 13 Oct 2021 06:54:07 +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 07F1219B42 for ; Wed, 13 Oct 2021 08:54:07 +0200 (CEST) Received: from localhost ([::1]:40330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maY9O-0004tS-7O for larch@yhetil.org; Wed, 13 Oct 2021 02:54:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maY8Y-0004tJ-3y for emacs-orgmode@gnu.org; Wed, 13 Oct 2021 02:53:14 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:40885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maY8W-0000U7-Ou for emacs-orgmode@gnu.org; Wed, 13 Oct 2021 02:53:13 -0400 Received: by mail-ed1-x532.google.com with SMTP id g8so5807004edt.7 for ; Tue, 12 Oct 2021 23:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=XVObZIy0nyS0hH7Dr5Oj/CLZJzaWI0X4z1Ed07oix5k=; b=B75gdaaVHF+Mfk4WLU2pZZjYRxadwfh1jU9vrWHa+bPUf06fS7ccF5ZDZLVylIAGxP nE7gzwGRTmQTDH5wrdR9cYgduBmpXLbDDpkxWJVqCh0/yPsSL/nuFuwGKMKgljNDXR+b EfvOGVUjufDf4QGZbKIn2ZExQ6U8zp6Ww76YB41nDqNWrh/gA11+UJ3v4sUWS4EbUxoP UFv1tEyoja0V4BzGzaCYW7hn5aSB1pzcFs8r9gIMJCo8dsZRlvITZEYsDg2bKk6mufjf ZZwS+B5kXxQf5Ry7Vaohfnbu3buFxvuiSb+FAMC4w6rRixKpyx/t4J+MgrF9h7/RXrKU 5EYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=XVObZIy0nyS0hH7Dr5Oj/CLZJzaWI0X4z1Ed07oix5k=; b=zrRmqgEPhJc0VRbKXpQDOqhosflnosGQDe3KgoAVR2ZlK3c/BwKqrqS1Lj3QbL5+bu Zd7zdl4O6TKZq6edLL+IkSms29+6uHVt5HRsrMhOCD0zbFCp+AXxKXcba21aW+AxXBaV hzngctyAt6Fhqd2jNuGdILfsEt7j/gRlFmOtqCRWFk2nrNJFP+Q58wpZ0FBLnsMIxhbx cEun2dJSdniB0LIu79b5m/KvRidtFMl8KURIty7wxO63JEeC/4DubF6ZIjrTMF2TWUYz wxpptVCLoI+pQDVtr+ghVcTOo2jpEqv4oKCJE8XmhQ7OtKhxYvot02Afis/UkmjUTCat C6gg== X-Gm-Message-State: AOAM533lbzwnq33jC0KPzo4a6kHwbRuEMj8TaHdeB7xCx0NzswKiMGfG 2847vrPD9BHsTrhyANxCo3U= X-Google-Smtp-Source: ABdhPJwmakcVIn4bdhtgyKz/zOs1qhUppPOzf2eURTvijoxUNks1M00ooP21h05PXfU42aQvxey8mg== X-Received: by 2002:a05:6402:21d2:: with SMTP id bi18mr6891003edb.21.1634107991260; Tue, 12 Oct 2021 23:53:11 -0700 (PDT) Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id b17sm3041704edy.47.2021.10.12.23.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 23:53:10 -0700 (PDT) From: Ihor Radchenko To: Jason Ross Subject: Re: Best way to include METAPOST in ConTeXt exporter In-Reply-To: References: <87wnmtb2sb.fsf@localhost> <87o884buwf.fsf@localhost> Date: Wed, 13 Oct 2021 14:54:31 +0800 Message-ID: <87fst5s9co.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=yantar92@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org 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=1634108047; 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=XVObZIy0nyS0hH7Dr5Oj/CLZJzaWI0X4z1Ed07oix5k=; b=qNNXwKr7cHTrTOS11KsgZ2TL8/jTmWbVpXYOOO7RdflqpdGwp2Pw3RR4kK66+OgzJsDAd3 GqY2+cB2rAPMxvjXtGqfn3x5JhkYt4rCYk3besY5fBE/ynkzHSXyFJyU0DSwvEoLNxCf7F QGPLgSdV4pWFYGql2lP3EAZZKTqXH17yFUzA7X7l3FvV853XcM0jWo76HmJQaN9KRy1sxG /bCQLNi6CRkwcEbaSeEDFkaDZs0d9XUQFwS4h09o+MHHntBprvv97OMWlFr8R1dYz87DJL 3lKG+TE8mPQKENuopLsXMtZXZ2B+3SV1QZQsraPlDzVBf/o/fIngOxjBbWHMLQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634108047; a=rsa-sha256; cv=none; b=djBr9o+41gJOKNBr0rviBrYUM78Re4TEITJXIzdzMFnBNxYpRrTJBrhxTLebWSa47RD697 K9tgPdJ544gC3KHOf0OcX8Y8Rahx3AmW7H7qF60zX8/O8e/ZoM8v54fYdS0plFeaJcjvFk 1297FmN7jPMq9oHI0y/XcFdiNX5gc6ghCvPZ+N52NSIC3e/uVAHlnz4YDRHxcT3nj123Cc F4ccSGw2mNUL0Th944JNckp5fB36ehOgv49G7thL5vpiR+Js/N8Q0S9Pn8v2FYoEIwPPi6 N6XfVaDmDMGgf3+Y3yXhp7n+IU3zw5xaqAYZgDnY0gxPKzlJCVGjjBkaken8nw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B75gdaaV; dmarc=pass (policy=none) header.from=gmail.com; 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.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B75gdaaV; dmarc=pass (policy=none) header.from=gmail.com; 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: 07F1219B42 X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: HFX/N/2NC/zZ Jason Ross writes: >> Or you can use "raw" results by default and format everything as you >> wish in your Org Babel module programatically. > > I'm not sure I understand this yet. Would this emit METAPOST code to the > Org buffer? Ideally, I'd like to emit METAPOST code if the backend is > `context`, otherwise, emit a file. A hackish way would be detecting if you are executing code during export and emitting different results (say, you may look at org-export-current-backend). However, it will do nothing when user specifies :results file Best, Ihor