Comments (10)
Normally neuron-mode
should be enabled automatically whenever one opens a markdown file in a zettelkasten, assuming the directory has a neuron.dhall
file at its root.
However, manually enabling neuron-mode
shouldn't give an error, regardless of the existence of neuron.dhall
.
Could you provide the backtrace?
from neuron-mode.
How do I generate a backtrace?
from neuron-mode.
Running M-x toggle-debug-on-error
should open a buffer with the backtrace when an error occurs.
from neuron-mode.
I get this error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
intern(nil)
#f(compiled-function (zettel) #<bytecode 0x16ce4d1>)(((zettelTags . ["learning"]) (zettelDay . "2020-07-25") (zettelID . "bb86db02") (zettelError (Right . [])) (zettelContent . []) (zettelQueries . [["ZettelQuery_ZettelByID" ["e692b9e8" nil]]]) (zettelFormat . "markdown") (zettelPath . "bb86db02.md") (zettelTitle . "How to Use the Zettelkasten System?") (zettelTitleInBody . t)))
mapcar(#f(compiled-function (zettel) #<bytecode 0x16ce4d1>) [((zettelTags . ["learning"]) (zettelDay . "2020-07-25") (zettelID . "bb86db02") (zettelError (Right . [])) (zettelContent . []) (zettelQueries . [["ZettelQuery_ZettelByID" ["e692b9e8" nil]]]) (zettelFormat . "markdown") (zettelPath . "bb86db02.md") (zettelTitle . "How to Use the Zettelkasten System?") (zettelTitleInBody . t)) ((zettelTags . ["learning"]) (zettelDay) (zettelID . "e692b9e8") (zettelError (Right . [])) (zettelContent . []) (zettelQueries . []) (zettelFormat . "markdown") (zettelPath . "e692b9e8.md") (zettelTitle . "Using Feynman Notes for Learning") (zettelTitleInBody . t))])
neuron--rebuild-cache()
byte-code("\301\010!\203\011\0\302 \210\303\304!\207" [neuron-zettelkasten f-directory\? neuron--rebuild-cache provide neuron-mode] 2)
autoload-do-load((autoload "neuron-mode" "A major mode to edit Zettelkasten notes with neuron.\n\n(fn)" t nil) neuron-mode)
command-execute(neuron-mode record)
execute-extended-command(nil "neuron-mode")
smex-read-and-run(("toggle-debug-on-error" "neuron-mode" "R" "cd" "5x5" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "bbdb" "calc" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "mail" "mpuz" "ping" "pong" "smex" "talk" "term" "undo" "yank" "zone" "align" "chmod" "debug" "diary" "dired" "ediff" "edirs" ...))
smex()
funcall-interactively(smex)
#<subr call-interactively>(smex nil nil)
apply(#<subr call-interactively> smex (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> smex nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (smex nil nil))
call-interactively(smex nil nil)
command-execute(smex)
from neuron-mode.
That is odd. I'm almost certain that the compiled function that gives the error is assoc-id
defined here:
(defun neuron--rebuild-cache ()
"Rebuild the zettel cache with the current zettelkasten."
(let ((zettels (neuron--query-url-command "z:zettels"))
(assoc-id (lambda (zettel) (cons (intern (map-elt zettel 'zettelID)) zettel))))
(setq neuron--zettel-cache (mapcar assoc-id zettels))))
But this would mean that (map-elt zettel 'zettelID)
returns nil
, which sounds impossible given that the list of zettels in te backtrace provide a zettelID
field for each entry.
What is the value of neuron-default-zettelkasten-directory
? Also, do you have the neuron.dhall
file at the root of your zettelkasten?
from neuron-mode.
What is the value of
neuron-default-zettelkasten-directory
?
neuron-default-zettelkasten-directory’s value is "/home/simons/zettelkasten", which is where the zettelkasten lives. I used to have it at ~/src/zettelkasten
, but eventually moved it because keeping the directory in a non-default place caused all kinds of trouble with neuron itself, etc.
Also, do you have the
neuron.dhall
file at the root of your zettelkasten?
Yes, I do:
$ cat neuron.dhall
{ siteTitle = "Peter Simons' Zettelkasten"
, siteBaseUrl = Some "http://cryp.to"
}
from neuron-mode.
Do you have any idea what might be causing this issue?
from neuron-mode.
Sorry for the late response, unfortunately I wasn't able to reproduce the bug.
Could you try updating both neuron and neuron-mode just to be sure? (<id> links are still supported for now, I'll do wikilinks next)
And then try reproducing the error and backtrace without compiling your config so that I can be sure where the error comes from
Not sure how to run emacs without using the precompiled files though
from neuron-mode.
I usually install these Emacs modes via Nix, which means that I get whatever version of these that Nixpkgs currently contains. Nix snapshots ELPA and other repositories every couple of weeks, so it's possible that these versions are not completely up-to-date. Anyhow, the errors I experience come from the Nix-based installation. So I tried something else and installed neuron-mode
via package.el
in Emacs. Lo and behold, that installation works just fine.
So it's safe to say that this issue is not caused by a bug in neuron-mode itself. Rather, it's some kind of incompatibility between neuron-mode and some older version of some other library that it uses.
from neuron-mode.
I usually install these Emacs modes via Nix
Interesting, how does it work? I think you can also do declarative builds directly in emacs using something like straight (doom emacs configs are more or less declarative for example, it is based on straight). The only issue is that you can't install external software this way.
I'll leave the issue open in case someone finds a fix
from neuron-mode.
Related Issues (20)
- Non blocking cache regeneration is very slow HOT 3
- The function `neuron-toggle-connection-type` fails HOT 1
- can't run `neuron-new-zettel` in dired-mode HOT 3
- Feature request: Add ability to easily navigate between journal entries HOT 2
- Template zettels HOT 1
- Tag specific keymaps HOT 1
- Cannot bind neuron-toggle-connection-type HOT 2
- Support wiki links HOT 7
- Another failure when initializing neuron mode HOT 3
- --id-hash and --id-date not supported anymore HOT 4
- Ignore log messages in output of 'neuron query' HOT 2
- 'neuron-add-tag' is unable to identify tags with latest version of neuron HOT 3
- Querying by --uri fails now? HOT 3
- neuron v2 query HOT 3
- neuron-insert-zettel-link inserts [[[nil]]] for link with non-ascii letters in filename HOT 8
- Canonical location of tags in `neuron query` (v2) HOT 1
- Release (or tag) for the last version that worked with Neuron 1.0 HOT 1
- Updates for latest (unreleased) Neuron version HOT 6
- --zettels is no longer a valid query flag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuron-mode.