ahyatt / ekg

The emacs knowledge graph, app for notes and structured data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

need hook to disable evil mode in ekg-notes-mode

vigilancetech-com opened this issue · comments

I'm in doom emacs and it tries to apply evil everywhere so when I bring up the notes view mode many/most of the key bindings are shadowed but I can't find any hook when entering that mode (after the buffer is created) to turn evil off.

I believe ekg-notes-mode-hook is what you are looking for. Does that work for you?

I believe ekg-notes-mode-hook is what you are looking for. Does that work for you?

strangely no.

I set this up:

(add-hook 'ekg-notes-mode-hook (lambda () (message "turning off evil mode in ekg-notes-mode") (turn-off-evil-mode)))

and even tho I see the message show up when I display notes evil mode is still enabled!

If I M-x turn-off-evil-mode then it does in fact turn off. What am I missing?

According to https://evil.readthedocs.io/en/latest/settings.html#elispobj-evil-default-state , you could set its initial state in ekg-notes-mode as emacs (not sure).

(evil-set-initial-state 'ekg-notes-mode 'emacs)

Note: I don't use either doom or evil, cannot confirm that though.

(evil-set-initial-state 'ekg-notes-mode 'emacs)

that seems to have worked.

Quick question:

When I'm in a non-notes buffer, what command am I supposed to use to pull up a list of notes? All the ones I've tried other than ekg-capture say I already have to be in ekg-notes mode before I can execute them.

what command am I supposed to use to pull up a list of notes?

The most frequently used command for me:
ekg-show-notes-with-all-tags
ekg-show-notes-latest-modified
ekg-show-notes-latest-created

For the full list, please refer to the README.org:
https://github.com/ahyatt/ekg#command-summary

Thank you for your help @qingshuizheng! I'm going to close this, as the issue was resolved. Perhaps this deserves a note in the manual, though.