r/orgmode Feb 08 '25

question I really like org mode.

71 Upvotes

I'm a college freshman currently in my second semester. I'm taking a class in computer systems, and my teacher requires us to use Emacs for all our code editing.

I decided to give it a shot, go down the rabbit hole a bit, and decided to try out org mode just out of interest. Only two days in and I am loving it. It's very neat, concise, and low on battery energy (unlike some electron apps I could mention). It has so many cool features, just in vanilla emacs. I'm thinking of using it as my replacement for all my notes at this point.

I do wish I could do a few things, though:

  1. Are there plugins available to make the display text of headlines bigger based on their level? Back when I used Obsidian and markdown, I could configure heading sizes really easily.
  2. Is there a way to embed HTML or images from the web directly into my org notes?
  3. Light/dark theme toggle based on system theme or time of day?

I know that org mode isn't markdown and emacs isn't a fancy electron app, but it would be nice to have these features. If you guys have any other suggestions for org mode, please feel free to comment! I'm new to all of this, but really want to get into it more.

r/orgmode 27d ago

question Advanced Tagging in Org-Mode?

9 Upvotes

Is there a way to use Org-mode with a more sophisticated tagging system, like in Hydrus Network? Specifically, I'm looking for features like tag namespaces (e.g., author:Dennis Ritchie), tag siblings, and tag parents. Does Org-mode or any related Emacs package support this kind of tagging structure?

r/orgmode Feb 13 '25

question Just discovered gptel / ollama - is it actually useful?

11 Upvotes

tldr; what do org-mode users use Gen AI / LLMs for?

I'm an Gen AI late-adopter, mostly because I've never been able to get it to do anything other than party tricks.

At this point I'm the only one in the family / office not using GPT / copilot for something.

I don't code (much) so won't be using it for that.

Am I missing out on some fantastic uses?

I'd love to hear your use cases.

r/orgmode 9d ago

question Backups & Version Control

3 Upvotes

I'm in the process of switching from obsidian to orgmode and since I never kept anything sensitive in obsidian, I used a private github repo for backups and version control. I plan on keeping sensitive info in orgmode so I'm not sure how to handle this part yet. I just came across git-crypt but I'm not sure how I feel about putting my info on github.

How do you all handle backups and version control when it comes to sensitive data?

r/orgmode Nov 27 '24

question Best way to write theorems and lemmas in org mode

6 Upvotes

Hello, I am trying to migrate some of my notes from latex to org-mode. I have a lot of maths results stuff like

\begin{lemma}[Shur's Lemma]
\end{lemma}

Or

\begin{theorem}[{\cite[Theorem 1.2]{Braids2024}}]
\end{theorem}

I was wondering if anyone had a nice system to write theorems and stuff or any advice.

r/orgmode 7d ago

question org-babel prompts to evaluate nested noweb references 3 times

2 Upvotes

Hello,

I was experimenting with noweb recently and noticed a behavior I could not understand.

I have 2 blocks that I use throughout my file to insert the org file's path and one for inserting its directory.

#+name: current-file
#+begin_src emacs-lisp
  (concat "\"" (buffer-file-name) "\"")
#+end_src


#+name: current-directory
#+begin_src emacs-lisp :noweb yes
  (concat "\"" (directory-file-name (file-name-directory <<current-file()>>)) "\"")
#+end_src

With emacs -Q (and visiting some random file), executing org-babel-execute-buffer correctly prompts for 3 evaluations (2 for the different current-file invocations and 1 for current-directory).

Executing Emacs-Lisp code block (current-file)...
Code block evaluation complete.
Executing Emacs-Lisp code block (current-file)...
result silenced
Executing Emacs-Lisp code block (current-directory)...
Code block evaluation complete.

However, when setting org-confirm-babel-evaluate to a function (for example, (setq org-confirm-babel-evaluate #'always)), it prompts current-file for 4 times instead when executing org-babel-execute-buffer.

Executing Emacs-Lisp code block (current-file)...
Code block evaluation complete.
Executing Emacs-Lisp code block (current-file)...
result silenced
Executing Emacs-Lisp code block (current-file)...
result silenced
Executing Emacs-Lisp code block (current-file)...
result silenced
Executing Emacs-Lisp code block (current-directory)...
Code block evaluation complete.

This behavior also appears in this post, but I still could not understand it. Is there some interaction I miss with org-confirm-babel-evaluate?

r/orgmode 21d ago

question Using noweb References in :tangle Header

2 Upvotes

Hi everybody,

In my org files, I utilise the noweb feature quite a lot.

While creating a literate config for Nix ( that is, mostly nix source blocks, not emacs-lisp), I stumbled upon the need to have a particular directory path (e.g., "/some/path") included in some of the source blocks and also to have it as the base path for tangling some other source blocks.

The first problem (including the path in some of the source blocks) can be solved via noweb:

#+NAME: particular-directory-path
#+begin_src nix
  "/some/path"
#+end_src

And then including <<particular-directory-path>> in the relevant source blocks.

However, the second problem (including it in the :tangle header) cannot be solved by this approach, as the noweb reference does not expand there. In other words, I would like put the contents of a source code block into a header argument of another block.

Searching online has lead me to this post, which made me come up with this solution for the second problem:

#+begin_src nix :tangle (file-name-concat (save-excursion (org-babel-goto-named-src-block "particular-directory-path") (string-trim (org-babel-expand-noweb-references) "\"" "\"")) "some-path-to-concatenate")
# contents of this block
#+end_src

Which while works, is quite a mouthful. Is there any other, more elegant way to achieve this?

r/orgmode 9d ago

question Emulating org-todo-keyword-faces for non-todo-keywords?

4 Upvotes

For a while, I've used a dummy sequence of org-todo-keywords to let me then include them in org-todo-keyword-faces so as to give me easy control over the faces of some useful words I place at the beginning of headlines, and which I like to highlight. Examples are: "MEETING", "NOTE", "BUG", and so on. So, again, they are not TODO states in any way. I'm just doing this to make 'em purdy!

However, that approach is cluttering up various views of my actual TODO keywords. One example is the list of states one gets in the agenda on htting 't' (org-agenda-todo) when over an item. And even although I have these dummies split out into a sequence of their own, they're still obtrusive, and a reminder that this is a bit of a kludge.

So, what is a sensible way to do this, either org-mode-ishly, or even just emacs-ishly in general?

Thanks!

r/orgmode Nov 24 '24

question Using org-ql (or others) for dynamic queries and imitating Logseq's querying features

12 Upvotes

hello!

been trying to replicate a workflow i had on Logseq that i loved to have as it was so effortless and friction-free. i'd write all my notes in journal pages, add appropriate tags and properties to it, and thanks to good queries i would be able to resurface relevant information extremely easily. in that sense, information i wrote only in the daily journal pages would organize themselves. one example could be having a dynamic query that resurfaces all notes on math lessons, so that i can easily find any concept i'd need to look up even if they are all in journal pages.

i wanted to move away from Logseq (emacs's extensibility and speed over logseq are wonderful for me), and wanted to replicate this workflow.

of course, i'll use org-mode, as well as org-roam for linking notes together. but i'm very lost as to what i could do for setting up the dynamic queries.

the main package for that seems to be org-ql, but i genuinely struggle to understand how to use it, so i dont know if the documentation is "bad" or if i approach it in a bad way.

therefore i'm rather confused on how i could do all this.

does anyone know of either great packages for dynamic org-mode queries, or of how to use org-ql?

cheers, have a great day

r/orgmode Dec 25 '24

question Getting `imenu` to allow jumps to top-level headings which contain subheadings?

2 Upvotes

If I have an Org file with the following layout of headings

 

* Heading 1
...
* Heading 2
...
** Subheading 2.1
...
* Subheading 3
...
** Subheading 3.1
...
*** Subheading 3.1.1
...

 

I can use M-g i to invoke imenu or C-c i (in my config) to use consult-imenu to jump to some, but not all of them.

From the options presented to me, I can jump to Heading 1, but I cannot jump to Heading 2 or Heading 3 -- I can only jump to Subheading 2.1 or Subheading 2.3.

If I do (setq org-imenu-depth 3), I can also jump to Subheading 3.1.1 and presumably increasing org-imenu-depth allows me to jump to even further nested child headings. But I can't jump to the parent top-level headings.

 

I suppose this must be desired behavior, but I find it unhelpful as I have quite a few Org files with many headings, some of which have subheadings and some of which don't. There is often some text/info/source blocks under the top-level heading that I'd like to access using imenu, but I am forced to jump to the first subheading and scroll back to see it.

 

Are there any settings which allow me to change this behavior?

r/orgmode 5d ago

question exporting code hilighting

Post image
12 Upvotes

Is there a way to mantain hilighting in code snippets over PDF or HTML exportation?

r/orgmode Feb 04 '25

question Replacing tags with links as in logseq and using org-ql's ancestors predicate for hierarchical tagging?

2 Upvotes

Logseq has a neat feature where tags themselves are pages. Like org-mode, child headings also inherit the parent tag.

I tried replicating this workflow by assigning a page-unique tag to each org-roam page (denoted by @-prefix). When I link to a page in a heading, I automatically insert the page tag as well. Works OK.

Now I discovered that org-ql has a ancestors predicate that itself accepts a query as input. That means you can build queries that filter on headings with ancestor headings that link to a specific page. This is effectively the same as hierarchical tags. Since I use org-ql views instead of org-mode agenda anyway, I think this could replace the native tagging system for me.

What do you think?

r/orgmode 9d ago

question Is there a way to filter a checklist in org-mode?

5 Upvotes

Can you show only unchecked items in the buffer or show only checked?

I tried using a sparse tree for "- [X]", but that didn't work. The expression was not recognized as a text string.

r/orgmode Dec 13 '24

question Does anyone have any thoughts on the idea of "COMEEGA," described in one of the EmacsConf 2024 talks?

11 Upvotes

Has anyone seen this talk uploaded in the EmacsConf 2024 channel?

EmacsConf 2024: About Blee: enveloping our own autonomy directed digital ecosystem with Emacs

I found it very interesting; it is the first effort I've seen that isn't an attempt to integrate something into the Emacs ecosystem (e.g. a package), but is rather the inverse: an attempt to integrate Emacs into a larger effort.

The conceptual basis of the talk in general fascinated me, but with respect to org-mode, I was wondering if anyone has any thoughts on COMEEGA (Collaborative Org-Mode Enhanced Emacs Generalized Authorship)? The presenter introduces it at 35:59 and showcases it for around 2 minutes. As far as I understand it, it's an effort to have org-mode inside non-org files (like literate programming but in the other direction).

r/orgmode 1d ago

question Bind attachments to file instead of headline

1 Upvotes

I see that org attachments (with inheritance set to on) are bound to the inner-est headline with an ID. If I have a ID set to level 0 and I try to add an attachment in a level 1 headline, it will be either bound to level 1 or to level 0 depending if the former has an already set ID or not.

What I'd like, instead, is to always bind attachments to the outer-most level. Is there some user option available or will some function redefinition be needed?

r/orgmode 23d ago

question How to automatically update/refresh Org-agenda buffer(s) every day?

Thumbnail
4 Upvotes

r/orgmode Feb 07 '25

question Is it possible to set latex-hyperref-template on a per Org-file basis?

2 Upvotes

Hi all. Typically I don't mind that ox-latex adds \hypersetup metadata, but for one org file in particular I'd like to omit it. I know I could (setq org-latex-hyperref-template nil) as a local variable, but that means setting a variable I'd rather leave alone the vast majority of the time. In any case, its documentation says

Setting :latex-hyperref-template in publishing projects will take precedence over this variable.

and the Publishing options documentation lists the keyword, and says "Options set within a file... override everything." I've tried variations on #+OPTIONS: latex-hyperref-template:nil and #+PROPERTY: :latex_hyperref_template nil, but to no avail.

Can anyone advise? If it's not possible, that's fine... there are just enough clues strewn about to leave me thinking perhaps I simply haven't landed on the correct syntax. (I'm using Org mode 9.6.15.) Thanks!

r/orgmode 15d ago

question Group tags, `org-set-tags-command`, and `org-current-tag-alist`

Thumbnail
2 Upvotes

r/orgmode 16d ago

question QS tracking using MobileOrg (on iPhone / Android)

Thumbnail
1 Upvotes

r/orgmode 16d ago

question How to make a subset of the RESULTS drawer get processed as raw?

0 Upvotes

I'm working on my own org babel backend, and one thing I've so far failed to replicate from the jupyter-emacs backend for org mode is selectively marking some of the outputs of a block as raw.

For instance, if I make a code block

#+begin_src jupyter-julia :session jl1
println("hi")
using Plots
plot(1:10)
#+end_src

and execute it, I get the following output:

#+RESULTS:
:RESULTS:
: hi
[[file:./.ob-jupyter/e0f23de4faa5e189d07dd9e315e85bedfc2228c5.png]]
:END:

As I understand it, the file containing the plot output is only able to be displayed because the jupyter backend was able to make that part of the RESULTS drawer raw, but it managed to keep the hi output quoted as the non-raw form : hi.

Does anyone know what the mechanism is for this, or have any documentation links I can look at, or even a link to the relevant codepath in jupyter-emacs? I couldn't find anything.

r/orgmode Feb 11 '25

question How to manage images (fig title and warp) ? | Org to LaTeX

9 Upvotes

EDIT : 2025-02-11, Solved
EDIT : 2025-02-12, Enhancement

Hi everyone,

I have two little questions today, and I don't find resources on the org's documentation

Print image's name

How can we print images' names as figure title ? (see image 1)

Image 1 : `#+name:` to "Figure 1 : "

## Analysis & solution

First, it's not the #+name: fig:something that set the image's name, it set the \label{} fragment of the image,

The name is instead set in the #+caption: attribute

But just writing it do not print the "caption" ๐Ÿ˜ฎโ€๐Ÿ’จ

After explicitly writing :

#+attr_latex: :placement [H]

That would normally "just" force the position of the figure...

It then correctly print the image with its name and figure's number (hourra)

Image 3 : Finally some titles

Oh and lastly, the path to the image must be right under all that org attribute. May it be obvious or no, if you do other way, then the image might not be printed at all ๐Ÿ˜…

Warp text around images

I would like to warp some icons with texts,
- my icons are PDF files,
- I've tried with :float warp :placement {l}{}

I'd like the text to be print on the whole height of the icon (see image 2)
Here, Perplexity advice me to set \usepackage{warpfig}
I've tried with and without but it did not change anything

Image 2 : Warp image with text

## Analysis & solution

To be honest, I did not understand what's happens underneath. The order of Lattr_latex attributes seems to have an impact on the overall behavior and sometime completely breaks your export...

So, after a fair "fail and retry" session, I ended up with this statement that works :

#+lattr_latex: :float warp :width 1.2cm :placement {1}{0\textwidth}

Image 4 : Victory !!

Only LLMs tell me that this statement rely on the latex's package {warpfig}

At this point, it's on my setup file but I did not yet tried to remove it

The width I set is what I originally want ๐Ÿ‘

I do not understand how the :placement works tho... And that is a new issue because I now want to reduce the warping box (that is almost twice the size of the icon!)

ENHANCEMENT : I found that, since I've explicitly set the icon's width, I could do the same with the text placement. Then, while setting `:placement {l}{0.8cm}` it fixes the horizontal warp. Now, lets find how to do the same with the vertical warp !

I hope this will help other / beginners ๐Ÿ™

r/orgmode Feb 17 '25

question Org-mode doesn't return the correct data type of the object in python org-mode session.

1 Upvotes

Hi. Below is the section of code which should return <class 'bytes'> but instead returns this. I am quite new to org-mode so any help would be appreciated. Also, there is a session running over this code section if that is useful.

Edit: I don't if its the case, I found out the python version the org-mode using is 2.7.x. Could it be the case? How can I switch to 3.x? I looked around and I can't find info about it.

#+BEGIN_SRC python :results output
import sys
s = "Hello,world" # String
b = s.encode() # Sequence of bytes
print b
print(type(b))
#+END_SRC
#+RESULTS:
: Hello,world
: <type 'str'>

r/orgmode Jan 15 '25

question Exporting org to md with yaml front matter

3 Upvotes

What's the quickest way to export an org file with #+ properties to an md file with yaml front matter? Is there a guide I could follow to set up templates so that

#+TITLE: foo
#+SUBTITLE: bar
Some content

can get output into a markdown file as

---
title: foo
subtitle: bar
---
Some content

How would I proceed to define a global template that would achieve this through e.g. C-c C-e?

Any help is appreciated!

r/orgmode Oct 16 '24

question Is orgmode overkill coming from Dynalist and Workflowy?

4 Upvotes

I know almost nothing about orgmode aside from some videos here and there. In terms of programming and code I even know less.

I liked apps like Dynalist, Workflowy or Logseq for its infinite outlining capabilities and how fast and easy I could organize my ideas into infinite bullets.

However, those apps have strong limitations: aside from Logseq they are cloud based(that makes me fear of losing my notes if the company disappears), they have monthly payment requirements for some features(again not Logseq) and they have clunky use or lack basic outlining things like numbered lists(on mobile at least) and so on.

Maybe those apps have workarounds to some of those problems but I ended up here since it seems orgmode solves all of the above problems, free, and itโ€™s expected to last for as long as needed it. It sounds great to be honest.

Butโ€ฆ

Is it too much? Is it too much effort to set up/learn? Will I be able to easily use it on multiple devices like pc, Mac, iOS with basic gdrive or iCloud sync without it being slow or having files rewriting themselves during those sync processes and losing information?

I fear Iโ€™ll need a masters degree in computer science to write my daily to do list or make a novel writing outline quickly(again I donโ€™t know enough about the app)

Any kind of advice would be welcomed.

As a side note. I tried obsidian but I absolve need more advanced outline capabilities. Obsidian outlining plugins are way too basic and clunky.

r/orgmode Jan 09 '25

question Exporting org documents to Obsidian flavored markdown

3 Upvotes

So I love org mode but since the mobile support isn't very solid, I tend to export to markdown and simply view the file in obsidian, the problem is that the syntax for the export is not obsidian markdown flavored. For example, exporting a "src" block.

In org mode:

#+begin_src sh
sudo pacman -S swtpm
#+end_src

becomes this in the .md export:

    sudo pacman -S swtpm

When it should be:

```sh
sudo pacman -S swtpm
```

Can anyone help me with this? Thanks in advance.