* :eval yes use and documentation [not found] <599bf3cc-6dbe-4010-129c-a639ecd9ae70.ref@verizon.net> @ 2021-12-17 2:19 ` Charles Millar 2022-05-06 9:54 ` Ihor Radchenko 0 siblings, 1 reply; 3+ messages in thread From: Charles Millar @ 2021-12-17 2:19 UTC (permalink / raw) To: emacs-orgmode@gnu.org Org mode version 9.5.1 (release_9.5.1-279-g8908fb @ /usr/local/share/org-mode/lisp/) GNU Emacs 28.0.50 (build 344, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0) of 2020-12-31 Here is a use case. I have many files each with as many as 60 tables that are generated using ob -rec. So that the tables are not evaluated during export it is convenient for me to set a buffer wide #+PROPERTY: header-args :eval never-export. On other hand, each file may also include, under a sub-tree latex source code blocks for signature lines, letter heads, etc. In another sub-tree, called correspondence, those source code blocks are called using :noweb yes, such as #+begin_src latex :noweb yes <<SomeLetterHead>> #+end_src \begin{center} \today \end{center} [Body of letter] #+begin_src latex :noweb yes <<SignatureLine>> #+end_src If I include in the correspondence sub-tree :PROPERTIES: :header-args: :eval yes :END: the results are a complete letter, i.e. letterhead followed by the body and then signature line. If I do not include the ":eval yes" property in the sub-tree, only the body of the letter results, as expected. So after all that, here are some questions: Is ":eval yes" officially allowed and, if so, why is it not documented? Should it be? May its use be inferred from other examples such as those from :cache or colnames? I found the following discussion, but it is fairly old: https://emacs.stackexchange.com/questions/2945/org-babel-eval-with-no-confirmation-is-explicit-eval-yes Charlie Millar ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: :eval yes use and documentation 2021-12-17 2:19 ` :eval yes use and documentation Charles Millar @ 2022-05-06 9:54 ` Ihor Radchenko 2022-10-08 4:27 ` [BUG?] :eval strip-export acts like :eval yes :noweb yes even during export (was: :eval yes use and documentation) Ihor Radchenko 0 siblings, 1 reply; 3+ messages in thread From: Ihor Radchenko @ 2022-05-06 9:54 UTC (permalink / raw) To: Charles Millar; +Cc: emacs-orgmode@gnu.org Charles Millar <millarc@verizon.net> writes: > Is ":eval yes" officially allowed and, if so, why is it not documented? > > Should it be? Yes, it should be. Moreover, we have strip-export value undocumented. Confirmed. Best, Ihor ^ permalink raw reply [flat|nested] 3+ messages in thread
* [BUG?] :eval strip-export acts like :eval yes :noweb yes even during export (was: :eval yes use and documentation) 2022-05-06 9:54 ` Ihor Radchenko @ 2022-10-08 4:27 ` Ihor Radchenko 0 siblings, 0 replies; 3+ messages in thread From: Ihor Radchenko @ 2022-10-08 4:27 UTC (permalink / raw) To: Charles Millar; +Cc: emacs-orgmode@gnu.org Ihor Radchenko <yantar92@gmail.com> writes: > Charles Millar <millarc@verizon.net> writes: > >> Is ":eval yes" officially allowed and, if so, why is it not documented? >> >> Should it be? > > Yes, it should be. Moreover, we have strip-export value undocumented. > > Confirmed. Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1966a7a8a8a2934443f24ca9c968a4eba09c3650 I documented ":eval yes". strip-export value is actually used, but I feel that it is completely wrong. `org-babel-common-header-args-w-values' lists "strip-export" as an allowed value of :eval argument. Further, `org-babel-noweb-p' returns non-nil for ":eval strip-export". The consequences for the callers of `org-babel-noweb-p' when ":eval strip-export" are the following: 1. `org-babel-expand-noweb-references', `org-babel-execute-src-block', and `org-babel-expand-src-block' always expand noweb references. 2. `org-babel-lob-ingest' always expands noweb references. 3. `org-babel-exp-results' __always__ expands noweb references. The (3) is certainly against intuition. `org-babel-exp-results' (which is a part of export process) __does expand noweb references__ when :eval is strip-export. Not to mention that "strip-export" has nothing to do with evaluation itself. Evaluation cannot be "stripped". Should we remove :eval strip-export altogether? It is confusing and does not yield expected results. Since it is also not documented, we should not worry about breaking user configs. -- Ihor Radchenko // yantar92, Org mode contributor, 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> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-08 4:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <599bf3cc-6dbe-4010-129c-a639ecd9ae70.ref@verizon.net> 2021-12-17 2:19 ` :eval yes use and documentation Charles Millar 2022-05-06 9:54 ` Ihor Radchenko 2022-10-08 4:27 ` [BUG?] :eval strip-export acts like :eval yes :noweb yes even during export (was: :eval yes use and documentation) Ihor Radchenko
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.