doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.25k stars 3.03k forks source link

`doom/reload` does not work if the `.emacs.d/bin/doom` resides in a path that contains white spaces #4249

Closed ylorn closed 3 years ago

ylorn commented 3 years ago

What did you expect to happen? SPC h r r a.k.a doom/reload reload the latest config

What actually happened? The command failed because it can not find the executable doom, which is due to the white space in the path not being correctly escaped.

Additional details:

-*- mode: compilation; default-directory: "~/" -*-
Comint started at Tue Nov 10 23:59:45

/Users/ylorn/white space/.emacs.d/bin/doom sync -e
zsh:1: no such file or directory: /Users/ylorn/white

Comint exited abnormally with code 127 at Tue Nov 10 23:59:45

**Steps to reproduce:**
1. move `.emacs.d` directory to a folder with the name of `white space`.
2. `ln -s ~/white\ space/.emacs.d ~/.emacs.d`
3. Launch emacs
4. `SPC h r r` or `M-x doom/reload`
5. command failed

**System information:**
SYSTEM  type       darwin
    config     x86_64-apple-darwin19.6.0
    shell      /usr/local/bin/zsh
    uname      Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
    path       (~/.gem/bin ~/Library/Python/3.7/bin ~/.emacs.d/bin /usr/local/opt/curl/bin /usr/local/opt/openssl/bin /usr/local/opt/sqlite/bin /usr/local/bin /usr/local/sbin /usr/bin /bin /usr/sbin /sbin /usr/local/opt/fzf/bin /usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.0/libexec/emacs/27.1/x86_64-apple-darwin19.6.0)
EMACS   dir        ~/white space/.emacs.d/
    version    27.1
    build      Nov 09, 2020
    buildopts  --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.0/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.0 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-27.1-mac-8.0 --with-gnutls --with-modules --with-rsvg
    features   RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER GMP
    traits     (batch server-running)
DOOM    dir        ~/.doom.d/
    version    2.0.9
    build      HEAD -> develop e0ef57bcc 2020-11-10 14:55:32 -0500
    elc-files  0
    modules    (:completion company (ivy +prescient +icons) :ui doom doom-dashboard doom-quit hl-todo indent-guides minimap (modeline +light) ophints (popup +defaults) tabs treemacs unicode vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors snippets :emacs (dired +icons) electric (ibuffer +icons) undo vc :term eshell vterm :checkers syntax spell grammar :tools debugger docker (eval +overlay) lookup lsp magit make pdf tmux upload :os macos (tty +osc) :lang (cc +lsp) emacs-lisp (json +lsp) javascript lua markdown org python (ruby +rails) sh (swift +lsp) yaml :email (mu4e +gmail) :app irc (rss +org) twitter :config (default +bindings +smartparens))
    packages   ((dmenu) (elfeed) (emms) (emojify) (evil-tutor) (mastodon) (md4rd) (org-bullets) (peep-dired) (rainbow-mode) (sublimity) (tldr) (wc-mode) (writeroom-mode) (leetcode) (mac-pseudo-daemon) (solaire-mode :disable t) (zoom))
    unpin      (n/a)
    elpa       (n/a)
hlissner commented 3 years ago

As of fee4de8 this issue should be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

ylorn commented 3 years ago

Thank you for responding so quickly.

I pulled the lastest commit which contains your fix but I thought the problem is still there:

Screen Shot 2020-11-11 at 1 00 32 AM
hlissner commented 3 years ago

Whoops. I fixed doom/upgrade and doom/reload-env, but not doom/reload. 3ecf95f should fix doom/reload.

ylorn commented 3 years ago

Thanks again! Now it works as expected.