bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks
Rudolf Adamkovič: > I have a .org file with two kinds of src blocks: > > 1. sqlite blocks > 2. bibtex blocks > > I want to execute all sqlite blocks with org-babel-execute-buffer. > > When I try to do so, org-mode complains: > > org-babel-execute-src-block: No org-babel-execute function for bibtex! > > I know I can work around the problem (as one does in org-mode) with: > > #+property: header-args:bibtex+ :eval no > > Then, why not skip the irrelevant blocks, the ones with no execute functions, > by default? I don't know, but I've reassigned this bug in order to redirect this to the Org list, which serves as the primary place for Org development and discussion.
bug#52547: 29.0.50; Confusing behavior of org-timer-set
Rudolf Adamkovič: > Reproduction steps: > > 1. run 'emacs -Q' > 2. type M-; and then "(require 'org)" > 3. type M-x and then 'org-timer-set' This must be org-timer-set-timer; there's no org-timer-set in Org's tree. > 4. see 'How much time left? (minutes or h:mm:ss)' > 5. type '10m' > > Expected: The timer runs for 10 minutes. > Actual: The timer runs for 10 seconds. > > From the perspective of the user, this makes no sense. Yes, it seems better to at least signal a user-error if the input doesn't match the expected format. Anyway, I'm redirecting this to the Org list. Perhaps someone there will be interested in improving this behavior or reviewing a patch that does so. > P.S. I would also expect auto-load on "org-timer-set". org-timer-set-timer has been autoloaded since 4e2795413 (Add autoload cookie to org-timer-set-timer, 2009-07-27).
:eval yes use and documentation
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 <> #+end_src \begin{center} \today \end{center} [Body of letter] #+begin_src latex :noweb yes <> #+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
Re: format/fill of text in a cell in tables
Ihor Radchenko writes: > George Michaelson writes: > >> Thank you for the continuing support for Org mode. I really appreciate >> the work done. >> >> I would love to understand why there is no built-in 'fill/wrap' >> function for text in a cell, inside an org mode table. >> >> Given how this is a layout mechanism, and heads to M-x ox- >> outcomes, it would be useful to recognize the output is often table >> edit states which do respect fill/wrap/center > > AFAIK, mostly technical difficulty. Emacs does not natively distinguish > individual table cells, so we would need to emulate cell editing if it > spans over multiple lines. > > Patches are welcome! > I agree. This is actually a much harder problem to solve than it may appear on the surface. There have been a number of proposals regarding how to do this over the years, but unfortunately, they have all had significant drawbacks or limitations. One of which is that formatting tables with multiple lines in LaTeX is actually a bit tricky (probably the only exporter where it is relatively straight-forward is HTML). This means you actually have two broad problems - handling cell wrapping in the org buffers and handling it cleanly in the different exporters. In addition to the problem of defining some mechanism to treat each table cell as if it was it's own 'minibuffer' (in TeX, you sometimes see the 'minipage' environment used in this context), you also have to define some mechanism to describe the relationship between the cells in order to handle things like centring and justification. screen/page width etc. To further complicate matters, you also have to consider what this would mean for org's spreadsheet like capabilities when applied to tables with cells wrapped over multiple lines. If you have lots of cells needing wrapping, the table is perhaps not the right layout mechanism to use. While it may seem like a convenient way to present content, often it isn't a great way to consume it. Donald Knuth wrote a bit about why tables with multiple cell lines were a poor choice. After years of dealing with project managers who too often use Excel to record, present and share data, I tend to agree with his views. I'm also old enough to remember when the table was the 'goto' solution for managing layout in HTML files and what a mess that became. While tables are great when you want to show 2-dimensional relationships, for other situations, alternatives like definition lists, nested lists and breaking the content up into subsections are often a good alternative. It could be argued that not supporting table wrapping is a positive aspect as it makes the author consider alternative layout approaches which may actually improve readability of the content. Finally, there is also an accessibility issue with multiple line tables. For users who rely on assistive technology to consume content, presenting information in a meaningful manner which is easy to navigate and can represent larger 'chunks' of information with appropriate indicators for the relationships between the cells is challenging. As an aside, I sometimes find it useful when thinking about how to layout information, how a typical user will consume it. We tend prefer layouts with infinite length (pages), but with set width. Scrolling up/down is convenient. Scrolling left/right is not. While larger screens means we have more width to work with when reading on the screen, this does not map well to printed pages as that 'width' has not changed - best we can do is switch to 'landscape' rather than portrait mode. The other problem with width is in variability - many people have wide screens on desktops, but narrow screens on mobile devices. We can see how quickly this becomes complex when we consider all the challenges we have had with respect to being able to render web content on different devices with varying screen sizes. Much of the complexity of CSS is related to column layout and screen sizes.
Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)]
On Thu, Dec 16, 2021 at 10:16 AM Ihor Radchenko wrote: > > FYI, it is suspicious. You should be at 9.5.1. Maybe you forgot to make > clean; make autoloads. > I actually run a wrapper script to update Org and that has all that: = # cmds to update to latest commit on git main branch # Ensure that the prefix path is correct in local.mk for # emacs/home/$1 version. sed -i 's|^prefix.*=.*|prefix = /home/kmodi/usr_local/apps/7/emacs/'"$1"'/share|' local.mk # Update the infodir if needed. sed -i 's|^infodir.*=.*|infodir = $(prefix)/org/info|' local.mk echo -e "\\nBuilding for emacs version: $(emacs --version | grep -E 'Emacs [0-9]+\.[0-9]+')\\n" make cleanall make autoloads make compile make doc make install = I verified that at least the git hash was latest as of then: release_9.5-364-g*de022e* > > Steps to reproduce this issue (after setting those variables as suggested > > above): > > > > 1. Install ox-hugo from MELPA and require it > > 2. Download the ox-hugo-manual.org[1] > > 3. Take point to anywhere inside a subtree with :EXPROT_FILE_NAME: > property > > (e.g. under the * Org Special Blocks subtree around line 3038) > > 4. C-c C-e H A (this will export all the valid subtrees in that file > using > > ox-hugo) > > I tried on my side and I am getting "Undefined Org macro: issue; > aborting" Does not look like Org's fault unless I miss something. > There's a setup included in there; I forgot about that. If you don't mind trying it again, this would download everything needed: = git clone https://github.com/kaushalmodi/ox-hugo cd ox-hugo/doc/ # open ox-hugo-manual.org from this dir = and then: = 1. Eval /ox-hugo/ox-hugo.el 2. Take point to anywhere inside a subtree with :EXPROT_FILE_NAME: property (e.g. under the * Org Special Blocks subtree around line 3038) 3. C-c C-e H A (this will export all the valid subtrees in that file using ox-hugo) = I am unable to reproduce but I know why it happened (and it is indeed > different from previous one). I just pushed a fix upstream. > Thanks. I see this version after the update: Org mode version 9.5 (release_9.5-366-g092e92 @ /home/kmodi/usr_local/apps/7/emacs/emacs-28/share/emacs/site-lisp/org/) The git hash is correct ( https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=092e921423f02d48778a0c5d298a211388af8090). So not sure, why it's still saying version 9.5. Sorry, but I am getting similar backtrace in another function now: = Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type") format("org-element-cache diagnostics( *temp*-378635): Int..." 28172 #) org-element--cache-process-request([28170 28171 22333 1 (headline (:raw-value "Usage" :begin 17933 :end 22334 :pre-blank 0 :contents-begin 17942 :contents-end 22334 :robust-begin 17978 :robust-end 22332 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 17933 :CUSTOM_ID "usage" :title "Usage" :mode nil :granularity element :cached t :parent (headline (:raw-value "Reused Sections" :begin 17054 :end 28172 :pre-blank 0 :contents-begin 17072 :contents-end 28172 :robust-begin 17074 :robust-end 28170 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 17054 :title "Reused Sections" :mode nil :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 145098 :end 145098 :robust-begin 3 :robust-end 145096 :post-blank 0 :post-affiliated 1 :path nil :mode org-data :CATEGORY nil :cached t)) :org-element--cache-sync-key (69 . 17054))) :org-element--cache-sync-key (67 . 17933))) 1] 145000 # nil nil) org-element--cache-sync(# #) org-element-at-point(#) org-element-cache-map(#f(compiled-function (el) #) :next-re "^\\*+ " :fail-re "^\\*+ " :narrow t) org-scan-tags(#f(compiled-function () #) t nil nil) org-map-entries(#f(compiled-function () #)) = *Another observation: * I see this warning when building from the latest main: In org-element--cache-sync: org-element.el:5935:19: Warning: assignment to free variable ‘org-element--cache-change-warning’
Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)]
Kaushal Modi writes: > I updated Org to > > Org mode version 9.5 (release_9.5-364-gde022e @ > /home/kmodi/usr_local/apps/7/emacs/emacs-28/share/emacs/site-lisp/org/) FYI, it is suspicious. You should be at 9.5.1. Maybe you forgot to make clean; make autoloads. > Steps to reproduce this issue (after setting those variables as suggested > above): > > 1. Install ox-hugo from MELPA and require it > 2. Download the ox-hugo-manual.org[1] > 3. Take point to anywhere inside a subtree with :EXPROT_FILE_NAME: property > (e.g. under the * Org Special Blocks subtree around line 3038) > 4. C-c C-e H A (this will export all the valid subtrees in that file using > ox-hugo) I tried on my side and I am getting "Undefined Org macro: issue; aborting" Does not look like Org's fault unless I miss something. > 5. The exports abruptly stop around half way due to this error (this error > doesn't always get thrown at the same point): > Debugger entered--Lisp error: (error "Format specifier doesn’t match > argument type") > format("org-element-cache diagnostics( *temp*-467986): Rea..." # at 26674 in *temp*-467986> "(headline (:raw-value \"Menus\" :begin 28167 > :end 14...") > org-element--cache-process-request(... # > nil nil) I am unable to reproduce but I know why it happened (and it is indeed different from previous one). I just pushed a fix upstream. Best, Ihor
Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)]
> Can you: > 1. Update Org to latest version > 2. set org-element--cache-self-verify to 'backtrace > 3. set org-element--cache-self-verify-frequency to 1.0 > 4. Try to reproduce the warning you are seeing > 5. If you still see it, post the full warning text including the >backtrace (below the warning). > Hi Ihor, I updated Org to Org mode version 9.5 (release_9.5-364-gde022e @ /home/kmodi/usr_local/apps/7/emacs/emacs-28/share/emacs/site-lisp/org/) I am using the latest build of emacs-28 branch: = Emacs version: GNU Emacs 28.0.90 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.12) of 2021-12-16, built using commit 1e578267fb19208504d28253e0c892ceb9a34fb4. ./configure options: --prefix=/home/kmodi/usr_local/apps/7/emacs/emacs-28 '--program-transform-name=s/^ctags$/ctags_emacs/' --with-modules --with-harfbuzz --with-native-compilation --enable-checking=yes,glyphs --enable-check-lisp-object-type CPPFLAGS=-I/home/kmodi/stowed/7/include 'CFLAGS=-ggdb3 -Og' 'CXXFLAGS=-ggdb3 -Og' 'LDFLAGS=-L/home/kmodi/stowed/7/lib -L/home/kmodi/stowed/7/lib64 -ggdb3' Features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB = I also set those 2 variables and then exported the ox-hugo-manual.org[1] using ox-hugo and get those warnings[2]. Steps to reproduce this issue (after setting those variables as suggested above): 1. Install ox-hugo from MELPA and require it 2. Download the ox-hugo-manual.org[1] 3. Take point to anywhere inside a subtree with :EXPROT_FILE_NAME: property (e.g. under the * Org Special Blocks subtree around line 3038) 4. C-c C-e H A (this will export all the valid subtrees in that file using ox-hugo) 5. The exports abruptly stop around half way due to this error (this error doesn't always get thrown at the same point): = org-babel-exp process org at position 59086... org-babel-exp process org at position 59385... org-babel-exp process org at position 60069... org-babel-exp process org at position 60740... org-babel-exp process org at position 63055... Saving file /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/doc/content/doc/image-links.md... Wrote /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/doc/content/doc/image-links.md [ox-hugo] 21/ Exporting ‘Source blocks’ .. org-element--cache-process-request: Format specifier doesn’t match argument type (I have an advice applied in between: modi/advice-org-tangle-and-export-boost. But it's unrelated to this error.) Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type") format("org-element-cache diagnostics( *temp*-467986): Rea..." # "(headline (:raw-value \"Menus\" :begin 28167 :end 14...") org-element--cache-process-request([26673 26673 25896 1 (paragraph (:begin 26634 :end 26674 :contents-begin 26634 :contents-end 26674 :post-blank 0 :post-affiliated 26634 :mode nil :granularity element :org-element--cache-sync-key (76 26672 1152921504606846975) :cached t :parent (item (:bullet "8. " :begin 26631 :end 26674 :contents-begin 26634 :contents-end 26674 :checkbox nil :counter nil :structure ((26009 0 "1. " nil nil nil 26029) (26029 0 "2. " nil nil nil 26145) (26145 0 "3. " nil nil nil 26167) (26167 0 "4. " nil nil nil 26346) (26226 3 "- " nil nil nil 26346) (26346 0 "5. " nil nil nil 26462) (26389 3 "- " nil nil nil 26462) (26462 0 "6. " nil nil nil 26564) (26564 0 "7. " nil nil nil 26631) (26631 0 "8. " nil nil nil 26674)) :pre-blank 0 :post-blank 0 :post-affiliated 26631 :tag nil :mode item :granularity element :org-element--cache-sync-key (76 26672 -1) :cached t :parent (plain-list (:type ordered :begin 26009 :end 26674 :contents-begin 26009 :contents-end 26674 :structure ... :post-blank 0 :post-affiliated 26009 :mode nil :granularity element :org-element--cache-sync-key ... :cached t :parent ...)) 2] nil # nil nil) org-element--cache-sync(# #) org-element-at-point(#) org-element-cache-map(#f(compiled-function (el) #) :next-re "^\\*+ " :fail-re "^\\*+ " :narrow t) org-scan-tags(#f(compiled-function () #) t nil nil) org-map-entries(#f(compiled-function () #)) org-export--prepare-file-contents("/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/el..." "548-589" 0 4 1 # "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/el...") org-export-expand-include-keyword() org-export-as(hugo :subtreep nil nil (:output-file "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/el...")) #f(compiled-function (backend file &optional async subtreep visible-only body-only ext-plist post-process) "Call `org-export-as' with output to a specified file.\n\nBACKEND is either an export back-end, as returned by, e.g.,\n`org-export-create-backend', or a symbol referring to\na registered back-end. FILE is the name of the output file, as\na string.\n\nA non-nil optional argument ASYNC means th
Re: org-cite and export to ODT
On Wednesday, 15 Dec 2021 at 23:57, Xianwen Chen (陈贤文) wrote: > Thank you John. I'm not sure why it does not work. Below is the > minimal example I created, using your example. I ran C-e o o to export > to ODT. The resulted ODT file didn't have the reference. I don't use org-ref but, just in case this helps, the new cite engine needs a line asking to generate the actual bibliography, i.e. #+printbibliography: at the point in your document where you want it to apear. -- : Eric S Fraga, with org release_9.5.1-254-g14ed65 in Emacs 29.0.50 : Latest paper written in org: https://arxiv.org/abs/2106.05096
Re: [BUG] Indirect buffer of indirect buffer is truncated [9.5.1 (9.5.1-g36086a @ /home/nisan/.emacs.d/elpa/org-9.5.1/)]
Nisan Stiennon writes: > ... > Follow these steps: > > 1. S-tab to fold everything. > 2. With point on the "I" heading, C-u C-c C-x b to open an indirect buffer. > 3. With point on the "I" heading in the new buffer, C-u C-c C-x b to open > another indirect buffer. Thanks for reporting! Fixed on bugfix via 7ec9e3711. Best, Ihor
Re: format/fill of text in a cell in tables
George Michaelson writes: > Thank you for the continuing support for Org mode. I really appreciate > the work done. > > I would love to understand why there is no built-in 'fill/wrap' > function for text in a cell, inside an org mode table. > > Given how this is a layout mechanism, and heads to M-x ox- > outcomes, it would be useful to recognize the output is often table > edit states which do respect fill/wrap/center AFAIK, mostly technical difficulty. Emacs does not natively distinguish individual table cells, so we would need to emulate cell editing if it spans over multiple lines. Patches are welcome! Best, Ihor
Re: [BUG] Error when using Org with emacsplus on MacOS with native comp [9.6 (9.6-??-27edae8 @ /Users/pedroabelleiraseco/.emacs.d/.local/straight/build-28.0.90/org/)]
Pedro Abelleira Seco writes: > Re: [BUG] Error when using Org with emacsplus on MacOS with native comp [9.6 > (9.6-??-27edae8 @ > /Users/pedroabelleiraseco/.emacs.d/.local/straight/build-28.0.90/org/)] Could you provide more details? What kind of error? Best, Ihor
format/fill of text in a cell in tables
Thank you for the continuing support for Org mode. I really appreciate the work done. I would love to understand why there is no built-in 'fill/wrap' function for text in a cell, inside an org mode table. Given how this is a layout mechanism, and heads to M-x ox- outcomes, it would be useful to recognize the output is often table edit states which do respect fill/wrap/center (If this is documented or I missed how it can be done, apologies. My reading strongly suggests its in extensions, and not really supported in the model) -George
[BUG] Error when using Org with emacsplus on MacOS with native comp [9.6 (9.6-??-27edae8 @ /Users/pedroabelleiraseco/.emacs.d/.local/straight/build-28.0.90/org/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. Emacs : GNU Emacs 28.0.90 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2021-12-12 Package: Org mode version 9.6 (9.6-??-27edae8 @ /Users/pedroabelleiraseco/.emacs.d/.local/straight/build-28.0.90/org/) current state: == (setq org-link-elisp-confirm-function nil org-directory "~/org/" org-after-refile-insert-hook '(save-buffer) org-indirect-buffer-display 'current-window org-crypt-key nil org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-load-hook '(+org-init-org-directory-h +org-init-appearance-h +org-init-agenda-h +org-init-attachments-h +org-init-babel-h +org-init-babel-lazy-loader-h +org-init-capture-defaults-h +org-init-capture-frame-h +org-init-custom-links-h +org-init-export-h +org-init-habit-h +org-init-hacks-h +org-init-keybinds-h +org-init-popup-rules-h +org-init-protocol-h +org-init-protocol-lazy-loader-h +org-init-smartparens-h) org-startup-folded nil org-babel-after-execute-hook '(org-redisplay-inline-images) org-link-abbrev-alist '(("doom-repo" . "https://github.com/hlissner/doom-emacs/%s";) ("wolfram" . "https://wolframalpha.com/input/?i=%s";) ("wikipedia" . "https://en.wikipedia.org/wiki/%s";) ("duckduckgo" . "https://duckduckgo.com/?q=%s";) ("gmap" . "https://maps.google.com/maps?q=%s";) ("gimages" . "https://google.com/images?q=%s";) ("google" . "https://google.com/search?q=";) ("youtube" . "https://youtube.com/watch?v=%s";) ("github" . "https://github.com/%s";)) org-agenda-files '("~/org/") org-capture-templates '(("t" "Personal todo" entry (file+headline +org-capture-todo-file "Inbox") "* [ ] %?\n%i\n%a" :prepend t) ("n" "Personal notes" entry (file+headline +org-capture-notes-file "Inbox") "* %u %?\n%i\n%a" :prepend t) ("j" "Journal" entry (file+olp+datetree +org-capture-journal-file) "* %U %?\n%i\n%a" :prepend t) ("p" "Templates for projects") ("pt" "Project-local todo" entry (file+headline +org-capture-project-todo-file "Inbox") "* TODO %?\n%i\n%a" :prepend t) ("pn" "Project-local notes" entry (file+headline +org-capture-project-notes-file "Inbox") "* %U %?\n%i\n%a" :prepend t) ("pc" "Project-local changelog" entry (file+headline +org-capture-project-changelog-file "Unreleased") "* %U %?\n%i\n%a" :prepend t) ("o" "Centralized templates for projects") ("ot" "Project todo" entry #'+org-capture-central-project-todo-file "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil) ("on" "Project notes" entry #'+org-capture-central-project-notes-file "* %U %?\n %i\n %a" :heading "Notes" :prepend t) ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file "* %U %?\n %i\n %a" :heading "Changelog" :prepend t) ) org-persist-after-read-hook '(org-element--cache-persist-after-read) org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3)) org-export-before-parsing-hook '(org-attach-expand-links) org-default-notes-file "/Users/pedroabelleiraseco/org/notes.org" org-refile-use-outline-path 'file org-archive-hook '(org-attach-archive-delete-maybe) org-file-apps '((remote . emacs) (auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-catch-invisible-edits 'smart org-persist-before-read-hook '(org-element--cache-persist-before-read) org-font-lock-set-keywords-hook '(doom-themes-enable-org-fontification) org-modules '(ol-bibtex) org-image-actual-width nil org-attach-use-inheritance t org-mode-local-vars-hook '(+org-init-gifs-h eldoc-mode) org-mode-hook '(er/add-org-mode-expansions
Re: org-cite and export to ODT
Thank you John. I tried to C-c C-e. I was reminded that org-ref-cite-natmove's function definition is void. I also don't have functions that start with org-ref-export. I suspect that I didn't load a file or package. Bruce and András, I upgraded org-mode on my system to 9.5. org-cite works after I added (require 'oc) Your examples work. I also noticed that I didn't need the following line: #+cite_export: csl Xianwen On Thu, Dec 16, 2021 at 12:50 AM John Kitchin wrote: > you are still not getting the directions. You don't export with C-c Ce oo > here. You run that src block by putting your cursor in it and typing C-c > C-c to run it. > > For org-ref, you have to use a preprocessing hook to replace the cite > links with the csl derived links before the export is done. That is what > the src block does. It temporarily defines org-export-before-parsing-hook > to run those three hook functions before making an odt file. > > Alternatively you can do C-c C-e ro which will use the org-ref exporter > that at least runs the org-ref csl preprocessor. > > John > > --- > Professor John Kitchin (he/him/his) > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > > On Wed, Dec 15, 2021 at 6:58 PM Xianwen Chen (陈贤文) > wrote: > >> Thank you John. I'm not sure why it does not work. Below is the minimal >> example I created, using your example. I ran C-e o o to export to ODT. The >> resulted ODT file didn't have the reference. >> >> #+title: A basic example of org-ref for csl export >> #+options: toc:nil >> #+csl-style: apa-5th-edition.csl >> #+csl-locale: en-US >> >> * Bibliography >> >> bibliography:~/data/library/bibliography/biblatex/biblatex.bib >> >> cite:bayulken-et-al-2020-nbs-climate_change-pandemics >> >> * build :noexport: >> >> #+BEGIN_SRC emacs-lisp :results silent >> (let ((org-export-before-parsing-hook '(org-ref-cite-natmove ;; do this >> first >> org-ref-csl-preprocess-buffer >> org-ref-refproc))) >> (org-open-file (org-odt-export-to-odt) 'system)) >> #+END_SRC >> >> >> On Wed, Dec 15, 2021 at 10:16 PM John Kitchin >> wrote: >> >>> That code does not belong in your .emacs file. It should be in an >>> emacs-lisp block in your org-file like it is in the example. You should run >>> it from the org file. >>> >>> >>> >>> >>> John >>> >>> --- >>> Professor John Kitchin (he/him/his) >>> Doherty Hall A207F >>> Department of Chemical Engineering >>> Carnegie Mellon University >>> Pittsburgh, PA 15213 >>> 412-268-7803 >>> @johnkitchin >>> http://kitchingroup.cheme.cmu.edu >>> >>> >>> >>> On Wed, Dec 15, 2021 at 5:12 PM Xianwen Chen (陈贤文) < >>> xianwen.c...@gmail.com> wrote: >>> Thank you all for the responses. I have to upgrade from orgmode 9.4.4 to 9.5 first, to try out org-cite. I tried https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org#opendocument. I added the following codes to my .emacs: (let ((org-export-before-parsing-hook '(org-ref-cite-natmove ;; do this first org-ref-csl-preprocess-buffer org-ref-refproc))) (org-open-file (org-odt-export-to-odt) 'system)) I tried to eval-region, after selecting these codes. I got the complain that org-ref-cite-natmove's function definition is void. Do I need to install or require something other than cite-ref? Xianwen On Thu, Dec 9, 2021 at 2:57 PM John Kitchin wrote: > If you are trying to use org-ref for this see > https://www.youtube.com/watch?v=rRR-5NSpKyE and this example: > https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org#opendocument. > You need to use a preprocessing hook (org-ref-csl-preprocess-buffer) with > org-ref to get the citations and bibliography . > John > > --- > Professor John Kitchin (he/him/his) > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > > On Thu, Dec 9, 2021 at 4:54 AM Xianwen Chen (陈贤文) < > xianwen.c...@gmail.com> wrote: > >> I have been using org-ref and biblatex. They export well to PDF, >> through LaTeX. I am able to export to ODT as well. However, I'm not able >> to >> have the bibliography or the references in the produced ODT. >> >> I searched online and found this tutorial: >> https://kjambunathan.github.io/org-mode-ox-odt/Bibliography-and-Citations-in-ODT-export.html. >> However, when following through the tutorial, I wasn't able to find >> ox-jabref. >> >> Thinking about the new org-cite, which is orgmode's native citation >> solution, I'm wondering if it would be easier to use org-