|
| From: | Mehmet Tekman |
| Subject: | Re: [ANN] lisp/ob-tangle-sync.el |
| Date: | Fri, 4 Aug 2023 15:14:04 +0200 |
Ihor Radchenko <yantar92@posteo.net> writes:
>
> Side note: I had one newly added test failing on the latest main. You
> may need to rebase your branch and check if tests are still passing.
>
The rebase was fine, but I'm having a problem aligning my patch branch
to work without any tangle involvement.
The first hurdle is that I'm a little bit unsure about the validity of one of
the tests.
* Under vanilla `org-babel-merge-params', any number of :tangle header
values are permitted and concatenated together.
e.g 4:
__________
´
(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.
* 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-values'.
__________
´
(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.
I've been reordering and splitting commits for a while now, but I think
it's really not easy to seperate the new tangle-sync component from my
merge-params rewrite.
I've attached my patches, including fixes from the last review you gave
- I hope you can make more sense of this than I can.
Best,
Mehmet
0001-testing-lisp-test-ob.el-New-tests-for-merge-params.patch
Description: Text Data
0004-org-babel-common-header-args-w-values-Added-mutually.patch
Description: Text Data
0002-lisp-ob-core.el-Rewrite-of-merge-babel-headers.patch
Description: Text Data
0003-testing-lisp-test-ob.el-update-tests-according-to-ne.patch
Description: Text Data
| [Prev in Thread] | Current Thread | [Next in Thread] |