>>> With this change, ONLY-THIS-BLOCK = nil is ignored. This will cause 
>>> problems.
>>> I intended to remove the ONLY-THIS-BLOCK part since it will no longer
>>> be used in the official code.

>> It is still used by `org-babel-tangle' itself.
I meant the signature will be removed throughout the codebase once the
patch is accepted.

>>Yup. `org-babel-tangle-single-block' is not an internal function, so we 
>>cannot frivolously change its signature or change the behavior too much.
Correct, thanks for pointing that out.

>>As for the patch, I tried to run it with simple example and got an error.
I tested on my side and didn't see any failures. Would you mind
sharing the error details?

>> I recommend running make test to check the patch.
I will do that. After reviewing the `ob-tangle/collect-blocks', I
found the following test cases.

#+begin_src emacs-lisp :tangle %r
"H2: relative org-file.lang-ext :tangle %r"
#+end_src

#+begin_src emacs-lisp :tangle %a
"H1: absolute org-file.lang-ext :tangle %a\"
#+end_src

%r and %a are not mentioned in either the org manual or ob-tangle.el.
Where is their logic implemented in ob-tangle.el?

llcc

On Sat, Mar 15, 2025 at 9:55 PM Ihor Radchenko <yanta...@posteo.net> wrote:
>
> Lei Zhe <lzhe...@gmail.com> writes:
>
> >>> With this change, ONLY-THIS-BLOCK = nil is ignored. This will cause 
> >>> problems.
> > I intended to remove the ONLY-THIS-BLOCK part since it will no longer
> > be used in the official code.
>
> It is still used by `org-babel-tangle' itself.
>
> > ... However, after searching on GitHub, I
> > realized that org-babel-tangle-single-block is widely used by many
> > users, so I restored it in the new patch. However, in my opinion, it
> > should eventually be abandoned if the patch gets accepted.
>
> Yup. `org-babel-tangle-single-block' is not an internal function, so we
> cannot frivolously change its signature or change the behavior too much.
>
> As for the patch, I tried to run it with simple example
>
> #+begin_src emacs-lisp :tangle '("1.el" "2.el")
> (+ 1 2)
> #+end_src
>
> and got an error.
>
> Also, ob-tangle/collect-blocks test is failing.
>
> I recommend running make test to check the patch.
> It is also a good idea to add new tests into
> testing/lisp/test-ob-tangle.el
> See https://orgmode.org/worg/org-contribute.html#first-patch
>
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>

Reply via email to