Lin Sun <sunl...@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.