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

Best way to use Neuron alongside Obsidian? #229

Closed
SquareBottle opened this issue Jun 11, 2020 · 12 comments
Closed

Best way to use Neuron alongside Obsidian? #229

SquareBottle opened this issue Jun 11, 2020 · 12 comments
Labels
awaiting-pr discussion Forum like question asked; not exactly a feature or a bug. proposal Proposal with exact spec yet to be fleshed out

Comments

@SquareBottle
Copy link

Ever come across something that you love at first sight, only to find that some tiny issues keep you from using it? That's where I am. Neuron looks amazing, but it just doesn't seem like it was designed for people who already use Obsidian, Zettlr, etc. to make Zettelkastens.

I have a small Zettelkasten that I've made with Obsidian and Zettlr. I was hoping that using Neuron would be as simple as telling it to use my existing Zettelkasten directory.

  1. It seems like the standard way of linking is [[note id]], but Neuron uses instead. Fortunately, Zettlr has an option to change the link tag, but Obsidian has no such option. But still, why doesn't Neuron just use [[note id]] like the others?

  2. Obsidian and Zettlr have nice options for exporting markdown notes to PDF, but the way Neuron demands YAML at the top messes up that export functionality because the title ends up appearing twice unless the markdown header is removed (which makes Neuron pages appear nice, but isn't so nice for PDF exports) or the YAML is removed (which breaks Neuron).

This is as far as I've gotten with playing with Neuron. If there are ways to make it "play nice" with Obsidian and Zettlr, then I'd absolutely love to know what they are!

I realize that we can still use Obsidian and Zettlr to edit the markdown files for Neuron, technically. When I talk about making it "play nice," what I mean is not breaking syntax highlighting, not breaking link functionality, not messing up the display of PDF exports, and otherwise not breaking any of the features that make Obsidian and Zettlr better than MS Notepad. I hope that makes sense!

Again, I think Neuron looks absolutely incredible, and I'd really love to use it. I just wish I could use it and still take advantage of what Obsidian and Zettlr offer. If there's a workflow that would solve these issues, I'd love to know it! And if not, then please consider this a feature request for better compatibility with Obsidian, Zettlr, etc.

Thank you for hearing me out. I hope I've made sense.

@Nadrieril
Copy link
Contributor

Once we get #181, the yaml header will be optional. That should fix your 2.
Regarding links, the reason neuron doesn't use [[id]] is that it's not valid markdown. We now have a more flexible parser however, so it's at least technically feasible to support this link syntax. I'll let @srid decide on whether we want that.

@srid
Copy link
Owner

srid commented Jun 11, 2020

I have not used those apps, but I understand that it would be nice be able to edit neuron notes in them.

As Nadrieril commented, Neuron does not have any special Markdown syntax for links, as it piggybacks on commonmark autolinks syntax, which IMO is a simpler and sufficient choice than having to introduce custom syntax.

Assuming [[note id]] in Obsidian and Zettlr links to a file named note id.md (i.e., they don't do anything fancy like searching by title), supporting this additional linking syntax in neuron should satisfy your point no. (1). I'd be open to that, as long as it is an optional feature (to be enabled by the user in neuron.dhall).

To implement this you may have to write a commonmark inline parser (similar to the current one), and convert [[...]] to Pandoc's Link AST node similar to what <..> currently generates.

@srid srid added proposal Proposal with exact spec yet to be fleshed out discussion Forum like question asked; not exactly a feature or a bug. awaiting-pr labels Jun 11, 2020
@srid
Copy link
Owner

srid commented Jun 11, 2020

Once we get #181, the yaml header will be optional. That should fix your 2.

Done in master. @SquareBottle Can you give it a try?

@SquareBottle
Copy link
Author

Once we get #181, the yaml header will be optional. That should fix your 2.

Done in master. @SquareBottle Can you give it a try?

2 appears fixed. Thanks!

Assuming [[note id]] in Obsidian and Zettlr links to a file named note id.md (i.e., they don't do anything fancy like searching by title), supporting this additional linking syntax in neuron should satisfy your point no. (1). I'd be open to that, as long as it is an optional feature (to be enabled by the user in neuron.dhall).

Yes, I think this would do the trick! I'd be very grateful if you'd implement it. In a nutshell, it's currently the only thing holding me back from using Neuron.

In neuron.dhall, would/will it be as simple as changing a boolean, deleting a comment tag, or something equally simple? Is that the solution you're envisioning?

@srid
Copy link
Owner

srid commented Jun 14, 2020

In neuron.dhall, would/will it be as simple as changing a boolean

Yup.

Now, we could just make it the default (so that no configuration is required), but I'll have to think of the implications first (is it going to break existing Markdown files?).

Yes, I think this would do the trick! I'd be very grateful if you'd implement it

That's good to know. I'm busy with so many things (including cerveau) - however I'd be happy to guide anyone through implementing this[1]. As a first stage of 'minimum viable feature', in the PR one could just modify angleBracketLinkP to use [[..]] instead of <..>, while you test if that branch works with your Obsidian notes.

[1] Developing on neuron should be a smooth process, and a couple of folks (one of them not familiar with Haskell) found it to work surprisingly well.

@srid srid added the good first issue Good for newcomers label Jun 17, 2020
@srid
Copy link
Owner

srid commented Jun 18, 2020

@SquareBottle I've added wiki-style links in #237. Can you give it a try and let me know if it works for you?

Unless somebody else raises an issue with their notes, I don't see any harm in supporting it by default.

@srid srid removed the good first issue Good for newcomers label Jun 18, 2020
@srid
Copy link
Owner

srid commented Jun 18, 2020

I'm noticing however that Zettlr breaks if you use cf links, eg: [[ef3kdk4?cf]]. So this is not going to work 100%, unless Zettlr gets a change to ignore queries in the link URI. Since Zettlr is open source, someone can perhaps just open a PR and convince the maintainer of its value.

Although I haven't tried it, the same issue might also exist on Obsidian (which is not open source).

@SquareBottle
Copy link
Author

I've reached an unexpected impasse. In my terminal, I've started getting this response whenever I try to use nix:

zsh: command not found: nix-env

I just went through the instructions for installing nix on macOS again, and it's still saying that. I have no idea what is causing this. But yeah, as I temporarily can't update Neuron, I temporarily can't give #237 a try. I feel guilty since you've put your time and effort into this, but I don't have any idea what to do about this. Nix worked without any issues until now.

Is it possible that the latest update to macOS (10.5.5) has broken Nix? If so, do I basically just need to sit tight until it's fixed? :(

@NullSense
Copy link

I'm noticing however that Zettlr breaks if you use cf links, eg: [[ef3kdk4?cf]]. So this is not going to work 100%, unless Zettlr gets a change to ignore queries in the link URI. Since Zettlr is open source, someone can perhaps just open a PR and convince the maintainer of its value.

Although I haven't tried it, the same issue might also exist on Obsidian (which is not open source).

Another way to do this would be making a tertiary script to remove the ?cf queries. I was thinking of writing a few scripts to do this for a lot of formats to standardize everything. Something like a gateway to a Zettelkasten format would be nice. Unfortunately no Zettelkasten format exists.

@srid
Copy link
Owner

srid commented Jun 18, 2020

@SquareBottle Looks like your shell is not sourcing the init scripts? What's in /etc/bashrc? Or ~/profile? You should see something like this:

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

(Oh I see you are using zsh, that may be it. Use bash as a workaround for now, or fix your zsh init scripts)

@srid
Copy link
Owner

srid commented Jun 19, 2020

Obsidian is even more troublesome. See https://funprog.srid.ca/neuron/obsidian.html#201374004


I'm going to close this issue (but feel free to continue the discussion). I am disappointed at myself for having added wiki-style syntax in haste. But this should be done carefully.

Someone should write a concrete proposal on the exact wiki-link syntax that they think would be most compatible, and make most sense.

They will have to spearhead this work, which will involve the following:

  • Use the various apps and understand the various combinations of their linking syntax
  • Write the proposal spec
  • Implement it in neuron
  • Test the implementation to identify unforeseen edge cases, issues, etc.

If you have concrete proposals on interoperability, open them as individual issues.

@srid srid closed this as completed Jun 19, 2020
@SquareBottle
Copy link
Author

Just to be super clear, there is no reason to believe that anything related to Neuron caused my issues with Nix! My current best guess is that an update caused this.

MacOS switched to zsh a few versions ago, so I'd hope that the Nix team would've taken that into account (assuming they intend for Nix to work on macOS, as opposed to it working on macOS by happy coincidence up to now). So, if you think that it'd be safer to have the Nix installation run using bash, would it be a good idea to update the Neuron installation instructions to that effect?

@srid srid mentioned this issue Jul 29, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-pr discussion Forum like question asked; not exactly a feature or a bug. proposal Proposal with exact spec yet to be fleshed out
Projects
None yet
Development

No branches or pull requests

4 participants