Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outline path position for org-roam-ref capture #2337

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hwiorn
Copy link
Contributor

@hwiorn hwiorn commented Mar 28, 2023

Motivation for this change

Closes #2199

This PR needs PR #2336 to search correct OLP.

org-roam-ref-capture doesn't find correct the outline path when org-roam-capture--try-capture-to-ref-h is called. It needs to check ...+olp and goto-char to the OLP directly.

I think org-entry-end-position is not work when :prepend is nil, which means append actually. Because org-entry-end-position give you just end (before its subtree) of current entry instead of end of current whole entry including its subtree. That worked as prepend even if :prepend is nil.

@hwiorn
Copy link
Contributor Author

hwiorn commented Mar 30, 2023

I notice the 3 types of :prepend could be existed.
Currently, :prepend only two type, nil or t.

  1. :prepend is nil (append)
* Note
  Some notes
  <- Add here: "** Something captured text 4"
** Something captured text 1
** Something captured text 2
** Something captured text 3
  1. :prepend is t
* Note
  <- Add here: "** Something captured text 4"
  Some notes
** Something captured text 1
** Something captured text 2
** Something captured text 3
  1. :prepend is after-subtree (which I'm trying to make it this PR)
* Note
  Some notes
** Something captured text 1
** Something captured text 2
** Something captured text 3
  <- Add here:  "** Something captured text 4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outline path is ignored when org-roam-ref-capture at second time
1 participant