What did you expect to happen?
Flyspell to work normally in the scratch buffer after I run SPC t s.
What actually happened?
From *doom:scratch* I run SPC t s and I see improper usage error output from ispell in the message area.
If I look in the messages buffer I see the full output:
Starting new Ispell process /home/cody/.nix-profile/bin/ispell with default dictionary...
Error enabling Flyspell mode:
(? Show this help screen.
^Z Suspend program.
^L Redraw screen.
! Shell escape.
Leaves file unchanged.
Q Quit immediately. Asks for confirmation.
and start next file.
X Write the rest of this file, ignoring misspellings,
L Look up words in system dictionary.
0-n Replace with one of the suggested words.
U Accept and add lowercase version to private dictionary.
I Accept the word, and put it in your private dictionary.
A Accept the word for the rest of this session.
Space Accept the word this time only.
R Replace the misspelled word completely.
Commands are:
completely, or choosing one of the suggested words.
next to each one. You have the option of replacing the word
contains any similar words, they are listed with a number
it is printed on the first line of the screen. If the dictionary
Whenever a word is found that is not in the dictionary,
/home/cody/.nix-profile/bin/ispell -v
/home/cody/.nix-profile/bin/ispell [-dfile] [-wchars] -D
/home/cody/.nix-profile/bin/ispell [-dfile] [-wchars] -e[1-4]
/home/cody/.nix-profile/bin/ispell [-dfile] [-wchars | -Wn] -c
/home/cody/.nix-profile/bin/ispell [-dfile | -pfile | -ffile | -Wn | -t | -n | -H | -B | -C | -P | -m | -Ttype | -ktype kws | -Fpgm] [-a | -A]
/home/cody/.nix-profile/bin/ispell [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -Ttype | -ktype kws | -Fpgm] -l
Usage: /home/cody/.nix-profile/bin/ispell [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -x | -b | -S | -B | -C | -P | -m | -Lcontext | -M | -N | -Ttype | -ktype kws | -Fpgm | -V] file .....)

Additional details:
https://github.com/codygman/doom-emacs-literate-config/blob/master/config.org
Steps to reproduce:
SPC b xSPC t sSystem information:
emacs version 27.0.50
features XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER GMP
build Jan 17, 2020
buildopts (--prefix=/nix/store/gj66vn85p4brc2z33khgaw7pl5azplz8-emacs-27.0.50 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200)
windowsys x
daemonp server-running
doom version 2.0.9
build HEAD -> develop, origin/develop, origin/HEAD 453e20534 2020-01-15 11:19:32 -0500
dir ~/.config/doom/
system type gnu/linux
config x86_64-pc-linux-gnu
shell /run/current-system/sw/bin/bash
uname Linux 4.19.91 #1-NixOS SMP Sat Dec 21 09:57:45 UTC 2019 x86_64
path (/run/wrappers/bin ~/.nix-profile/bin /etc/profiles/per-user/cody/bin /nix/var/nix/profiles/default/bin /run/current-system/sw/bin /nix/store/gj66vn85p4brc2z33khgaw7pl5azplz8-emacs-27.0.50/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/)
config envfile envvar-file
elc-files 0
modules (:tools eval :editor (evil +everywhere) file-templates :tools (lookup +devdocs +docsets) :editor snippets :checkers spell (syntax +childframe) :ui workspaces :completion (company +auto +childframe) (ivy +fuzzy +childframe) :editor format lispy multiple-cursors parinfer rotate-text :ui (popup +all +defaults) (pretty-code +fira) doom doom-dashboard doom-quit ophints fill-column hl-todo nav-flash neotree vc-gutter vi-tilde-fringe window-select :emacs (dired +icons) electric :term eshell :editor fold :term term :emacs vc :tools editorconfig gist make magit pass rgb tmux upload :lang cc data emacs-lisp go (haskell +intero) markdown lua javascript (org +attach +babel +capture +export +present) php (python +conda +pyenv) rest rust (sh +fish) web :email (mu4e +gmail) :app regex :config (default +bindings +smartparens) literate)
packages (prescient (company-prescient :pin "7fd8c3b8028da4733434940c4aac1209281bef58") all-the-icons-ivy counsel-tramp peep-dired (diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0") yasnippet-snippets apache-mode pkgbuild-mode nginx-mode ob-http systemd flycheck-checkbashisms tldr doom-modeline anzu evil-anzu highlight-indent-guides)
elpa (n/a)
Same bug on macOS 10.15.2.
ispell installed via Brew. Version is stable 3.4.00.
Odd. Doom does not have any configuration for ispell. Only aspell and hunspell. This may indicate an upstream issue with the built-in ispell package.
For the time being, I'd suggest switching to aspell or hunspell instead. As I know very little about ispell, I'd welcome suggestions or a PR.
I tried to dig a bit. I know very little about Emacs so these are just observations. 馃槵
With the spell plugin enabled in .doom.d/init.el, the ispell command and the flyspell-mode command do not work and I get the error described initially.
With the spell plugin disabled in .doom.d/init.el, the ispell command the flyspell-mode command do work as expected.
So it looks like the spell package is the issue. I don't really understand what this package is? What is its purpose if ispell, but also flyspell can work without it?
Looking at doom-emacs/modules/checkers/spell/, it looks like a Doom wrapper around flyspell.
The config.el file of the plugin has following code at the very top:
(after! ispell
(add-to-list 'ispell-extra-args "--dont-tex-check-comments")
The --dont-tex-check-comments is then passed to the ispell-program-name binary (which, if I understood correctly, can be ispell, but also aspell, or hunspell). The problem is that --dont-tex-check-comments looks to be an aspell argument, not an ispell one. But at this point, the ispell binary is the default choice. Commenting the line allows everything to work as expected with the spell Doom plugin enabled.
I guess that a fix could be to move --dont-tex-check-comments to the apslell block a few lines after, where it is certain that ispell-program-name is actualy aspell:
(`aspell
(setq ispell-program-name "aspell"
ispell-extra-args '("--sug-mode=ultra" "--run-together"))
I opened a PR: https://github.com/hlissner/doom-emacs/pull/2410
I tried to dig a bit. I know very little about Emacs so these are just observations. grimacing
Wow! To not know a lot about Emacs you got very far and figured out the issue with your problem solving skills. Great job... I'm going to save this in my notes perhaps tagged as emacs and blindDebugging.
It's a great example of how you can problem solve with testing even if you don't have deep domain (emacs here) knowledge I can share with others wary of diving into emacs.
Works great for me, thanks agian @Geospace !