felko / neuron-mode

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

--id-hash and --id-date not supported anymore #63

Closed sudeepdino008 closed 3 years ago

sudeepdino008 commented 3 years ago

I've been getting this when creating a new zettel. My neuron version is 0.6.12.3

user-error: Command "neuron -d /Users/sudeepkumar/open_source/zettelkasten/ new --id-hash test" exited with code 1: Invalid option `--id-hash'

Usage: neuron [--version] [-d PATH] COMMAND
  Neuron, future-proof Zettelkasten app <https://neuron.zettel.page/>

I'm having the following assumptions

  1. In the latest neuron, the --id-hash option went away. It's replaced by ----random-id, which is also the default.
  2. Also, --id-date option doesn't seem to be supported anymore.

I managed to get it working by removing the --id-hash argument .

I want to confirm my assumptions before I could raise a PR to fix it. If the above assumptions are correct:

  1. For the first, we can simply replace --id-hash with ----random-id and that's that.
  2. We can probably remove it. The valid id formats (neuron-id-format) are then either of hash or prompt.

What do you guys think?

srid commented 3 years ago

The version used by official installation instructions, which uses master branch, has none of these options actually.

To use random ID, you would run:

neuron new -e

To use a custom (title) ID, you would use:

neuron new some-slug -e   # Creates some-slug.md

# or, ...
neuron new "Some long title" -e  # Creates "Some long title.md"

There is only one ID format: https://neuron.zettel.page/id.html

Date IDs are removed (less magic == good), in favour of the date field in YAML frontmatter which neuron new sets automatically.

EDIT: Oh, just realized this is not the neuron repo. I'll leave my comment anyway as clarifying information.

felko commented 3 years ago

Hello, your assumptions sound correct, go for the PR. It would be nice to use non-slugged IDs from neuron-mode, maybe we could have a 'title option for neuron-id-format which would simply take the title as it is and pass it to neuron-generate-id-arguments as the ID.

sudeepdino008 commented 3 years ago

@felko I like the idea of 'title option. However, before its introduction, we have to migrate to the new links format - [[stuff]] and [[[stuff]]]. This is because links like <Zettel with Spaces> cannot be parsed into a link for html. Whereas for 'title option, zettel links (with spaces) has to be supported.

felko commented 3 years ago

Fixed in #64, thanks again