felko / neuron-mode

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

Maybe the most noob question that can be asked... #43

Closed ursulogalvan closed 4 years ago

ursulogalvan commented 4 years ago

Hello, Felko.

I want to thank you for writing this fantastic piece of software. Recently I started to use emacs form my writing workflow. I think neuron-mode it's the one notetaking system that is more closed to my needs but I can't make it work on my doom emacs installation. I think that It'a because after I installed it with the doom emacs especific packages you provide I haven't configured neuron-mode, since I'm not sure where nor how to do it. Is there any link you could recommend for an abdolute noob like me to learn how to configure your package and try running it in my doom emacs?

Thanks in advance and please excude my poor english (it's not my first language. (I have installed neuron and followed the steps you list in your readme.md. I'm working in MX Linux 19.2 and using emacs 27).

felko commented 4 years ago

Hello! Did you manage to integrate this configuration inside your .doom.d directory? It's very close from my actual neuron-mode configuration, so it should be usable as is. If you have trouble to figure out where to put those files, here's a more visual explanation that I hope will help you:

+- .doom.d
|--+ modules/tools/neuron (files from the gist)
|  |-- packages.el
|  |-- config.el
|
|-- init.el
|    (doom!
|      ...
|      :tools
|      neuron
|      ...
|    
|-- other files

Then run doom sync (which you can do from emacs with the SPC h r r command). If those files were already set up in this way in your doom-emacs configuration, then your question is probably not that noob. In that case, I'd need to know in more detail what you mean by not being able to make it work on your doom emacs installation. Do you see any kind of error?

ursulogalvan commented 4 years ago

Yes, I integrated neuron-mode into my doom configuration. I get this error: Wrong type argument: sequencep, neuron.

Thank you very much.

ursulogalvan commented 4 years ago

I really, really don't know how, but after compiling my packages this problem was solved. Thank you for answering my question. I finaklly get to use your package and it seem I wasn't wrong: thys software is amazing.

felko commented 4 years ago

Thanks! Please reopen this issue if the problem reappears

NightMachinery commented 4 years ago

@felko Is it the intended behavior that the user should manually enable neuron-mode on every single zettle file opened, or is my config broken? I already used doom, so I just copied the config code into my private init files, and everything works except this problem of auto-activating neuron-mode for files under the zettle directory.

NightMachinery commented 4 years ago

@NightMachinary commented on Jul 29, 2020, 11:37 AM GMT+4:30:

@felko Is it the intended behavior that the user should manually enable neuron-mode on every single zettle file opened, or is my config broken? I already used doom, so I just copied the config code into my private init files, and everything works except this problem of auto-activating neuron-mode for files under the zettle directory.

After reading the sourcecode, I have learnt that this is because a neuron.dhall file is being used to detect if the directory is for zettlecasten. Before learning this, I added my own function:

(defun night/neuron-activator ()
  (interactive)
  (let  ((dir (file-name-directory buffer-file-name)))
    (print "hi")
    (print (getenv "ZETTLE_DIR"))
    (print dir)
    (when (and (eq major-mode 'markdown-mode) (string-prefix-p (getenv "ZETTLE_DIR") dir))
      (neuron-mode)
      )
    )
  )

(add-hook 'markdown-mode-hook #'night/neuron-activator)
felko commented 4 years ago

After reading the sourcecode, I have learnt that this is because a neuron.dhall file is being used to detect if the directory is for zettlecasten

Yeah, having a neuron.dhall isn't mandatory in neuron zettelkastens, but is necessary when dealing with multiple zettelkastens in neuron-mode. FYI this was explained in the README, but maybe the README goes a little bit too exhaustively through the features, tell me what you think. Should I shorten the README and go over the details in the wiki?

NightMachinery commented 4 years ago

After reading the sourcecode, I have learnt that this is because a neuron.dhall file is being used to detect if the directory is for zettlecasten

Yeah, having a neuron.dhall isn't mandatory in neuron zettelkastens, but is necessary when dealing with multiple zettelkastens in neuron-mode. FYI this was explained in the README, but maybe the README goes a little bit too exhaustively through the features, tell me what you think. Should I shorten the README and go over the details in the wiki?

@felko I think it’s a good idea to explicitly mention that neuron.dhall is what activates neuron-mode on md files.

felko commented 4 years ago

Got it: https://github.com/felko/neuron-mode/commit/930026277ca4c24ad8305b224ceab31900da1f1e Thanks