/r/orgmode

Photograph via snooOG

Org-mode is an Emacs major mode for taking notes, managing to-do lists, planning projects, authoring documents, literate programming and devops, and more, using a fast and effective plain-text system.

About Org mode

Org mode is an Emacs major mode for taking notes, managing to-do lists, planning projects, authoring documents, literate programming and devops, and more, using a fast and effective plain-text system.

Support the Project

Donate via Liberapay

Resources

Related Subreddits

/r/orgmode

22,669 Subscribers

1

End-of-line comments and Org

Org supports three comment syntaxes -- comment lines (lines starting with #), comment regions (#+BEGIN_COMMENT... #+END_COMMENT), and comment subtrees (* COMMENT) -- but not the kind I often need: end of line comments. In TeX you can add a % anywhere in a line to comment the rest of it out. Is there a reason something like this isn't available in Org? If the issue is that Org wants users to be free to use #s in their paragraphs, couldn't an alternative, escaped syntax be implemented instead?

0 Comments
2024/12/04
14:44 UTC

6

Preserving ID-based links to headlines

Suppose I have a headline with an ID property, and I also have one or more links pointing to that headline using an ID-based link. And suppose I want to move that headline, perhaps within the same file, but perhaps to another file, and to have the links be preserved (i.e. so they point to the headline in its new location after the move).

What considerations are there when choosing a mechanism for moving the headline? In particular, are there any methods that should be avoided?


So far I've tried a few things and found that:

  1. The link is PRESERVED after moving the heading:
    • a) within a single file in org-directory using the various promote/demote/up/down commands
    • b) between two files in org-directory using:org-cut-subtree followed by org-yank; or org-refile; or a sequence of org-kill-line followed by an org-yank
    • c) from a source file in a sub-directory of org-directory, up to a newly-created destination file in org-directory itself
  2. But the link was NOT PRESERVED after moving the heading (using org-cut-subtree followed by org-yank) from a source file in org-directory down into to a newly-created destination file in a subdirectory thereof. Note that:
    • a) The broken-ness was indicated by a message of "Cannot find entry with ID "<the id>" on trying to follow the link
    • b) The broken link was NOT reinstated by running org-id-update-id-locations, but
    • c) The broken link WAS reinstated by shutting down emacs and restarting it

Possibly relevant:

  1. My org-agenda-files variable consists of only three files, and some of the link-preserving moves involved files not in the list
  2. However, my org-agenda-text-search-extra-files contains every file that existed in and below my org-directory at emacs startup time, done with this[1]:
    (setq 
     org-agenda-text-search-extra-files 
     (apply 'append 
            (mapcar 
             (lambda (directory) 
               (directory-files-recursively 
                directory org-agenda-file-regexp)) 
            `(,org-directory) 
            )))

So that variable will NOT have included the destination file in example 2 above. That said, it won't have included the destination file in example 1c) either.


[1] On whether that is a good or bad idea in general, I would be happy -- nay, grateful -- to take opinions, but it is what it is right now.

2 Comments
2024/12/02
23:59 UTC

7

Is there a way to have calfw-org display only certain items from my org-agenda, such as those that have a specific tag? Like I can normally do in custom agenda views.

0 Comments
2024/12/02
02:49 UTC

4

getting the org-roam buffer below the window it's controlled by

I am having a devil of a time getting my emacs windows organized as I want in a frame. I can't fathom how this is so complicated. Here's what I want:

|------------|------|
| | notes|
| Document |------|
| | roam |
|------------|------|

So document is what I'm writing; notes is, for example, a "hashtags" file -- a long list of tags that I've linked to from various zettelkasten-style research notes documents. roam is the org-roam buffer, following point in that notes file; so I can navigate around in the notes and get backlinks, while keeping my working document open on most of the screen.

If I have Document and notes side by side, I can then launch the roam buffer, but it makes this:

| doc | notes |roam|

I can split notes to get this:

|------------|------|-------|
| | notes| |
| Document |------| roam |
| | notes| |
|------------|------|-------|

Going to the bottom window and running window-swap-states gives me this:

|------------|------|-------|
| | notes| |
| Document |------| notes |
| | roam | |
|------------|------|-------|

Which is almost there, but if I navigate to the rightmost window and close it... I lose the horizontal split and wind up with this:

|------------|------|-------|
| | | |
| Document | notes| roam |
| | | |
|------------|------|-------|

Why on earth can't I arrange the windows how I want them? This seems like it should be trivially easy...

2 Comments
2024/11/30
00:52 UTC

3

setup org-caldav to sync several agenda from 2 or more nextcloud instance

Hi, I can find in org-caldav doc the way to syncing-with-more-than-one-calendar but how to sync with more than one org-caldav-url ?

0 Comments
2024/11/29
16:40 UTC

19

Dslide 1.0 Feature Proposal & RFC

Earlier, a single PR for supporting babel parameters was invaluable insight into current features. I don't use org mode in every way that everyone uses org mode. Different perspectives help.

I have compiled a list of everything I believe belongs in version 1.0

Adding macro playback support is of particular interest. Along with babel, it's another does-everything-Emacs-can-do feature. It is a feature so dslide that dslide cannot be dslide without it. How do we want it to work? What should it build on top of?

The markup we will arrive at deserves intense focus. It is a place where good decisions now pay off later. Every problem with actions now is a result of markup and babel parameter choices I hadn't considered because I don't use org that way.

I have gotten some nice views of Busan coming into port from the ocean while recovering from food poisoning dealt by that same ferry, and I will take this opportunity to stress the benefit of adding fresh hamburgers to the hamburger jar.

I intend first to bring Master of Ceremonies (mc) onto MELPA. I can see at this point which features belong in mc and which ones belong in dslide. The mc-focus command has been extremely beneficial for creating graphics out of code and will become the focal point of mc's design.

CC org mailing list.

8 Comments
2024/11/28
02:43 UTC

1

How to load .org-id-locations into org-stored-links?

Once I create a link ID, I'd like to be able to use it with org-insert-link even after I restart Emacs. How can I make Org do that? I can't find a function to do that. Is there one? If not, I'll write a function to load ~/.emacs.d/.org-id-locations into org-stored-links.

I already have this in ~/.emacs.d/init.el:

  ;;
  ;; Org generates link IDs on demand
  ;; 
  (setq org-id-link-to-org-use-id t)
  ;;
  ;; Org remembers stored links after org-insert-link.
  ;; This is contrary to the default behavior, forgetting
  ;; stored lins after insertion.
  ;;
  (setq org-link-keep-stored-after-insertion t)

so Org will generate link IDs for me and keep them in org-stored-links after org-insert-link.

1 Comment
2024/11/27
17:18 UTC

5

ob-chatgpt-shell goes multi-model too

In addition to OpenAI models, you can now use Anthropic, Google, and Ollama models in babel blocks. More at https://lmno.lol/alvaro/ob-chatgpt-shell-goes-multi-model-too

0 Comments
2024/11/27
14:37 UTC

7

Best way to write theorems and lemmas in org mode

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.

21 Comments
2024/11/27
13:30 UTC

12

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

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

18 Comments
2024/11/24
17:39 UTC

8

How do I use ob-comint? I couldn't figure out. There are no good documents. Will I be able to interact with the process within the source code block?

4 Comments
2024/11/22
22:50 UTC

3

Is there a mobile outliner app that has a sparse tree function similar to the one in org-mode?

4 Comments
2024/11/21
19:22 UTC

9

Dslide Release About to Drop

  • automatic tags and todo hiding
  • filtering headings with :noslide: and :noexport:
  • new image display options (implementation a bit sketch)
  • important fix for image support
  • basic built-in cursor hiding
  • fixes to header options
  • example of using babel integration + VLC to play a video
  • action to add text properties to arbitrary elements using a affiliated keyword (not in unstable yet)

Current work is on the unstable branch main branch

The implementation of the image feature should not require calls to 1-, which are visible in the commit I linked. I need to recover before looking into that more. More eyes appreciated.

Adding a manual and then it will be published to ELPA Just pushed the manual and README updates. On ELPA and MELPA. Time to figure out how to add my badge.

Running the demo.org in the test folder to uncover issues before I cut a release appreciated.

2 Comments
2024/11/20
12:21 UTC

8

Example:Using org-publish with org-roam (with search and backlinks)

0 Comments
2024/11/19
19:42 UTC

4

org-capture-templates: Help using a custom function to define the target

I am a Doom Emacs user, and I am trying to use the following target specification to build some capture templates:

" (function function-finding-location)

Most general way: write your own function which both visits

the file and moves point to the right location"

As you can see the documentation is a little vague about how to move point to right location. After a lot of attempts, I have working templates: the correct location is used, and the capture process works well.

The only problem I have is that after finalizing the process in the capture buffer, my cursor is moved to the capture location, which in that case defeats the very purpose of the capture. To be clear, I am not using jump-to-capture.

I think the problem resides in my way of "moving point" as the documenhtation describes it. I use find-file and goto-char. I am not posting the whole code, because I have several functions involved in the process, some responsible to locate headings, create them if not found, use consult to select a file, etc.. But I think I have to modify the last one to make it work. this was my first attempt:

(defun my/org-capture--goto-header (header &optional buffer file namespace)
  (let ((file (or file (if buffer
                           (buffer-file-name (current-buffer))
                         (my/org-capture--get-file-name nil namespace))))
        (pos (my/org-capture--ensure-header-exists header file)))

    (when (and file pos)
      (find-file file)
        (goto-char pos))
    ))

Then I tried with file-noselect with the same result:

(defun my/org-capture--goto-header (header &optional buffer file namespace)
  (let ((file (or file (if buffer
                           (buffer-file-name (current-buffer))
                         (my/org-capture--get-file-name nil namespace))))
        (pos (my/org-capture--ensure-header-exists header file)))

    (when (and file pos)
      (with-current-buffer (find-file-noselect file)
        (goto-char pos)))
    ))

Also the two following variations:

     (when (and file pos)
        (find-file-noselect file)
        (goto-char pos))

     (when (and file pos)
        (set-buffer (org-capture-target-buffer file))
        (goto-char pos))

Both for the same result.

Thanks for your help.

=== EDIT ===

A custom function of mine running on a hook was responsible. Thanks forall the help.

13 Comments
2024/11/19
14:43 UTC

5

Saving in org agenda: is there a way to save only relevant org files?

Right now I have `org-save-all-org-buffers` bounds to `s` in Org Agenda buffer, but I find it weird that it save all the org buffers, even those that are not used in the agenda. Is there a common way to save only org files that are viewed in the agenda? Or should I write my own function that goes through org-agenda-files and saves all of them? Btw I am using custom agenda commands.
Thanks!

3 Comments
2024/11/18
22:37 UTC

7

is there a way to let orgmode be a server that I can use it everywhere by any devices ?

I want that Org addons, like Org-roam, Org-brain, etc, can also "run" in smartphones.

This can likely also get avoid of contents conflict.

13 Comments
2024/11/18
11:28 UTC

3

Best iOS org-roam

I’ve tried to make logseq work and it’s so close, yet the formatting is always iffy. Found this and it looks really promising, and wondering how other people use theirs if any.

https://metanote-dev.github.io/archives.html

13 Comments
2024/11/17
21:32 UTC

6

Access org attachments from my phone?

I sync my Emacs files via Dropbox. I use org-attach to attach files to notes. I've used beorg and Orgro. They're great. But I haven't found an app that will actually access attachments. I attach images, pdfs, and audio files, and I'd love to be able to access them on-the-go on my phone.

So far, any apps I've used do a pretty good job of accessing the TEXT of files, but it just can't recognize attachments.

This tempts me to use Evernote or Apple Notes, since all attachments show up there without any hassle.

Any ideas?

4 Comments
2024/11/15
21:53 UTC

4

bidirectional org-mode <> mind map (visual)

i am looking for a solution that lets me create mind maps in the typical UI woth boxes and links betweem them (think XMind, Freemind) and store them as text files. ideally org-mode files, but honestly, it's not a hard requirement. any textual format will do.

what i need is for this to be bib-directional - if i edit the textual file, the next time i load up the mind-map it should show the updated content. it could be auto-refreshing, ideally, but that's more of a nice to have than a hard requirement.

conversely, if i update the map in the visual UI, the textual file updates as well - obviously. we could think of the textual file as a "backing file" but i want it to be a fully user-friendly and editable format - definitely not something like YAML, never mind JSON or worse. ideally, it would be an org file.

so this is me asking - does something like this exist?

11 Comments
2024/11/14
10:17 UTC

3

org-journal: carry over under specific headline

hi i use org-journal package and have customized some behavior using elisp with the help of chatgpt, but one thing that chatgpt is not able todo is this issue

carry-over but put the todos under a specified heading (assume it exist,create if donot )

i have adhd and i initiate my journal using capture template at start of the day this template is kind of a fill-able form that help me stay on line , when carry over happens it puts the yesterdays todos on very end of the file while my todos lives in middle of the form. so all i want is to put the carried over tasks under the relevant headline of my template.

Any help is appreciated,
thanks

2 Comments
2024/11/13
21:08 UTC

21

Package for those who use Denote as a Zettelkasten: denote-zettel-interface

Hi all,

I want to share with you some code I’ve been writing and using for myself for the last several months related to using Denote as a Zettelkasten: krisbalintona/denote-zettel-interface. This isn’t quite a package, but a project I started for personal use but think others might find value from.

I wrote the code for my own use as a means to better interface with my Zettelkasten; I use folgezettel (i.e. notes are numbered systematically, letting users at-a-glance see the lineage between the ideas they’ve had over time; more information here) and found no convenient way to list and sort notes according to their index numbering.

In short: notes can be listed via tabulated-list-mode, filtered arbitrarily, and sorted properly by their index numbering. There are also a few commands for less-manual means of setting notes' index numbering. The README includes more information, but suffice to say, I used it for months and it was indispensable.

In the README I also explain that although I’m sharing the code now, I’ve actually recently moved from denote to org-roam. (I'm making a similar package for org-roam though!) Nevertheless, I thought that the commands this project offers would either be directly useful for someone’s actual use or indirectly useful as inspiration.

0 Comments
2024/11/13
04:41 UTC

2

Reorder Org Capture Prompts

TLDR: how to reorder the org capture prompts.

So i have this template in org capture:

(setq org-capture-templates
'(("c" "codes")
("cl" "code link" entry
(file+headline "~/notes/codes-for-battery.org" "Links")
"** %^{link} %^g\n- %^{note}\n%^{image url}"
:immediate-finish t
:prepend t)))

but the issue is, I want it to first prompt me for a link, which it does, but after, I want it to prompt me for an image url, then, I want it to prompt me for the tag, and finally the note.

Now the way it does it according to the code above is:

  1. link
  2. tags
  3. note
  4. image url

But what I want is:

  1. link
  2. image url
  3. tags
  4. note

And then obviously it would put them all in the right place, also preferably no complex elisp code since i'm kind of a beginner to this as you can probably tell.

Help would be appreciated and would paypal the person who gives me an answer that works $5.

Thanks for reading.

4 Comments
2024/11/12
23:18 UTC

7

Annouce: Org-zettel-ref-mode 0.5 Release

1 Comment
2024/11/12
06:02 UTC

1

my-org-insert-dotfile-snapshot

Here is my usecase and how I intend to solve this. Please let me know if there is a more elegant way to do this or preexisting solutions.

I have recently gotten better about documenting stuff I change in my environment. I do this in org with org-roam. Often I change some config file and want to reference what exactly I changed in my documentation, too. Previously I just inserted a link to the file, but my org zettelkasten will probably outlive the current setup. Also when files change, the documentation might become out of date because the link is no longer relevant and doesnt contain the relevant changes anymore.

So my proposal is a function that inserts a link to a snapshot of the file. The snapshot of the file is just a copy of the file that is stored in ~/org/dotfile-snapshots, that has a filename with a datetime prefix. This way you know when the snapshot happened and also have a unique name and can snapshot that specific file in the future again. Finally it writes the full filepath to some metadata file.

2 Comments
2024/11/11
10:48 UTC

5

How to manage people in team with our own tasks?

I have recently started managing a team and I want to monitor their projects and tasks, and also store reviews about the person (like what was their performance on a task or project) to be used for their review. In addition to this, I want to monitor my tasks and projects as well. I have been using a simple system for myself till now, but, I want to get ideas on how I can do so for other people as well.

7 Comments
2024/11/10
13:58 UTC

Back To Top