localauthor / zk

Emacs packages for working with Zettelkasten-style linked notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal config

anthrolisp opened this issue · comments

Would it be possible to include a minimal config to setup everything in the readme file, perhaps using use-package? I think that would make starting out with this setup much easier!

Thanks in advance! J

Are you looking for something more than what is in this section? -> https://github.com/localauthor/zk#sample-setup-with-use-package

Yes, one that includes the other complementary packages and functions specified below!

I see now. Thank you!!!

Great. Let me know if you think anything in the readme might be clarified, as you get set up.

Installed zk through Melpa with the following in init.el:

(setq zk-directory "~/Dropbox/notes/")
(setq zk-file-extension "org") ;; any plaintext file extension, eg, "org" or "txt"

The first time I M-x zk-new-note it works fine. The second time I keep getting a listp error:

zk--generate-id: Wrong type argument: listp, "202305021716"

Any ideas?

Do M-x toggle-debug-on-error and paste the backtrace here, and I'll take a look.

Oh, I know. When there is only one file in zk-directory, zk--id-list returns the id as a string rather than as a list. I've pushed a fix, but it might be a bit before it shows up on MELPA.

For now, evaluate the following, and see if 'zk-new-note` works:

(defun zk-id-p (id)
 "Return t if ID is already in use as a zk-id."
 (when (and (listp (zk--id-list))
            (member id (zk--id-list)))
   t))

debug:

Debugger entered--Lisp error: (wrong-type-argument listp "202305021716")
zk-id-p("202305022155")
zk--generate-id()
zk-new-note()
funcall-interactively(zk-new-note)
command-execute(zk-new-note record)
execute-extended-command(nil "zk-new-note" nil)
funcall-interactively(execute-extended-command nil "zk-new-note" nil)
command-execute(execute-extended-command)

I evaluated the code and it works now. Thank you!!

EMACS does not seem to like the following in the init.el:

(zk-setup-auto-link-buttons)
I get the following error on startup:

Symbol's function definition is void: zk-setup-auto-link-buttons

In the ZK-Index buffer, when I click on one of the files or hit enter I get the following error:

zk-index-button-action: Symbol’s value as variable is void: zk-desktop-directory

I added the following for the zk-luhmann as suggested:
(define-key zk-index-map (kbd "L") #'zk-luhmann-index-sort) (define-key zk-index-map (kbd "l") #'zk-luhmann-index) (define-key zk-index-map (kbd "C-f") #'zk-luhmann-index-forward) (define-key zk-index-map (kbd "C-b") #'zk-luhmann-index-back) (define-key zk-index-map (kbd "C-t") #'zk-luhmann-index-unfold) (define-key zk-index-map (kbd "t") #'zk-luhmann-index-top)

On startup, I get the following error:

Symbol's value as variable is void: zk-index-map

I appreciate your patience and help! Of all of the different note-taking systems I've tried, I've returned to emacs, and within the emacs ecosystem, the workflow in your videos speaks the most to me. I am hoping I can get it setup!

Thank you again!

Not sure what changed, but I am now able to open notes from the ZK-Index-buffer!

Do you know longer use zk-hydra?

Last questions for tonight (and apologies for asking so many!)
I have a bunch of other md and org files, some created in emacs (including denote) and some not. I notice that the zk-index only lists files with the zk formatting. Do you know of any function that could rename the file by inserting a new correct length identifier?
Thanks again!!!

I see now the zk-index-map is already in the code and so does not need to be put in the init file!

For now, all that's left are questions about

  • (zk-setup-auto-link-buttons)
  • zk-hydra
  • renaming to zk format

Thanks again!!

Regarding zk-setup-auto-link-buttons, it might be an issue with the setup in your init file? It seems the function is being called before zk.el is loaded.

I do use hydra, yes. My full zk setup, including my hydra, is here: https://github.com/localauthor/.emacs.d/blob/main/my-lisp/zk-setup.el

As for renaming to zk format, it would take a bit of leg work to come up with a general solution --- some kind of migration utility, that would go through a directory, check for proper formatting, and then rectify --- somehow? Maybe you have some ideas?