Closed jayrajput closed 8 months ago
Checking more. (items (ekg-logseq--to-import-text)
is returning nil. Probably it has to do something with moving files from windows to linux.
Tried dos2unix
on all the files, no changes. No files getting imported. ekg-logseq--to-import-text
is returning nil
.
I can force import by making this change in ekg-logseq--to-import-text
function. But after that my notes are seen in markdown-mode
by ekg
and C-c C-c
when editing the notes does not work.
@@ -267,7 +267,7 @@ make less sense without it."
(if (eq major-mode 'org-mode)
(org-element-map (org-element-parse-buffer) 'headline
(lambda (headline)
- (unless (or (org-element-property :ekg_hash headline)
+ (when (or (org-element-property :ekg_hash headline)
(org-element-property :EKG_HASH headline)
(> (org-element-property :level headline) 1))
(buffer-substring-no-properties
some test code. I need help on how to fix this. I manually marked the mode to org-mode
from triples sqlite, but then realized two more problems 1. Heading are all demoted 2. Properties prefixes are added to all the heading.
(let ((file "~/org/logseq/pages/without-mouse.org"))
(with-temp-buffer
(insert-file-contents file)
(when (equal "org" (file-name-extension file))
(org-mode))
(let ((items (org-element-map (org-element-parse-buffer) 'headline
(lambda (headline)
(when (or (org-element-property :ekg_hash headline)
(org-element-property :EKG_HASH headline)
(> (org-element-property :level headline) 1))
(buffer-substring-no-properties
(org-element-property :begin headline)
(org-element-property :end headline))))
nil nil 'headline)))
(cl-loop for text in items
do
(message text)))))
Interesting, thanks for the report and investigation. Let me see if I can figure it out. Can you share an example file? I suppose any file should do, you can replace the text with "lorem ipsum" or something to preserve your privacy.
Thanks!
So, we don't import things already exported by ekg. So if there is an ekg_hash
property, we skip it. If your database is empty, though, you probably do want to import it. Ordinarily we wouldn't because we don't want to re-import a note from logseq that you deleted in ekg.
I could make a change to force it always import everything. I'd recommend, though, that if you can just re-use your ekg database, you should. What do you think?
Also, looking at your file, it is a bit weird , because it has two property drawers, and it should just have one. I looked over my logseq output and I see this on a few of my notes as well, but not the majority. This is something I'll look into.
I can re-use my triples database. Not a problem.
Interesting design choice though. I realise how allowing the notes to be updating both in ekg
and logseq
can be problem.
closing the issue as able to reuse my triples database.
Got a new Mac mini and setting up things. My triples.db from windows was maintained locally, but the
logseq
files were backed up to a private repository which I am trying to import, which is not working. How to debug this more?