Lei Zhe <[email protected]> writes:

> Sorry for the late reply.
> Please check the updated patch.

Thanks!

>>> 2. in ORG-NEWS, we need to document that
>>> org-babel-tangle-use-relative-file-links is ignored
> Done.

There are some in org-manual.org. This is minor though.
I will provide some more comments on the manual and other parts of the
patch below.

>>> 4. *** New function ~org-babel-tangle--compute-targets~
>>>   is not needed. We do not announce changes and additions to the
>>>    internal functions (with "--" in their name)
> I have removed it from the patch.
>
>>> 5. We are introducing a breaking change in the return value of
>>>     `org-babel-tangle-single-block'. As discussed earlier, we should
>>>    probably introduce a new optional argument ALLOW-MULTIPLE to
>>>    preserve backwards-compatibility as much as possible.
> Since relative links are handled by guarding the logic in
> `org-babel-tangle--unbracketed-link`, there should be no compatibility
> issues with the current approach.

I am mostly worried about third-party code.
I have checked the code on github, and, luckily, it does not look like
anything will be broken - most code uses
(car (org-babel-tangle-single-block ... 'only-this-block))

So, not going 100% backwards-compatible might be ok-ish.
However, please do announce changes in the return value in the ORG-NEWS.

> +  Example:
> +  #+begin_src emacs-lisp :tangle '("config.el" "backup.el") 
> :tangle-directory '("~/.config" "/backup")
> +  (message "Tangling to multiple targets specified by :tangle and 
> :tangle-directory")
> +  #+end_src

This is not right. The code block will be exported without header
arguments into the manual. Please do
#+begin_example
,#+begin_src ...
...
#+end_example

> +Source blocks can now be tangled to multiple target files using
> +the ~:tangle~ header argument.  The following forms are now supported:
> +
> +- ~:tangle "file1.el"~ (existing behavior)
> +- ~:tangle '("file1.el" "file2.el")~ (new: list of files)
> +- ~:tangle (get-tangle-targets)~ (new: function returning paths)
> +- ~:tangle 'tangle-targets~ (new: variable returning paths)

Here and elsewhere, please use =...= for verbatim Org markup example, not ~...~.

> +Example:
> +#+begin_src emacs-lisp :tangle '("config.el" "backup.el") :tangle-directory 
> '("~/.config" "/backup")
> +(message "Tangling to multiple targets specified by :tangle and 
> :tangle-directory")
> +#+end_src

Same problem with export. Use #+begin_example

>  (defcustom org-babel-tangle-use-relative-file-links t
> -  "Use relative path names in links from tangled source back the Org file."
> +  "Use relative path names in links from tangled source back the Org file.
> +
> +Note that relative links are not used when a code block is tangled into
> +multiple target files."
>    :group 'org-babel-tangle
>    :type 'boolean)

Let's put :package-version '(Org . "10.0") here to indicate that the meaning
slightly changed.
  
All the above are minor changes. Otherwise, the patch is ready to be
merged.

-- 
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