New answers tagged

2 votes
Accepted

C-c C-c on #+PROPERTY: keyword line changes the mode from Org to TeX

On line one you have this: # Hey, Emacs! This is a -*- mode: org -*- file! And on line 3563 you have this: %%% Local Variables: %%% mode: latex %%% End: Both are valid file variables, and ...
user avatar
  • 11.4k
0 votes

Reducing LATEX_HEADER clutter at the top of my org files

While the answer given by @EFLS is correct, I would like to add that you can in fact have multiple setup files e.g. #+SETUPFILE: setup #+SETUPFILE: latex_setup #+SETUPFILE: other_latex_macros ## Rest ...
user avatar
1 vote
Accepted

Specifying a subdirectory in the argument of :tangle: effect only non-interactively

[These are my original comments made into an answer -- but note that there is a mysterious mode change that is so far unexplained.] I cannot reproduce the problem: interactively tangling the file ...
user avatar
  • 19.6k
0 votes

Org-roam raises "Selecting deleted buffer" error after formatting laptop

Sticking this in as a solution but as suggested in this answer on Reddit if you recompile the emacsql-sqlite binary it might solve the problem (worked for me). cd ~/.confg/emacs/elpa/emacsql-sqlite/...
user avatar
  • 251
0 votes

How to generate well-aligned Equal Signs?

You can use the following command to underline the line at point. (defun underline () (interactive) (let* ((line (string-trim (thing-at-point 'line t))) (underline (make-string (string-...
user avatar
  • 3,439
0 votes

How to generate well-aligned Equal Signs?

The documentation for yasnippet gives almost exactly this workflow as an example of its "field mirroring" capabilities. That's for entering titles; it might be possible to adapt it to edit ...
user avatar
  • 1,193
0 votes

Checkbox statistics in nested headings

The first function counts the number of boxes checked in the subtree, and the second one updates the value accordingly. (defun count-statistics () (let (num den) (save-excursion (org-up-...
user avatar
  • 3,439
2 votes
Accepted

Org mode: Open more than one level for a certain heading?

You can press TAB TAB or use the org-show-subtree command.
user avatar
  • 3,439
1 vote

Capturing output scheme when executing a code block in org-mode

Find the path of ob-scheme.el, for me that is ~/.emacs.d/.local/straight/repos/org/lisp/ob-scheme.el and then in function org-babel-scheme-execute-with-geiser, change geiser-eval-region to geiser-...
user avatar
1 vote

How to export bibliographies with Org-Mode?

Making a bibliography showing @ref1 and @ref2: #+bibliography: biblio.bib * Content Example[cite:@ref1; @ref2] * Bibliography #+print_bibliography: Making a bibliography showing the whole content ...
user avatar
0 votes

Checkbox statistics in nested headings

I find these things work best if you don't mix'n'match different types of org headings. If you stick to using lists, then you can make each subheading a 'checkbox task' by putting in [ ] at the start ...
user avatar
  • 4,059
0 votes

How to include an image in the cover front before OR after the title in exported ODT from org?

I need to include an image (the logo of the company) in the cover front page, before OR after the title of the document in ODT How to create a ODT document with a Cover/Title page Before proceeding ...
user avatar
2 votes

How to use an org mode document's title in the LaTeX export headers?

Some possibilities: Allow macro expansion in a LaTeX header You can try allowing macro expansion in #+LATEX_HEADER: keyword constructs. That can be done by changing line 113 (in my version - YMMV) of ...
user avatar
  • 19.6k
1 vote

How to include an image in the cover front before OR after the title in exported ODT from org?

Is there a way to include a small header image to all pages, Yes. How to create a ODT document with a Logo and/or Custom Text in all pages You need to use the the enhanced ODT exporter ox-odt-9.5.3....
user avatar
0 votes
Accepted

Why org-mode related settings aren't applied on desktop.el restored .org files?

OK, things are working now, don't bother. I'm not sure I remember exactly what I did (sorry, I should have posted right away), but I, at least : Removed my desktop file (Yes, sad) Removed the (...
user avatar
  • 11
1 vote
Accepted

Pass default value to org-set-property

No. org-set-property does exactly what the documentation says: it only prompts for a value if no value is specified as an argument. Because it says nothing about specifying a default value for that ...
user avatar
  • 11.4k
-1 votes
Accepted

org-publish: Wrong number of arguments: plist-get

Solved by installing org-contrib via elpa.
user avatar
2 votes
Accepted

Breaking an org-mode headline into two

Try setting org-insert-heading-respect-content to nil. Then press M-RET (org-meta-return).
user avatar
  • 3,439
1 vote

How do i get org mode inside balanced comments in source file?

There is no general method for embedding one mode into a section of another mode. Org mode supports source code blocks as you mention, but take note that the content of the source block is not in a ...
user avatar
  • 11.4k
0 votes

visibility cycling - org mode - save and restore folding state of sub trees

A file that, more or less, implements this functionality is available at the Emacs wiki here. The only difference is that it simply always saves/restores the folding state of all headlines (there is ...
user avatar
  • 1,815
0 votes

org-mode: How to export underscore as underscore instead of highlight in HTML?

By default the underscore "_" and caret "^" characters are treated as markers of subscripts and superscripts when exporting with org-mode or pandoc. To export them as they are you ...
user avatar
-2 votes

Checkbox statistics in nested headings

Put an empty [ ] in subheading.
user avatar
  • 407
1 vote

Org-Ref LaTeX citation (v3) export not working correctly

I also cross-posted this question to the org-mode mailing list per @NickD's suggestion and I then added it to the issues for the org-ref github by @JohnKitchin's request. The solution is: I need to ...
user avatar
0 votes

Emacs org mode WYSIWYG editing

This is not a complete answer, because I did not yet 'investigate' the steps that would be required to get this toggleable, or how to get this working in org-mode. However, I can already show you 'the ...
user avatar
  • 1,815
2 votes

How do I define default language for org-mode source code blocks?

It is not possible now. The documentation says the language argument is mandatory. https://emacsdocs.org/docs/org/Structure-of-Code-Blocks#language At the top of the file, I can have the property #+...
user avatar
1 vote

How to export captions from org-mode into LaTex with subscripts or citations

There was a bug with short captions, but it has been fixed. In particular, the bug existed in release 9.3.4 of Org mode, but was fixed in release 9.3.5 and later. Check the version of Org mode you are ...
user avatar
  • 3,439
0 votes

use org properties as variables in c or python source code

Better to use a named Org table than properties in outline nodes. You then add :var myVarName=myOrgTableName to your source block header. I'm not sure how the table data is passed to a C++ block, ...
user avatar
  • 1,193
0 votes

How to change appearance of inline comment in org mode?

Looking up in the org source where org-emphasis-alist is used, we find it is used in org-do-emphasis-faces. This function is added to font-lock-keywords, after which font-lock fontifies the region ...
user avatar
  • 1,815
1 vote
Accepted

How to use the headline numbering for links in org-num-mode

From org-num--make-overlay we find that org-nume-mode does not insert extra contents in a buffer, but only creates the numbers as overlays (via the 'after-string' property). So, to get the numbers, ...
user avatar
  • 1,815
2 votes
Accepted

orgtbl-toggle-comment freeze in one line table

It's a bug in orgtbl-toggle-comment that gets stuck on the line (while (looking-at re) (beginning-of-line 0)) if the table is on the first line of the buffer. You can use the following patched ...
user avatar
  • 1,683
4 votes
Accepted

Is there a way to use orgtbl-mode in the source code comment?

Use M-x orgtbl-toggle-comment to uncomment the table, make your changes and do the same command to comment the table again. Typing all that is a bit tedious of course but you can bind the command to a ...
user avatar
  • 19.6k
0 votes

Org mode: Need to create date range with time interval and weekly repeat under a headline

Assuming you use the American date format (month-day-year): <%%(diary-cyclic 7 4 26 2022) 12:00-13:00>
user avatar
  • 1,193
0 votes

Capturing output scheme when executing a code block in org-mode

Either use :results value, not :results output, in the code block header, or keep :results output and use (princ a) rather than a (or whatever the equivalent of Elisp's princ is in Scheme).
user avatar
  • 1,193
2 votes
Accepted

Quoting HTML tags for padding

As mentioned, you can't say <padding ...> ... </padding> in HTML: there is no such tag. But as you note, you can specify a style attribute on many (most?) tags. Try e.g. a paragraph <p ...
user avatar
  • 19.6k
0 votes

Org-Mode Startup not Rendering Theme Colors at Startup

I have same issue, I found that ol-docview try to find some non existing executables, remove ol-docview from org-modules solved my problem.
user avatar
  • 111
0 votes

How to enable task dependencies in org mode?

In fact you should put (org :variables org-todo-dependencies-strategy 'naive-auto) in dotspacemacs-configuration-layers rather than dotspacemacs/user-init or dotspacemacs/user-config.
user avatar
  • 1,096
0 votes

How to export org tables with cells on multiple lines?

IIUC, the concern expressed here is to sneak in line breaks (on the export side) when using an Org table. Good news is not only can you sneak in line breaks, you can also create multiparagraph content ...
user avatar
2 votes
Accepted

Extract org heading title without task count e. g. [0/0]

(replace-regexp-in-string " \\[[[:digit:]]*[/%][[:digit:]]*\\]" "" (nth 4 (org-heading-components)))
user avatar
  • 1,193
0 votes
Accepted

Function to clone and rename buffer and narrow to subtree

Try: (defun my/clone-rename-narrow (&optional arg) (interactive "P") (clone-indirect-buffer (nth 4 (org-heading-components)) t nil) (org-narrow-to-subtree) ) without the other-...
user avatar
  • 19.6k
0 votes

Org-roam-dailies navigation with custom template

Turns out that the template does enough of what I need. Navigation to previous/next day doesn't really work (or at least just moves between months when necessary), but compared to a normal org-capture ...
user avatar
  • 71
1 vote
Accepted

Function to clone buffer, narrow it and rename it to the name of the current heading

Components of the current heading can be obtained using (org-heading-components). In particular, the headline text itself can be obtained with (nth 4 (org-heading-components)). However, you might have ...
user avatar
  • 19.6k
2 votes

Devanagari script in org-table

This is not a answer to the original question, but a response to the comment https://emacs.stackexchange.com/a/71562/31220. FWIW, the answer is in https://emacs.stackexchange.com/a/71569/31220. PS: I ...
user avatar
2 votes
Accepted

Devanagari script in org-table

However, if I try to do the same with Devanagari script (itrans inscript), table columns don't get aligned properly. Use valign from GNU ELPA. From the blurb This package provides visual alignment ...
user avatar
0 votes

Noweb references in sh blocks breaks the syntax highlighting

You can define the delimiters babel use for noweb references, by setting org-babel-noweb-wrap-start and org-babel-noweb-wrap-start. For instance, in org mode document where I dabble in bash, I insert ...
user avatar
1 vote

Devanagari script in org-table

This may not be exactly an answer. And its an acquired taste. I write my files in roman thus | ka | kha | ga | gha | ~Na | | cha | chha | ja | jha | ~na | | Ta | Tha | Da | Dha | Na | | ta | tha ...
user avatar
  • 275
1 vote

Devanagari script in org-table

Here's one recipe for getting fixed-width Devanagari glyphs (with limitations): download a fixed-width Devanagari font: I found one here. assuming you are on Linux, create a /usr/share/fonts/monotty ...
user avatar
  • 19.6k
2 votes

Devanagari script in org-table

You need to find a fixed–pitch Devanagari font where the Devanagari glyphs are exactly the same width as the glyphs for ASCII characters.
user avatar
  • 11.4k
0 votes

org-mode batch export hangs when using a python session

Ok, after learning a great deal about how to (clumisly) trace elisp code, I identified this as a bug in prompt detection in python.el: apparently the startup message for the python interpreter is not ...
user avatar
0 votes

Sprint Board and org-super-agenda : problems with DONE tasks

I found something which does almost exactly what I want, albeit not as an agenda command. The code that does it: (org-ql-search (org-agenda-files) '(ts-active :from "2022-04-25" :to "...
user avatar
2 votes
Accepted

Org Mode Structure Templates with emacs-lisp

You can add entries to org-structure-template-alist, e.g. #+begin_src elisp (add-to-list 'org-structure-template-alist '("sl" . "src elisp")) (add-to-list 'org-...
user avatar
  • 19.6k

Top 50 recent answers are included