Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes

How to create a initial collapsed/hidden block in org exported HTML?

Update: this is now supported by org-mode itself: https://orgmode.org/manual/HTML-doctypes.html #+begin_details #+html:<summary>Click to see</summary> Some text #+begin_src elisp (...
Gabriela Moreira's user avatar
0 votes

Getting Latex preview to work with org mode (.dvi not found)

If you symlink your ~/org elsewhere (eg to be synced by iCloud for beorg), this may be the root cause. A solution for this case: (setq org-preview-latex-process-alist '((dvipng :programs ("...
sports_pumpkin's user avatar
0 votes

Save output from ob-mermaid to the org-attach director

Found this solution today, it creates the dir when necessary: #+begin_src mermaid :file (concat (org-attach-dir t) "/example.png") sequenceDiagram A-->>B: Works! #+end_src
Laurent B's user avatar
  • 101
0 votes

how to include :: in the text of an org mode list without it generating a description list?

AFAICT, a double-colon is interpreted as the separator in a description list if, and only if, it is prefixed and suffixed by white space: e.g. - foo::bar is an item called "foo::bar" - So is ...
NickD's user avatar
  • 30.6k
0 votes

Previewing latex in cc-mode

You can apply AUCTeX's preview system to source code comments for C++ (or any language) by upgrading to AUCTeX 14.0.5 and adding the following to your config: (defun my/set-TeX-master () (setq TeX-...
Paul Nelson's user avatar
3 votes
Accepted

Org-mode compare column to constant string

You can turn formula debugging on to see what's going on: C-c {. When you C-c C-c on the formula again, you will see: Substitution history of formula Orig: if("$1" == "hello", OK,...
NickD's user avatar
  • 30.6k
0 votes

How can I use absolute path with org-download?

Check the value of org-link-file-path-type. Its doc string says: How the path name in file links should be stored. Valid values are: relative Relative to the current directory, i.e. the directory of ...
NickD's user avatar
  • 30.6k
0 votes
Accepted

Why would this custom org-num-format-function causes a warning when org-latex-preview called?

Update: I reported this issue, and got an reply On current stable version, they were able to reproduce this issue On development version, there is no this issue. It seems best to wait (at least for ...
Garid's user avatar
  • 666
0 votes

Org mode open directory link in Terminal

Windows Add this to your init file: (setq org-link-abbrev-alist '(("wt" . "shell:wt -p 'PowerShell' -d \"%s\""))) Then the following link in an org file will open ...
dharmatech's user avatar
  • 1,274
0 votes
Accepted

How can i configure (doom) emacs to only count prose text in the word count?

As described in my comment, you can run a command that filters out the lines you don't want and then counts the words in the part that remains. It basically runs grep -v -E '^(#|\*|:)' <file> | ...
NickD's user avatar
  • 30.6k
0 votes

Nested smart quotes in org-mode

Since I just dealt with this issue myself, another option is to insert a zero-width space (use insert-char and type zero width space) between the single and double quotation marks on either side.
Alan's user avatar
  • 3
1 vote
Accepted

Is there an org-mode code block that echoes its content back?

This will echo the echo block back (defun org-babel-execute:echo (body params) "Echo back the BODY of the source block." body)
Jason Hunter's user avatar
2 votes
Accepted

How to keybind an org-capture template with use-package?

This should do the trick: (use-package org-capture :bind ("C-c m" . (lambda () "Open tmp capture window" (interactive) (org-capture nil "t&...
Fran Burstall's user avatar
1 vote
Accepted

How to use jq-mode to query JSON in org-mode?

For input, you can use the :in-file header: #+begin_src jq :results drawer :in-file a.json .[] | [.id] #+end_src For input and output, you can specify a :cmd-line header: #+begin_src jq :results ...
NickD's user avatar
  • 30.6k
2 votes
Accepted

How can I frame an example block?

The other answer describes how to change a verbatim environment to a combined framed and verbatim environment, by changing the code of the Org mode exporter (or a couple of other methods that I have ...
NickD's user avatar
  • 30.6k
1 vote

How can I frame an example block?

Here's an Org mode file that implements a "global" change, by adding an advice to the function that processes example blocks in the LaTeX exporter. Some explanations are provided in the file ...
NickD's user avatar
  • 30.6k
2 votes

How can I put a letter immediately after inline code in org-mode?

It seems unnatural, but a zero-width space works. Type ~foo~s then, just before the s, use C-x 8 RET and choose 200B.
J. Mini's user avatar
  • 177
0 votes

Change Background Color of Code Block for org-mode LaTeX export

Assuming that you are already using minted, this is just a two-step process. Define the colour in your header, e.g. #+LATEX_HEADER: \usepackage{minted} #+LATEX_HEADER: \usepackage{xcolor} #+...
J. Mini's user avatar
  • 177
1 vote
Accepted

Title Case for Org Meta line Keywords and their Colouring

No specific reason for upper vs. lower case: the manual says: "Keywords and blocks are written in uppercase to enhance their readability, but you can use lowercase in your Org files." The ...
NickD's user avatar
  • 30.6k
0 votes

parsing org-mode files from command line

There are two considerations here: 1) write a function to extract the needed information and 2) run the function on an Org mode file from the command line. The two are pretty much orthogonal, so you ...
NickD's user avatar
  • 30.6k
2 votes
Accepted

How can I return/print all of my code's results with the code in Org-Mode?

Babel is not a REPL: it's more like a batch evaluation environment. If you want your PDF to look like the REPL, then cut and paste from the REPL into an EXAMPLE block. You can also try with :results ...
NickD's user avatar
  • 30.6k
1 vote
Accepted

remove author and date header line to save space

Just set AUTHOR and DATE in your Org mode file to be empty: ... #+startup: beamer #+options: toc:nil #+AUTHOR: #+DATE: #+BEAMER_HEADER: \graphicspath{{.}} #+BEAMER_HEADER: \setbeamercolor{frametitle}{...
NickD's user avatar
  • 30.6k
1 vote

Opposite of org-narrow-to-subtree

org-toggle-narrow-to-subtree (added in org-mode 9.2) Toggle the narrowing state of the buffer: when in a narrowed state, widen, otherwise call org-narrow-to-subtree to narrow. This is attached to the ...
bbigras's user avatar
  • 155
1 vote
Accepted

How to write an elisp function for converting org files to html with custom classes defined by property?

[Edit: added a filter implementation. Derived exporter is TBD (maybe?)] The HTML exporter has no provision for adding attributes like class to the body tag. See the code: it adds the literal string &...
NickD's user avatar
  • 30.6k
0 votes

How to write a newline in org-mode?

I installed Clojure 1.11.1 and had to modify the value of ob-clojure-cli-command to be just clojure1. With that change, I tried the following code blocks (shown with the results I get): #+begin_src ...
NickD's user avatar
  • 30.6k
1 vote
Accepted

In org-mode, how can I get some document property value using a script?

You have to find the file and then return the value(s) of the property: (defun my/prop-value-in-file (file prop) (save-excursion (find-file file) (org-property-values prop))) Some ...
NickD's user avatar
  • 30.6k
1 vote
Accepted

How to prevent C-c C-u jumps two headings?

Check the menu items under Org/Navigate Headings. There you will find Up, bound to C-c C-u, but you will also find Previous, bound to C-c C-p and Previous Same Level, bound to C-c C-b. In this case, ...
NickD's user avatar
  • 30.6k
1 vote

How to prevent C-c C-u jumps two headings?

To get zero levels up, use the universal argument zero: M-0C-cC-u
choroba's user avatar
  • 2,065
1 vote
Accepted

How to make shift-selection and shift-control-selection work in orgmode headers?

On org-mode headings, S-<left> and S-<right> allow to cycle through task states, while S-<up> and S-<down> allow to cycle through priorities. On org-table, org-timestamp, org-...
crocefisso's user avatar
  • 1,353
1 vote

How to indicate the currently clocked-in task?

Here is a quick way to do it with a fringe arrow and org clock hooks, as you suggested. (defun org-clock-flag-active-task () "Identify the clocked-in task with a fringe arrow on its header line....
romto's user avatar
  • 11

Top 50 recent answers are included