ahyatt / ekg

The emacs knowledge graph, app for notes and structured data.
GNU General Public License v3.0
230 stars 19 forks source link

Deleting note title doesn't really delete title in database #126

Closed qingshuizheng closed 10 months ago

qingshuizheng commented 10 months ago

Hello @ahyatt ,

Seems deleting note title to empty, doesn't really delete title in database. I will need to delete it manually:

(triples-remove-type ekg-db id 'titled)

Original note for comparison: iShot_2023-12-21_11 14 00

Delete the title to empty and finalize it, the title still exists and appears as a empty string , which was underlined: image (ekg-current-note-or-error)

#s(ekg-note 33524290367 "When note title is delete to empty, the title line(s) should disppear" org-mode ("date/2023-12-21") 1703128003 1703128452 (:titled/title ("")) nil)

--

BTW, hours ago I had another comment in https://github.com/ahyatt/ekg/commit/cc20f36e1179b7af109b431119bc01d41f72eed3#r135411436

I thought that was a fix for this, but turns out that was just a fix for collecting empty titles.

--

Thanks.

Edit: update 2nd pic; upload note info

ahyatt commented 10 months ago

Thanks for the report. Can you verify that the fix I submitted works?

qingshuizheng commented 10 months ago

Can you verify that the fix I submitted works?

Thanks for the quick fix! It works!

For the commit cc20f36 to separate multiple titles with comma in ekg-notes-mode, I think you base this idea on the fact that default ekg-title face has underline property in it. The user might change it to a face without underline tho. Just a concern, you call it. Otherwise, this issue could be closed.

Thanks!