From: Ihor Radchenko <yantar92@gmail.com>
To: Lin Sun <sunlin7@hotmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: *doc/org-manual.org: Fix the description for "Internal Link" in the org-mode manual
Date: Fri, 03 Jun 2022 14:13:30 +0800 [thread overview]
Message-ID: <87v8ticm0l.fsf@localhost> (raw)
In-Reply-To: <TYCP286MB1986966D4B9B0DCAA2C6BF34FBDE9@TYCP286MB1986.JPNP286.PROD.OUTLOOK.COM>
Lin Sun <sunlin7@hotmail.com> writes:
> And changing the "CAPTION" to "PROPERTY" in the foot script, is it correctly? Thanks
Adding PROPERTY works by accident. (I am wondering what is the logic
behind this idea - there is no meaningful semantic meaning for PROPERTY
keyword in this context)
When you have
-------------
#+begin_src python :results table
return 1
#+end_src
#+PROPERTY:
#+NAME: Test
#+RESULTS:
|1|
[[Test]]
-------------
The buffer AST is roughly the following (you can reproduce by calling
M-: (org-element-parse-buffer)):
(org-data (...) ...
(src-block (...))
(keyword (:key "PROPERTY" ...))
(table (:name "Test" :results ""...))
(paragraph (...)
(link (<Test>...))))
When org-babel searches for results of evaluation, it is looking at the
immediate[1] element following the src-block. That element must have
:results property (because of #+RESUTLS: affiliated keyword).
When you add #+PROPERTY: line in front of the results, you are adding a
new keyword element right after the src-block (#+PROPERTY: is not an
allowed affiliated keyword and it is thus recognized as an independent
element). So, when org-babel tries to search and remove the results of
evaluation during export, it is not able to find any because the
following element is just a keyword, not an element with :results
property. Hence, your export appears to be "fixed".
Best,
Ihor
[1] Strictly speaking, not just immediate. When the src-block has :name
property, org-babel searches further for another following element with
the same :results property.
next prev parent reply other threads:[~2022-06-03 6:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 0:16 *doc/org-manual.org: Fix the description for "Internal Link" in the org-mode manual Lin Sun
2022-06-02 14:15 ` Ihor Radchenko
2022-06-02 14:32 ` Ihor Radchenko
2022-06-02 16:37 ` Lin Sun
2022-06-03 6:13 ` Ihor Radchenko [this message]
2022-06-03 15:13 ` Lin Sun
2023-12-24 11:44 ` Ihor Radchenko
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=87v8ticm0l.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=sunlin7@hotmail.com \
/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).