emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Charles Millar <millarc@verizon.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [BUG?] :eval strip-export acts like :eval yes :noweb yes even during export (was: :eval yes use and documentation)
Date: Sat, 08 Oct 2022 12:27:08 +0800	[thread overview]
Message-ID: <87bkqnuehv.fsf@localhost> (raw)
In-Reply-To: <87v8uj6l6m.fsf@localhost>

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>


      reply	other threads:[~2022-10-08  4:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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     ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkqnuehv.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=millarc@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).