From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +PZJAwMNzmRa+AAASxT56A (envelope-from ) for ; Sat, 05 Aug 2023 10:49:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EFUQAwMNzmQmLwAAauVa8A (envelope-from ) for ; Sat, 05 Aug 2023 10:49:07 +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 1B9135C732 for ; Sat, 5 Aug 2023 10:49:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=awzvdBRe; 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=1691225346; 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: 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=EOcAHItmJeR1nSi5K8JxjsLianajyrQBfhIuuZwPS+k=; b=gdYcU1Yy21iwCa7euwf9wSAsKU4rSogpxGrw1Jl+DbLznmSPiF2E72Clv/+za3AQAvvl75 ApShpcqsat/y+Bb6vN2hnLpw0b/LxYAFj70vr6QlSD7Lfp061sIbjNDfDv4WGWC1ZmqcH+ /iYSYBxgi4rA9p3qb/cGQM3jHwMo0T6L9k3L06af59csFE/pt5BK1iENTKbyZEdiBIHcQR //aocC7jZd8sUy4W5oS3BuXdlbVIio9ppjyIvYiQ0yGspjkiBpAVOTy53/9rAMQOLPPcdm L3z9wXgzDA0AVkKa4uxrZELTDtJCMI5StxCWmg7neAoe+Sgt0fRdl1Vx2AqdhA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=awzvdBRe; 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=1691225346; a=rsa-sha256; cv=none; b=aLDuTNDAzhixLq2sifRrFFdcWP2+Dhbc9JLH0xtMlrkeoi+K9TmtjIOBn1DeUfklCKFTMG 2DGM/F27qde0E68y39FSYoVcN6QNLPqu/y/WlAhXKoCRxVC0dgWWxWDcU2/qehtDXyB7Aj f/nLnOikBzTomtitrjcf49zRnlrxs3T+qF8nDLvFPHvxXKBNzomIFbQIBug1+O5m0uTqMs 6roOFU7LTnARZu4UFc8VavMp2hUKm+RYNQq6LwLhU5WStrriJqRzntY7PdqUaK/YdeLNAd /MkujUQ2Z79RFluwzrz60ilbPTO/szsk0lTc3w1R/890GTcDv4HHpmCR2x9rTA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSCxH-00019w-S9; Sat, 05 Aug 2023 04:48:11 -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 1qSCxC-00019d-A2 for emacs-orgmode@gnu.org; Sat, 05 Aug 2023 04:48:06 -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 1qSCx9-0006SH-9u for emacs-orgmode@gnu.org; Sat, 05 Aug 2023 04:48:06 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6B4C3240101 for ; Sat, 5 Aug 2023 10:47:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691225279; bh=qfpEJed5zZF75fjFxEasLix+CXA6v7mpuMWlii3WoRM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=awzvdBReM1QseaqQDzkE61hFMVmXt7zp5zedQ7Wi2/KV81Y585NgEBQQQnrJ2LXXM GfvtNdGcxqMdXwmcDladABl4ukpBGvZ/kjcinxfWk0+zfg27HoJ9uCS1EnALN07ZCo bHsAZZHFPbeaT8Crv9hlhqrFC16JI9v121vXllBa2+SQgulhHpO8Vj+gmIpaVtyOHD pjDv7mekZJM0aZ+ss6v9CRrbfuIXo3wUb+z/6is+dDNvawVUxz7zglxyO+2Iev48oI vHBgQ8P06i4NafHHA8FqXwRf8VRxO6dG35AI9d3f+c9HoXeeDxKVBgAOUSD21Y0qii 8fEd8vxr9mvUA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RHx725P88z9rxD; Sat, 5 Aug 2023 10:47:58 +0200 (CEST) From: Ihor Radchenko To: Mehmet Tekman Cc: emacs-orgmode@gnu.org Subject: Re: [ANN] lisp/ob-tangle-sync.el In-Reply-To: References: <875y6hwqqe.fsf@localhost> <87o7k48jcf.fsf@localhost> <87v8e8m0ao.fsf@localhost> <87tttkghou.fsf@localhost> <87wmyc1sud.fsf@localhost> <87r0ok1qx4.fsf@localhost> <87o7jo1q2s.fsf@localhost> <87pm43kz3i.fsf@localhost> Date: Sat, 05 Aug 2023 08:48:24 +0000 Message-ID: <87o7jlzxgn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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_H5=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-Queue-Id: 1B9135C732 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -6.36 X-Migadu-Spam-Score: -6.36 X-TUID: cIjhqoEGsiJN Mehmet Tekman writes: > * Under vanilla `org-babel-merge-params', any number of :tangle header > values are permitted and concatenated together. > > e.g 4: > __________ > =C2=B4 > (should ;; 4. > override-document-and-parent-header-with-local-tfile-and-action > (equal '(:tangle "randomfile sync") > (org-test-with-temp-text > "\ > #+PROPERTY: header-args :tangle /tmp/default_tangle.txt > * Four > :PROPERTIES: > :header-args: :tangle \"newfile.txt\" import > :END: > ** A > #+begin_src conf :tangle randomfile sync > #+end_src" > (test-ob/get-src-block-property :tangle)))) > `----------- > > This result of "randomfile sync" for the :tangle header is seen as > valid.... but it shouldn't, should it? Tangle can only take one value, > so the action of `:any` should also just output one value? > > From the docstring text: > > > Symbol `:any' in the value list implies that any value is allowed. > > It's not clear to me if this means that `:any' or `:any :any` or > `":any :any"` is permitted. > > In my rewrite, I very much take the `:any` or `":any :any"` single > value interpretation when merging the headers together. It is not possible to distinguish between `:any' and `:any any' without reading the user's mind :) So, we can choose arbitrarily. Since the previous version of the code used split-string and unconditionally split the arguments at whitespace, I am inclined to prefer `:any :any' over greedy version. So, #+begin_src lang :tangle yes foo no bar baz "foo bar" should yield '("yes" "foo" "no" "bar" "baz" #("foo bar" 0 7 (org-babel-quote t))) We will allow using quotes to include whitespace. > * Sometimes the value of another header is caught in the value of > another > > e.g 8: "wrap" is caught in the output of `:results' despite it not being > a valid results keyword in `org-babel-common-header-args-w-value= s'. > > __________ > =C2=B4 > (should ;; 8. test-results-and-exports > (equal '(:results "wrap file replace" :exports "code") > (org-test-with-temp-text > "\ > * Eight > #+begin_src sh :results file wrap > #+end_src" > (test-ob/get-src-block-property '(:results :exports))))) > (should ;; 9. do-not-tangle-this-block -- > `----------- > > This test results in "true" for both my rewrite, and the vanilla > function, but I'm not sure how accurate or value this is. This is basically a question about what to do when user supplies incorrect value of a header arg. In such scenarios, we still capture this unknown value. This is useful for some third-party backends that extend standard header args with new possible values. Hope the above makes sense. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at