felko / neuron-mode

An emacs mode for editing Zettelkasten notes with neuron
GNU General Public License v3.0
118 stars 21 forks source link

can't run `neuron-new-zettel` in dired-mode #54

Open bbigras opened 4 years ago

bbigras commented 4 years ago

When I try to run neuron-new-zettel

Not sure if the problem is with neuron-mode or neuron but I got:

neuron--run-command: Command "neuron --zettelkasten-dir \~/dev/neuron/ query --uri z\:zettels" exited with code 1: neuron: user error (Zettelkasten directory ~/dev/neuron/ does not exist.)

The ~ before /dev/neuron/ might be the problem.

neuron-mode 20200805.1051

bbigras commented 4 years ago

I just saw that it's working fine if I'm already in another zettel file.

The problem seems to happen when I'm in dired mode in zettel files directory.

felko commented 4 years ago

Not sure but this might be a duplicate of #46

What is the value of neuron-default-zettelkasten-directory? For the moment, you should set it to (expand-file-name "~/dev/neuron"). I intend to expand automatically but this is not the current behavior, I should be able to fix this easily.

However, regardless of the value of neuron-default-zettelkasten-directory, if your PWD is contained in your zettelkasten, neuron-mode should compute the current active zettelkasten by looking for the neuron.dhall file. I can see why it would fail when browsing other directories in dired, but I can't reproduce the error when having dired opened at the zettelkasten root.

felko commented 4 years ago

Could you try with https://github.com/felko/neuron-mode/commit/18d230ce6b126fe7193db9c20ac93811ccfe779d ?