Hi Org-Mode maintainers,

I’ve run into what appears to be a bug in org-link-open-from-string while
trying to extend Org Mode for my own uses; when a file URI contains spaces,
only the portion before the first space gets honored.

Steps to reproduce
--------------------
In Emacs + Org-Mode, evaluate one or any of the following:

   (org-link-open-from-string "file:/mnt/c/Program Files/Go/bin/go.exe")
   (org-link-open-from-string "file:/mnt/c/Program\ Files/Go/bin/go.exe")
   (org-link-open-from-string "file:/mnt/c/Program\\ Files/Go/bin/go.exe")

Actual behavior
--------------------
Only “/mnt/c/Program” is opened; the “ Files/Go/bin/go.exe” suffix is
dropped.
With a single backslash before the space in the string, it would ignore the
whitespace and open "/mnt/c/ProgramFiles/Go/bin/go.exe", which is different
from "/mnt/c/Program Files/Go/bin/go.exe"

Expected behavior
--------------------
The entire path, “/mnt/c/Program Files/Go/bin/go.exe”, should be resolved
and opened.

Environment
--------------------
- GNU Emacs: GNU Emacs 30.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.50, cairo version 1.18.4)
- Org-Mode: Org mode version 9.7.34 (9.7.34-??-8b15a0d0b @
/home/eyu/.config/emacs/.local/straight/build-30.2/org/)
- OS: WSL2 (Arch on Windows 11)
- Configuration: I’m using a minimal init with only Org-Mode loaded:

  (require ’org)

Let me know if I can assist further or if there’s a workaround. Thanks for
all your hard work on Org!

Best regards,
Eyoel Tesfu

Reply via email to