publicimageltd/delve

Can't save collection

Closed this issue · 4 comments

Hi

I don't know if I'm doing something wrong, but I just can't save collections. Or, I can, but I can't open them.

So, I start with M-x delve, input test, visit a couple of org-roam nodes, and do M-x delve-minor-mode-collect-actions n. I now have two nodes in my collection. So far so good. Then, I do M-x delve-save-buffer, select a file (test.delve), and get a message saying Collection stored in file /home/user/some/path/test.delve.

To open it, if a just open the test.delve file, I see:

;;; file created: 07/31/2022 at 13:58 h -*- emacs-lisp -*-

((delve--zettel :id "fe701d98-7ebc-48cb-a810-dae3f667a7bf")
 (delve--zettel :id "ab90e1d2-0dbd-4836-9203-eeea766a09ae"))

;; Local Variables:
;; eval: (when (featurep 'flycheck) (flycheck-mode -1))
;; End:

This indicates me that the collection was indeed saved. Now, to open it again, I do M-x delve-find-storage-file, but all I see is an empty collection. The github readme says that M-x delve-open-storage-file should be used, but I don't see that function in my emacs. Then, if I do M-x delve-save-buffer again and open test.delve, I see this file:

;;; file created: 07/31/2022 at 14:04 h -*- emacs-lisp -*-

nil
;; Local Variables:
;; eval: (when (featurep 'flycheck) (flycheck-mode -1))
;; End:

What am I doing wrong and why can't I re-open previously saved collections?

Thanks,

Thanks for posting the issue. The README is wrong, delve-open-storage-file has been removed. So you are using the right function. The raw file looks alright. Maybe there is an issue with the database? Please check if the IDs in the raw file correspond to real nodes. If yes, load the file and then switch to the buffer *Delve DB Interactions*. Check the last output there, if everything looks alright. It should be a big query returning 2 items, corresponding to your IDs.

EDIT: The last raw file you post, with the nil value, is just an "empty" buffer.

All I see in the *Delve DB Interactinos* buffer is:

08/16/22 14:44:37 [:select (funcall count *) :from nodes]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select (funcall count *) :from nodes :where (= level 0)]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select :distinct tag :from tags :order :by asc]
08/16/22 14:44:37  -- query returns 8 items in 0.00 seconds.
08/16/22 14:44:37 [:select (funcall count *) :from nodes]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select (funcall count *) :from nodes :where (= level 0)]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select :distinct tag :from tags :order :by asc]
08/16/22 14:44:37  -- query returns 8 items in 0.00 seconds.
08/16/22 14:44:37 [:select (funcall count *) :from nodes]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select (funcall count *) :from nodes :where (= level 0)]
08/16/22 14:44:37  -- query returns 1 items in 0.00 seconds.
08/16/22 14:44:37 [:select :distinct tag :from tags :order :by asc]
08/16/22 14:44:37  -- query returns 8 items in 0.00 seconds.

If I understand this correctly, it isn't even looking for the node...

Is this the output you get after trying to load the .delve file? This looks indeed like it is not even looking for the nodes. But are you sure you tried to load the first file, the one with the IDs? If you are unsure, please kill the interactions buffer, load this file (with non-nil content), and then post the output of the interactions buffer.

Maybe the problem is the saving part, not the loading.

Closing the issue, since nobody else has reported a problem with saving and there are no further feedbacks from the OP.