Dear org community, It seems that there is a bug (or a thing that was not yet implemented) with rendering tables that contain org-mode citations (i.e., [cite:@paper]) from source block results. Here is an example: #+BEGIN_SRC emacs-lisp :results table replace "Prior research [cite:@paper] suggests that..." #+END_SRC #+RESULTS: | Prior research suggests that... | The expected outcome should be: #+RESULTS: | Prior research [cite:@paper] suggests that... | It seems that this does not depend on src language (I have also tried with R and got the same issue). I have already asked it on StackExchange (https://emacs.stackexchange.com/questions/75270) and user 'Simka' pointed out that the cause of this issue is somewhere in `orgtbl-to-generic' and it is about undefined export backend for citations. Kind regards, Stas ------------------------------------------------------------------------ Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12 Package: Org mode version 9.5.5 (9.5.5-g8ef620 @ /home/stas/.emacs.d/straight/build/org/)
Stanislav Vlasov <S.Vlasov@tilburguniversity.edu> writes: > #+BEGIN_SRC emacs-lisp :results table replace > "Prior research [cite:@paper] suggests that..." > #+END_SRC > > #+RESULTS: > | Prior research suggests that... | > > The expected outcome should be: > > #+RESULTS: > | Prior research [cite:@paper] suggests that... | > > It seems that this does not depend on src language (I have also tried with R and got the same issue). Confirmed. The problem is rather fundamental one. Citation processing is supposed to be independent from the export backends. However, `orgtbl-to-generic' is bypassing the citation processing and calls `org-export-data-with-backend` directly with ox-org backend not handling citation objects. There are multiple issues revealed here: 1. ox.el currently treats missing transcoder info as "export all the unknown elements/objects and empty strings" - this is rather forward-incompatible design that may catch users by surprise when Org adds new syntax elements (as it happened here, with citations) May ox.el treat missing transcoders as `identity' and only export empty string when transcoder is set to nil explicitly? 2. Does it even make sense to apply the default oc-basic when exporting to org? Should we instead introduce something like oc-identity that does nothing and simply leaves the citations in the original Org syntax, later possibly processed by the specific export backend? Then, we can use this oc-identity in the default value of `org-cite-export-processors': (org identity)? -- 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>
Ihor Radchenko <yantar92@posteo.net> writes: > Stanislav Vlasov <S.Vlasov@tilburguniversity.edu> writes: > >> #+BEGIN_SRC emacs-lisp :results table replace >> "Prior research [cite:@paper] suggests that..." >> #+END_SRC >> >> #+RESULTS: >> | Prior research suggests that... | >> >> The expected outcome should be: >> >> #+RESULTS: >> | Prior research [cite:@paper] suggests that... | >> >> It seems that this does not depend on src language (I have also tried with R and got the same issue). > > Confirmed. > > The problem is rather fundamental one. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=b8ee1315a -- 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>