Commit Graph

8 Commits

Author SHA1 Message Date
Dustin Farris
0799985296 feat!(capture): add option to create entry ids
This un-breaks a breaking change where we addressed an issue that
prevented ids from being generated for 'entry' capture types.  While
this was a much-asked feature, the change also disrupted user workflows
that depend on the old behavior of entries creating org headings and
nothing more.

Users can now opt in to generating a heading id by passing
`:entry-node t` in their org-roam capture templates definition.

Amend: ed94524964
2025-09-29 16:20:57 -07:00
Dustin Farris
41f9a10be5 fix(capture): self-remove org-roam-capture-run-new-node-hook-a advice
This was incorrectly removing advice that doesn't exist, leading to the
actual advice being perpetually added without removal.

Amend: ed94524964
2025-09-27 15:43:53 -07:00
Dustin Farris
2bdeb7ed25 fix!(capture): move plain capture point past properties drawer
- Fix org-roam-capture--adjust-point-for-capture-type to properly handle
  cases where point is positioned after head content but not at a heading
- Remove redundant location-type logic that incorrectly assumed point > 1
  means we're at a heading (file+head can position point after keywords)
- Restore call to adjust-point-for-capture-type that was removed in ed94524
- Add comprehensive tests for plain capture ordering and assertion error fix
- Refactor adjust-point-for-capture-type for better readability

Amend: ed94524964
Fix: #2540
2025-09-26 10:08:13 -07:00
Jethro Kuan
ed94524964 (feat!)capture: change id creation to headline on entry-type capture-templates 2025-09-22 18:24:35 -07:00
Bruno Heridet
76df9d1f3c (test): add org-roam-id-at-point (#2451) 2024-07-07 15:41:00 +02:00
Antonio López Rivera
f144941dfb (fix)capture: respect blank lines in capture templates (#2203) 2022-05-25 11:57:17 -07:00
Ahmed Shariff
9eaf91b801 (fix)capture: Process fn capture templates before whitespace-content (#2157)
* [Fix #2156] Expand fn templates in fill-template before whitespace-content

* Update change log and adding tests related to #2157
2022-04-14 09:50:47 -07:00
Jethro Kuan
f6950a9820 (fix)capture: fill-template preserve whitespace content (#2117)
* (fix)capture: fill-template preserve whitespace content

Preserve the whitespace content given in the capture template, by
caching it and then appending it to the output template. For
Org-capture's purposes, we need to separately ensure that a newline is
present. Adds tests to the various helper functions to illustrate changes.

Addresses #2115
2022-03-10 09:46:53 -08:00