From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yFxLHL+hT2Mk6wAAbAwnHQ (envelope-from ) for ; Wed, 19 Oct 2022 09:05:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EAJzG7+hT2MZcgAAG6o9tA (envelope-from ) for ; Wed, 19 Oct 2022 09:05:35 +0200 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 F0D998A48 for ; Wed, 19 Oct 2022 09:05:34 +0200 (CEST) Received: from localhost ([::1]:54380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ol38v-0002bH-4N for larch@yhetil.org; Wed, 19 Oct 2022 03:05:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol34Z-0002aU-Tn for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 03:01:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:55061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol34Q-0005AS-3e for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 03:01:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E72F5240101 for ; Wed, 19 Oct 2022 09:00:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666162850; bh=G68WPf4khcGPfEzjyK71Bm5RpextjIc1/rUq/IP0Cqo=; h=From:To:Cc:Subject:Date:From; b=cqJy7rQ/GEbEUvisWIQIg7jfXkqko8BnCE7INW7+2DyaPXg2sG0f/D5QvZ/jsRcML dJdf6siTUAcmbhJsQVwPODjAg9GZbCw6bIfaExeYMmP1+re0AdVSejYGQkGfX+ROJ2 gpSG2M4atperJVRURri9eSsHOQCEOGBkkzNMjzs9Wt2tzQQg3XNU5dl4b2dA3iQB+t jk+5z/YrdndmHZsWo7hrDQ6QHBJlbIhlmktxDy46bR7t/xBXH2vDDn94chgv3Gzl12 5h4q1fv1/VorJyW88dwOsUmInYh9og9qJeqh3UXdso/z2eE/ITSb0QDm08Nd1xw+mh WqYkuEgLQbnCw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MshTF6lXDz9rxM; Wed, 19 Oct 2022 09:00:49 +0200 (CEST) From: Ihor Radchenko To: Ferdinand Pieper Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Add light argument to org-babel-lob-get-info In-Reply-To: <87wn8xds64.fsf@ims.uni-hannover.de> References: <877d109d3k.fsf@ims.uni-hannover.de> <87bkqaizns.fsf@localhost> <87wn8xds64.fsf@ims.uni-hannover.de> Date: Wed, 19 Oct 2022 07:01:35 +0000 Message-ID: <874jw0cn5c.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H2=-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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666163135; 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=AaXl0b7L6/dVyTurQ3BOz1jcV7W5K4fw3pmfnQmfT8k=; b=tGONRZU9NI/tbOUzmiPkhNtP5YC4ZSCAemi0U5ADj7onY6XxfbF52//1rTvop3+9SmCIJH Cgew7nAgeDKA4luXxLjufUM6lMTvsQJ65ebMBLsNvvQkKgCh1bv6Yburs/6q1j44Z371kq H6my94JWyXXM+rzhsjgOOtIk7R3Qq6erKotAkynfouB1vMrvcGmmc2uNc4dk4+pux4WeZu zyxvkXIMJ4+LX/j3liPufM86mCIUi8Iu2j7prieEj+BxOPNAkFWvhN56ZLzQ+wVqskPSKK 2HJ8Eg37CztOlEAAc7E/WHfSygK4PUA1U+kaOvh8wCcR5nNx0OEXY7CFuNnI3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666163135; a=rsa-sha256; cv=none; b=Y43HR+rTw6I5CzmOTAjlhuUM4o4yS/nLfw57xxBgTRvTio1arBun0vCw9qAaryBZMzTy13 5wyPrmpvOUZeVVVar+I5Ve1DtSe2ZdXr655pELUwpPVBMNHvO+KX0SHc3g0t+isoRx4KtR n1D/DXRYRf5Yj0BaIXGUjoMSYsuWvKjP2MXtCAe3svEy2d2mGTEIMr74suuITfMbK/2J5u jNAhERnoOrhG879XXQFS+oIZiz1cB8tx9eFYbViPQV2CyqvyjEPJhAtgTnW2mqqGsTAVCk Nj+UqeHEG9fh4F5Y6MGyGCk13p9yo84UwORHrp1QFHelriCShPyx/FkGJnK27Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="cqJy7rQ/"; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -1.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="cqJy7rQ/"; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: F0D998A48 X-Spam-Score: -1.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7o19ln8PgQth Ferdinand Pieper writes: > Ihor Radchenko writes: > >> I'd prefer to change LIGHT to NO-EVAL, including in >> org-babel-get-src-block-info. Changing argument name in function does >> not affect its caller in any way. Just need to update the function body >> and docstring carefully. >> >> NO-EVAL is already used by org-babel-parse-header-arguments and >> org-babel-params-from-properties. > > I also prefer the NO-EVAL naming. I updated the patch to use no-eval and also added a second patch to rename the light argument of org-babel-get-src-block-info and all its occurrences (I changed the 'light to 'no-eval in all its calls only for consistency and future proofing reasons, altough it is unnecessary right now). Feel free to squash them into one commit. I was not sure wether one or two commits would be preferred. Thanks! Applied onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bbec9aafee8f0cd022a8e2b782ac1f3f920fdb8f https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e58bd039e3c885cc3a3e6fd422b5a06a9ad1eea4 >> May I know if you are proposing this for a specific purpose? > > Thanks for asking. I use it in a function that creates quasi unique names similar to org-babel-temp-file. But instead of random names it uses the source block content and header info to create a unique hash. This makes it very easy to create unique but from call to call consistent filenames in header arguments, when you don't want to worry about the filename, but also don't want to clutter your result directory (especially if its not /tmp) or care about constant filenames, e.g. for linking. Without the no-eval/light argument the hash generation gets stuck in a recursive loop. I attached the functions for reference. > If there is wider interest in this, these could be added to org either as a variant of org-babel-temp-file or as an extension. Have you seen org-babel-temp-stable-file? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at