mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
docs: warn Windows users about symlinks
This isn't important *yet*, but it will be post-v3.0, so might as well start warning people early.
This commit is contained in:
@ -169,21 +169,52 @@ in."
|
||||
(explain! "The second directory will be ignored, as it has lower precedence."))))
|
||||
|
||||
(print! (start "Checking for common environmental issues..."))
|
||||
(when (string-match-p "/fish$" shell-file-name)
|
||||
(print! (warn "Detected Fish as your $SHELL"))
|
||||
(explain! "Fish (and possibly other non-POSIX shells) is known to inject garbage "
|
||||
"output into some of the child processes that Emacs spawns. Many Emacs "
|
||||
"packages/utilities will choke on this output, causing unpredictable issues. "
|
||||
"To get around this, either:\n\n"
|
||||
" - Add the following to $DOOMDIR/config.el:\n\n"
|
||||
" (setq shell-file-name (executable-find \"bash\"))\n\n"
|
||||
" - Or change your default shell to a POSIX shell (like bash or zsh) "
|
||||
" and explicitly configure your terminal apps to use the shell you "
|
||||
" want.\n\n"
|
||||
"If you opt for option 1 and use one of Emacs' terminal emulators, you "
|
||||
"will also need to configure them to use Fish, e.g.\n\n"
|
||||
" (setq-default vterm-shell (executable-find \"fish\"))\n\n"
|
||||
" (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))
|
||||
(print-group!
|
||||
(when (string-match-p "/fish$" shell-file-name)
|
||||
(print! (warn "Detected Fish as your $SHELL"))
|
||||
(explain! "Fish (and possibly other non-POSIX shells) is known to inject garbage "
|
||||
"output into some of the child processes that Emacs spawns. Many Emacs "
|
||||
"packages/utilities will choke on this output, causing unpredictable issues. "
|
||||
"To get around this, either:\n\n"
|
||||
" - Add the following to $DOOMDIR/config.el:\n\n"
|
||||
" (setq shell-file-name (executable-find \"bash\"))\n\n"
|
||||
" - Or change your default shell to a POSIX shell (like bash or zsh) "
|
||||
" and explicitly configure your terminal apps to use the shell you "
|
||||
" want.\n\n"
|
||||
"If you opt for option 1 and use one of Emacs' terminal emulators, you "
|
||||
"will also need to configure them to use Fish, e.g.\n\n"
|
||||
" (setq-default vterm-shell (executable-find \"fish\"))\n\n"
|
||||
" (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))
|
||||
|
||||
(condition-case e
|
||||
(when (featurep :system 'windows)
|
||||
(let ((filea (expand-file-name "__testfile1" temporary-file-directory))
|
||||
(fileb (expand-file-name "__testfile2" temporary-file-directory)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(with-temp-file fileb)
|
||||
(make-symbolic-link fileb filea)
|
||||
(not (file-symlink-p filea)))
|
||||
(delete-file filea)
|
||||
(delete-file fileb))))
|
||||
('file-error
|
||||
(when (equal (cons (nth 1 e) (nth 2 e))
|
||||
(cons "Making symbolic link" "Operation not permitted"))
|
||||
(print! (warn "Symlinks are not enabled on this operating system"))
|
||||
(explain! "In the near future, Doom will make extensive use of symlinks to save space "
|
||||
"and simplify package and profile management. Without symlinks, much of it "
|
||||
"won't be functional. To get around this, you have three options:"
|
||||
"\n\n"
|
||||
" - Enabling 'Developer Mode' in the Windows settings (search for 'Developer "
|
||||
" Settings' in the start menu). This will warn you about its effect on system "
|
||||
" security, but this can be ignored. If it bothers you, consider another option "
|
||||
" below.\n"
|
||||
" - Running your shell (cmd or powershell) in administrator mode anytime you "
|
||||
" need to use the 'doom' script. Also, the `doom/reload' command won't work "
|
||||
" unless Emacs itself is launched in administrator mode.\n"
|
||||
" - Install Emacs in WSL 1/2; the native Linux environment it creates supports "
|
||||
" symlinks out of the box and is the best option (as Emacs is generally more "
|
||||
" stable, predictable, and faster there).\n\n")))))
|
||||
|
||||
(print! (start "Checking for stale elc files..."))
|
||||
(elc-check-dir doom-core-dir)
|
||||
|
Reference in New Issue
Block a user