Lambda-Emacs / lambda-emacs

Emacs distribution with sane defaults, pre-configured packages, and useful functions.
MIT License
154 stars 12 forks source link

Where to change the default notes location? #26

Closed anthrolisp closed 1 year ago

anthrolisp commented 1 year ago

I am unable to find where to change the default notes location. At the moment denote create notes in ~/Documents/notes . Thank you in advance!

mclearc commented 1 year ago

In the lem-setup-notes.el file (or via M-x customize-variable) you should see the option

(defcustom lem-notes-dir nil
  "Set a directory path for notes."
  :group 'lambda-emacs
  :type 'string)

So just do something like, e.g., (setq lem-notes-dir "dir/path/to/notes") and you should get the behavior you want.

anthrolisp commented 1 year ago

I tried adding this -- (setq lem-notes-dir "dir/path/to/notes") -- to the config.el file (changing the location to "~/Dropbox/org/") but to no avail. Denote still save to "~/Documents/notes".

mclearc commented 1 year ago

if you're using denote you need to set the denote notes folder as well. So here's how I have things for an example:

(setopt lem-notes-dir (concat (getenv "HOME") "/Documents/notes/")
        denote-directory (concat lem-notes-dir "denotes/")
        denote-known-keywords '("emacs" "teaching" "unl" "workbook")
        denote-prompts '(title keywords subdirectory)
        consult-notes-denote-display-id t
        citar-denote-subdir t)

Use setq instead of setopt if you're on emacs 28.x or earlier.

EDIT: I should also say I have this set in my config.el file. If you do the same and you defer loading you might want to wrap the above in a (with-eval-after-load 'denote ...) function.

mclearc commented 1 year ago

Has your issue been resolved?