nvim-orgmode/orgmode

uuidgen does not exist on Windows

Closed this issue · 2 comments

Describe the bug

I thought uuidgen - used for generating ids - existed on all platforms, but it turns out that Windows doesn't always have it available. I think the Github action environment does, but testing in a Windows vm, I get errors about it not existing.

Steps to reproduce

  1. Spin up a full Windows system (in my case windows 11)
  2. Call lua print(require("orgmode.org.id").new())
  3. Notice the error message about uuidgen not existing

Expected behavior

A UUID can get generated on Windows.

Emacs functionality

No response

Minimal init.lua

-- Stock loading of orgmode plugin

Screenshots and recordings

No response

OS / Distro

Windows 11

Neovim version/commit

0.9.5

Additional context

I wrote a workaround using a pure-Lua uuid generator I made for org-roam. This could potentially be used by orgmode as a fallback if uuidgen is not found.

chipsenkbeil/org-roam.nvim@d261247

Program that is used for generating uuid is configurable in Emacs (https://github.com/tkf/org-mode/blob/master/lisp/org-id.el#L127) and also here https://github.com/nvim-orgmode/orgmode/blob/master/DOCS.md#org_id_uuid_program. Also, id can have different format (method), that can be changed (emacs: https://github.com/tkf/org-mode/blob/master/lisp/org-id.el#L132, nvim: https://github.com/nvim-orgmode/orgmode/blob/master/DOCS.md#org_id_method).

I didn't find any information how Windows Emacs users handle that, but since it's configurable in the same way I think it's good enough.

Fair enough :) I'll close this out