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

org-roam-dailies-capture make OLP incorrectly when captured again #2335

Open
hwiorn opened this issue Mar 28, 2023 · 2 comments · May be fixed by #2336
Open

org-roam-dailies-capture make OLP incorrectly when captured again #2335

hwiorn opened this issue Mar 28, 2023 · 2 comments · May be fixed by #2336

Comments

@hwiorn
Copy link
Contributor

hwiorn commented Mar 28, 2023

Description

When I make capture task by code, org-roam generates OLP heading again sometimes.

Steps to Reproduce

Run this code and check org/roam/daily/test.org Then run the code again.

(let ((org-roam-directory (expand-file-name org-roam-dailies-directory org-roam-directory))
      (org-roam-dailies-directory "./")
      (org-roam-dailies-capture-templates
       `(("t" "Tasks" entry "* %?"
          :if-new (file+head+olp "test.org" ;; "%<%Y-%m-%d>.org"
                                 "* Notes\n\n* Tasks\n\n* Journal"
                                 ("Tasks" "[2023-03-28 Tue]"))))))
  (save-window-excursion
    (org-roam-dailies--capture (current-time) t)))

Backtrace

There is no error for this.

Expected Results

* Notes

* Tasks

** [2023-03-28 Tue]

* Journal

Actual Results

'("Tasks" "[2023-03-28 Tue]") OLP is generated again.

* Notes

* Tasks

** [2023-03-28 Tue]

* Journal

* Tasks

** [2023-03-28 Tue]

Environment

- Emacs: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
 of 2023-03-20
- Framework: Doom
- Org: Org mode version 9.6.1 (9.6.1-??-fe92a3c @ /home/gglee/.config/emacs/.local/straight/build-30.0.50/org/)
- Org-roam: 5c06471-dirty
- sqlite-connector: sqlite-builtin
@hwiorn
Copy link
Contributor Author

hwiorn commented Mar 28, 2023

This issue is caused from (org-roam-capture-find-or-create-olp OLP).

@hwiorn
Copy link
Contributor Author

hwiorn commented Mar 28, 2023

@hwiorn hwiorn linked a pull request Mar 28, 2023 that will close this issue
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 a pull request may close this issue.

1 participant