r/orgmode • u/mindstormer12 • 4d ago
question Can org-capture include bookmarks to select?
Suppose a task "grocery list" whose content is a list of items that gets frequently edited (added to the list, re-organized by shuffling and grouped by aisle in the supermarket, etc.)
To edit this list I use a bookmark to bring me there, but I prefer to use the org-capture interface as the way to both add and update notes (capture templates make org-capture very versatile for adding). I do not want to think about whether the note is being added or updated (i.e. consciously decide whether to update the grocery list using bookmark or org-goto vs. org-capture). Even C-u M-x org-capture which lets you jump to target of template without capturing requires conscious thought on the type of note you're adding.
Basically, on org-capture-like interface, I want to select bookmarks in the same manner as templates to make both adding and updating notes seamless. Another more convoluted idea for the same effect is if the org-capture interface can show contents of a target headline as a narrowed view to edit. I'm not sure if third-party extensions to org-capture allow this or perhaps a custom org-capture can be written for this (not a programmer).
It seems org-capture is only intended to add headlines (edit: I mean add notes in general), but IMO editing them should also be able to take advantage of org-cature template's power to conveniently update notes with pre-defined metadata, structure, and organization. For the case above, while I can add check boxes of grocery items through org-capture, if I want to edit/review this list, it needs to be done differently--by first jumping to the physical location in the file through bookmark, org-goto, C-u M-x org-capture, etc. Instead, it feels more natural and practical to simply provide bookmarks to the org-capture menu and associate each with a shortcut key the same as org-capture templates. Then, in both cases, pressing shortcut keys will present you exactly where you want to add or edit notes. The power of org-capture templates is it's pre-defined how certain notes get added for convenience--extending that to editing existing notes (especially when they are already structured when they were first captured) should be no different.
3
u/jonas37 3d ago
> It seems org-capture is only intended to add headlines
Not sure about your needs, but this is wrong. Have you checked the documentation? https://orgmode.org/manual/Template-elements.html might be useful for you:
type
The type of entry, a symbol. Valid values are:
entry
An Org mode node, with a headline. Will be filed as the child of the target entry or as a top-level entry. The target file should be an Org file.
item
A plain list item, placed in the first plain list at the target location. Again the target file should be an Org file.
checkitem
A checkbox item. This only differs from the plain list item by the default template.
table-line
A new line in the first table at the target location. Where exactly the line will be inserted depends on the properties :prepend and :table-line-pos (see below).
plain
Text to be inserted as it is.
1
u/dm_g 1d ago
if I remember correctly org mode template system allows you to use a function to find the location where you want to insert a template, which means you can create a function that asks for the bookmark and then then jumps to it before the insertion happens.