Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neuron-insert-zettel-link inserts [[[nil]]] for link with non-ascii letters in filename #74

Open
arkoort opened this issue Feb 3, 2021 · 8 comments

Comments

@arkoort
Copy link

arkoort commented Feb 3, 2021

With default settings (I use LANG=ru_RU.UTF-8) neuron executable returns ???? instead of non-ascii letters. With LANG=C.UTF-8 executable returns the correct results (I've tried some queries by hand) and neuron-mode operates mostly correct, but it cannot insert the link to the zettel file with non-ascii letters in the file name.

I admit that my setup is incorrect somewhere, but I cannot find the reason.

@felko
Copy link
Owner

felko commented Feb 8, 2021

I think this is because of the regex that is used to identify links (which is used when selecting a zettel), it only matches characters in [A-Za-z0-9-_ ]. Emacs regexps have a special [:alnum:] class that can match alphanumerical character from different scripts, depending on your system's language I think. You could try this commit 02fbfca, make emacs use ru_RU.UTF-8, and write (setq neuron-executable "LANG=C.UTF-8 neuron") in your emacs config until neuron supports ru_RU.UTF-8 (maybe you should open an issue on the neuron repo).

@arkoort
Copy link
Author

arkoort commented Feb 8, 2021

Thank you, it works now with cyrillic letters. But is there the reason to limit to alphanumerical, - and _ only? The filename one of my zettels was initially named ZFS_2.0 (it has some my notes about new ZFS version), but I was forced to rename it to ZFS_2 because neuron-mode inserted [[[nil]]] instead of its title too. It seems to me that there can be any symbol except space (because neuron itself doesn't expand titles if the filename contains space). Of course only if it will not break the code.

I've got the recommendation about C.UTF-8 as quick fix just from one of neuron issues, but you're right, I'll discover this situation more carefully, and maybe it really needs to be fixed.

@srid
Copy link
Contributor

srid commented Feb 8, 2021 via email

@arkoort
Copy link
Author

arkoort commented Feb 8, 2021

It allows, but doesn't expand links in generated HTMLs. For example, [[12345678_qwe]] will be shown in HTML as "The qwe link" (if it has # The qwe link title), but [[12345678 qwe]]` will remain "12345678 qwe".

Or I understand wrong? I've got that behaviour in my base at the latest neuron.

@srid
Copy link
Contributor

srid commented Feb 8, 2021 via email

@arkoort
Copy link
Author

arkoort commented Feb 8, 2021

Sorry, my English is very poor. I try do say the following:

  1. if the file 12345678_qwe.md has the title # The link, and in another note I use see [[12345678_qwe]]., I'll see in HTML: see The link..
  2. if the file 12345678 qwe.md has the title # The link, and in another note I use see [[12345678 qwe]]., I'll see in HTML: see 12345678 link..

I've read the Guide and I understand that it is the expected behaviour. But I need the first variant and just it was I tried to say in the original message. It was not the claim against neuron, it was the description of my situation. Sorry for not being able to say that on the first try.

(And, of course, this is the reason why I write about cyrillic letters both in neuron repo and here:)

@srid
Copy link
Contributor

srid commented Feb 8, 2021 via email

@arkoort
Copy link
Author

arkoort commented Feb 8, 2021

Sorry, it wasn't clear from documentation (and from site, where almost all spaced filenames have no title, and just one has title natching filename). Should I open an issue, or it may be caused by #543?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants