Add ekg-edit-hook
#80
Replies: 3 comments 21 replies
-
I think setting the modified state to Also, your use-case seems a lot like #19, and I have the same objection, which I don't think I've really thought of a great solution for yet. If you have any ideas, let me know! |
Beta Was this translation helpful? Give feedback.
-
This is a good change. I recently discovered that So the draft tag be automatically applied on a new capture or edit? And only on |
Beta Was this translation helpful? Give feedback.
-
Andrew has pushed some great changes in both
Thanks for addressing them. @ahyatt |
Beta Was this translation helpful? Give feedback.
-
Senario: auto save without having to finalize
I don't finalize the ekg capture/edit buffer too often, just to keep them open for more info to come in. Very often I mistakenly kill an unsaved note buffer, and those are the moments I'm dying inside. :-(
So I have a workflow for auto-saving current ekg-capture/edit instance without having to finalize using
ekg-capture/edit-finalize
. The note auto saves every 1 sec using the goodies of the packagesuper-save
but with an advisedsuper-save-command
If the note is saved via the above auto-save mechanism, the note will be tagged as "raw", so I have a clue to find them later on; If the note is finalized normally, the "raw" tag will be converted to "draft".
The workflow relies on the state of
buffer-modified-p
in capture/edit buffer. At the moment the capture/edit buffer's initial modified state is alwayst
. It should be set default to nil, otherwise it will triggersuper-save
to save when a note is captured or opened.I have tried it in my personal fork commit (bec068f) for one month or so, which works great. But I cannot think of a good reason to ask for adding a
(set-buffer-modified-p nil)
to bothekg-capture
andekg-edit
. Or maybe It's okay to add it?A more generalized solution: add a new HOOK
ekg-edit-hook
So what I have in my mind is to add a HOOK
ekg-edit-hook
withinekg-edit
, thus user could use it to add customizations like other -hook does.For my use case:
Like to hear you thoughts.
Beta Was this translation helpful? Give feedback.
All reactions