From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SDAlDW6JLWDmFwAA0tVLHw (envelope-from ) for ; Wed, 17 Feb 2021 21:23:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cCLdCG6JLWDnKQAAbx9fmQ (envelope-from ) for ; Wed, 17 Feb 2021 21:23:58 +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 81D7524223 for ; Wed, 17 Feb 2021 22:23:57 +0100 (CET) Received: from localhost ([::1]:34030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCUIe-0006kx-Fr for larch@yhetil.org; Wed, 17 Feb 2021 16:23:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCTXI-0003VO-W7 for emacs-orgmode@gnu.org; Wed, 17 Feb 2021 15:35:01 -0500 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:34755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCTXG-0002M7-EV for emacs-orgmode@gnu.org; Wed, 17 Feb 2021 15:35:00 -0500 Received: by mail-qt1-x831.google.com with SMTP id c1so10608171qtc.1 for ; Wed, 17 Feb 2021 12:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=jx+pvdajV4p2GIQB+Pf626sAypuHoTbTgaaNy2hGs1Y=; b=UEzBJzEkwdmZP/0eqXptXlRd0BBNDXp3RCasHG9AMJ5b9mbC1YjEq1WgYR5wjaCPn8 rt2HAQRmvq4DlQGcz6aiYoP0ahwYa/zFco9W/KQqIrCUuNXtAIQuJJXkPyUYAaUOBuWa wTbOrZxBNVkUTNq79+KCX7afNa0XpCW+Lf2rir4u6kA2L+FK8jqoYpHg/tw+uu5SMiRK GIEpfoSKHbKTRICJFj37KZJfOEBW8gQo9JNWEoRxTIoOawONi0mJUT+q8WAFx3MhPCBQ ZkkGPYw78DKFNjAIgI7mWrzkR/vogclanIZUu3EYL1toMIeL7XX+GUdmQCUkIAoSZSL3 pVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=jx+pvdajV4p2GIQB+Pf626sAypuHoTbTgaaNy2hGs1Y=; b=jtMiyftdAVqJxqC/WRT2Zwsdzk9kIzDiQbXpKpHTdlozsH7f4MtsZWQAh8bGp1AWas dqHuAwvCGppJKRe2VTre89pXhrygFz7Mxan3PblRHXd1eKLwg4ESfNz7daZbEA9c8q2v v7WiKs5QGnZGYgawWFd4Ci9HnMV2AfbT2RkkiDhXzjbk3LHrgwX7hy3udqb8thiMBh3l zvAJ1fwQEDJYQLiWp17hnj8nOjKtbS0CNt/aS94dZhf/TOTkKY0LR+B6w825qM6v3B0l FOWhp0jJbD5cnyPRPYH7kuH3UJ+oZndEgGAEXCRhzeKl5vLR1sfx9iY3p5i8kYEUZkRu 5jdw== X-Gm-Message-State: AOAM5326tZOWnImJe5COUXhBSCrU138y+Qkz7lHid/Z0YpdHxAfiGVEi jdgiqtqstr07aX1zGtt5BfI= X-Google-Smtp-Source: ABdhPJxyg690gkE5SogqFS1mw8kpkgaoGi/m5Pcjg+/r5YpdrqCjDJgTuclNWWUa6J0wre9D87Q99w== X-Received: by 2002:a05:622a:42:: with SMTP id y2mr1061524qtw.186.1613594097370; Wed, 17 Feb 2021 12:34:57 -0800 (PST) Received: from localhost ([190.239.232.181]) by smtp.gmail.com with ESMTPSA id 199sm2577001qkj.9.2021.02.17.12.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 12:34:56 -0800 (PST) References: <87sg5vlbz9.fsf@gmail.com> <1494323.1613545005@apollo2.minshall.org> User-agent: mu4e 1.4.14; emacs 27.1 From: Rodrigo Morales To: Greg Minshall Subject: Re: How do you name your code blocks? In-reply-to: <1494323.1613545005@apollo2.minshall.org> Date: Wed, 17 Feb 2021 15:31:18 -0500 Message-ID: <87blcitp0p.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::831; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-qt1-x831.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, Eric S Fraga Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=UEzBJzEk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 81D7524223 X-Spam-Score: -0.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: Emrr9iN/BCYX Greg Minshall writes: > Right now, names of source blocks are global to the .org file, and i > don't suspect that will (or should) change. Yep, I understand that. I explained a workaround for using short names for code blocks and avoid name conflicts in [[https://lists.gnu.org/archive/html/emacs-orgmode/2021-02/msg00281.html][this answer]]. Greg Minshall writes: > i apologize for bringing it up, but the one thing that jumps out at the > programmer part of me is that the python blocks in your code don't > "know" what main.txt actually contains when they are executed, as there > is no dependency on the correct "create-file" source block. possibly, > though, if you created some dummy :var (on the python "begin_src" lines) > to express this dependency, it would help? or, maybe it doesn't really > matter? I understand your point. I am currently expressing that dependency by putting a =#+CALL= statement with =:results silent= above the Python code block. However, doing that doesn't really express a dependency because I need to execute the =#+CALL= statement first and then the Python code block. It would be nice if we could associate a code block (B) to another code block (A) so that (B) is execute before (A) is executed. I created [[https://lists.gnu.org/archive/html/emacs-orgmode/2021-02/msg00245.html][this thread]] in the mailing list asking this. One of the solutions mentioned in that thread is to use the =:var= header argument which you mentioned and works great. >From now on, I will be using the ID of the current subtreeas the suffix (not prefix) of code block names so that name conflicts doesn't occur between different subtrees and will express dependency between code blocks by using the =:var= header argument. Perhaps, having a =:pre= header argument, just as the =:post= header argument exist, would help expressing depdency between code blocks in a clearer way. I consider the =:var= header argument a hacky way to associate two code blocks. -- Rodrigo Morales.