From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QEAHMumVamA/hAEAgWs5BA (envelope-from ) for ; Mon, 05 Apr 2021 06:45:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AKfrK+mVamDhCwAAbx9fmQ (envelope-from ) for ; Mon, 05 Apr 2021 04:45:29 +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 E379311E4C for ; Mon, 5 Apr 2021 06:45:28 +0200 (CEST) Received: from localhost ([::1]:36146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTH78-0005qu-L7 for larch@yhetil.org; Mon, 05 Apr 2021 00:45:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTH6k-0005qn-Rh for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 00:45:02 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:38781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTH6i-00036d-V1 for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 00:45:02 -0400 Received: by mail-pj1-x1032.google.com with SMTP id k23-20020a17090a5917b02901043e35ad4aso7263759pji.3 for ; Sun, 04 Apr 2021 21:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=udVACKNdPD3W9eKjlj11wpTbsDjE9ObXO9scnG/Incw=; b=LMtrUepu3GhkSZi2dhYh0S5/0+vCcuRaWycQSOt1GYz3kIPkzZ8m7JEyyYqF4cgizK W8NcpxMR1VPI5fW1pf/SlnEVONch2krRorgqrHrFqyCggMr5C5MqvmsvgpuRrqtpXsPt Vb2anJLw3hXjukNqsONtFtireWbS8GcPT8E+JUru4UAk/+sj6SXip9fCw9CS7L6Scij5 mcT3wHViY8ScUwW4odSwSnT8xGSSdiYDMcDtRKVmVQ2lyFwNwAXDdes9s4WAO+9JIqWt eYtW0yLxozWOFcmcXPuOMIEKieuT+8DNdwoUvuLQizYfTQyMjrnvbBPcxB8/01DxxhtP 1UfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=udVACKNdPD3W9eKjlj11wpTbsDjE9ObXO9scnG/Incw=; b=rIQZ9KxmLZGABO1cuMq3JfwUP4NhKCF6tcG8ROiVotmjRR0almuaHI4xBdHvwJFVfO VG6A4V+fT6LgqYYf1xrwpIDXVFpqn6SBhy7O+Ay94ps7fpmg3CJewh0r9OTDWuZyA6dd 6c7PPOjYd2wnFx/+ws94E79qLQzf8uXU3H+92Sxtg9ohyfwURZS816SmoiUFBfWyD4GT jx3PvWkguHKb+g/VK79gI0ueV/h3KXofpayvP+av0GllvEe19subIwSXOOrGsfS8z+Hs hIsiLiBoTK4KJY038ih11NgrkgrPBGuxJei5/0Fr0zWCHqAlkws3mtcS2dWXl5jWIPK+ +iRA== X-Gm-Message-State: AOAM533yj6hMqTY9faOfkayHm++vGvIs9MpvncXgvauCz7Y0dpgN5R7V 8a+c55HutuiMrVX1Tn48qF4= X-Google-Smtp-Source: ABdhPJzjXcUl4/RVhzeGOp3k0aawU+xe9fjzPPcv02oaCNzsgSvRAip4/1eZcK1g1xFZ577/QRFY2A== X-Received: by 2002:a17:90b:360c:: with SMTP id ml12mr13440094pjb.40.1617597898671; Sun, 04 Apr 2021 21:44:58 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id e14sm6913690pga.14.2021.04.04.21.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 21:44:57 -0700 (PDT) From: Ihor Radchenko To: Rodrigo Morales , org-mode-email Subject: Re: [feature request] The :pre header argument In-Reply-To: References: <878s7ljbd7.fsf@gmail.com> Date: Mon, 05 Apr 2021 12:49:09 +0800 Message-ID: <875z112v5m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1032.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: , 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=1617597929; 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: 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=udVACKNdPD3W9eKjlj11wpTbsDjE9ObXO9scnG/Incw=; b=jP/Dga/S1drqedlODrX263Ja2uSEah1ZzMsHcT9791qc7E/EVMAdwXE00FIi2G320qxXHJ fe566aHIKi2qJPgITJxnLdYdypK0Kz1xJjsIgrpyVi25Tiw2lSWdX/Otl4g/Wv2OAfLFJj iX3hVMMb3XzsaxLez9Xj5HwoDO/NZbjBXd40vGLULytdqI3d3WFl06jcsAA+KdHhon7poh Y3QRM3t3U13GAJqKuJ+muhWMtvnEVRZTGRjJApKTwjMrTFt2+VZQZSrSGhb0Vqimk/4Fdp O0Kf0biXKFovMXt7f1+QQSqjQVD95lLd/kmXXb1QnSd9c+JXRxYALEZfcK843Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617597929; a=rsa-sha256; cv=none; b=oWO3j8q8f440rJGWR/UpjZdRstcqJGCZD9pH6HA0HAEwAKhrR9akjIfE6M0GqUI8zBOQkC wf2rXf/zPhcKjr05kFjD+8/nj9wDnSCVnRUREuRc4g1rtEtihm0/qL44xaTVFV/lTLu5tz Ys57pAa68iEqJwui1veuLxYKB6dFOzhytYj9T2qg0qlueoltrBJBwC0wHxNbBguZbwf2dF a9kAZNFO+kXw35e6y8wEMR7cIEm3oG6ZrlTk06h555MdyPO2s7M9n7oalgUR6qnAxfku9p gf1JJF2z8bqVIhDExKlMp1f2M1czls2lmYs1RnpiLGsDIIdhBaTrFnjnuwNcvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LMtrUepu; 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.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LMtrUepu; 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: E379311E4C X-Spam-Score: -2.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: mJaM5uZ/u0/O Hi, Rodrigo Morales writes: > I've provided more relevant information on this feature request [[ > https://codeberg.org/rdrg109/gists/src/branch/main/feature-request-pre-he= ader-argument.org][here]]. > Please consider reading that instead of the first message on this thread. I think the origin intention of the :post header argument is slightly different from your use-case. It is intended to be used for post-processing the results: > The =E2=80=98post=E2=80=99 header argument is for post-processing results= from block > evaluation. When =E2=80=98post=E2=80=99 has any value, Org binds the res= ults to > =E2=80=98*this*=E2=80=99 variable for easy passing to =E2=80=98var=E2=80= =99 header argument > specifications (see *note Environment of a Code Block::). That makes > results available to other code blocks, or even for direct Emacs Lisp > code execution. If you want to execute some arbitrary code before/after your code block, it is probably more canonical to use noweb references. Using your example: #+begin_src emacs-lisp # Cleanup first using experiments/clean-dir(): "<>" # Create dir structure using # minimal-reproducible-example/create-dir-structure: # "<>" # Finally, execute `tree' using experiments/execute-tree: (message "<>") #+end_src It will not produce spurious variable definitions. Best, Ihor