A strange problem occurs when I add ord-id-links to my org-headers. My org-agenda is building endlessly.
As an example, when I try to build an org-agenda for a file with following content, it takes endlessly:
* School
** TODO [[id:1b4b87ba-76b6-42c3-8897-7e587176d546][Physik]]
DEADLINE: <2020-08-16 So +1w>
As soon as I replace the id-link with a direct file-link, the org-agenda builds as normal:
* School
** TODO [[file:~/org/school.org#Physik][Physik]]
DEADLINE: <2020-08-16 So +1w>
Currently, I'm using spacemacs. I searched for org-agenda and org-id-links, but I couldn't find anything with similar issues. I may also be a spacemacs specific bug. Haven't tested with vanilla emacs.
Do you know this behaivior? What could I try to fix the problem (setting some magic custom variable or so)?
UPDATE
accept-process-output(#<process emacsql-sqlite3<1>> 30)
#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0x1b6f265>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection>)
apply(#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0x1b6f265>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection> nil)
emacsql-wait(#<emacsql-sqlite3-connection emacsql-sqlite3-connection>)
#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0x1c76c7d>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select [file] :from headlines :where (= id $s1)] "49a9a162-2476-44e1-8596-565781663e62")
apply(#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0x1c76c7d>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection> ([:select [file] :from headlines :where (= id $s1)] "49a9a162-2476-44e1-8596-565781663e62"))
emacsql(#<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select [file] :from headlines :where (= id $s1)] "49a9a162-2476-44e1-8596-565781663e62")
apply(emacsql #<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select [file] :from headlines :where (= id $s1)] "49a9a162-2476-44e1-8596-565781663e62")
(if (stringp sql) (emacsql (org-roam-db) (apply (function format) sql args)) (apply (function emacsql) (org-roam-db) sql args))
org-roam-db-query([:select [file] :from headlines :where (= id $s1)] "49a9a162-2476-44e1-8596-565781663e62")
(car (org-roam-db-query [:select [file] :from headlines :where (= id $s1)] id))
(car (car (org-roam-db-query [:select [file] :from headlines :where (= id $s1)] id)))
(or (car (car (org-roam-db-query [:select [file] :from headlines :where (= id $s1)] id))) (if strict nil (org-id-find-id-file id)))
(let ((file (or (car (car (org-roam-db-query [:select [file] :from headlines :where ...] id))) (if strict nil (org-id-find-id-file id))))) (if file (progn (org-id-find-id-in-file id file markerp))))
org-roam-id-find("49a9a162-2476-44e1-8596-565781663e62")
It looks like org-roam causing the loop.
emacs -q
with a minimal init file. Try that and if you cannot reproduce it either, the fault is with your init file: bisect it to find out where it breaks. Another alternative is to setdebug-on-quit
, then break withC-g
and look at the backtrace. You can edit your question and add the results of those experiments. – NickD Aug 16 '20 at 15:06