1

In my Spacemacs, I enabled the spell-checking layer which enables ispell. I noticed that my Tramp connection is very slow, and after debugging, I found that one of the causes is ispell:

02:07:20.446250 tramp-do-file-attributes-with-stat (5) # file attributes with stat: /path/to/.ispell_words
....
....
....
....
02:07:23.961344 tramp-send-command (6) # test -r /path/to/.ispell_default 2>/dev/null; echo tramp_exit_status $?

So about 3 seconds are wasted on ispell. I tried disabling the spell-checking layer and found that Tramp is indeed faster.

However, I don't want to totally disable spell-checking, as I in fact use it frequently when editing locally. Is it possible to disable ispell only when I use Tramp? Thanks!

  • The problem with your proposed solution is that there may be several buffers where flyspell is active (running aspell or other equivalent), so you are potentially dealing with several buffers at issue. I encountered problems when running flyspell (i.e., an aspell running process) and other programs, although not necessarily tramp. I ended up modifying the flyspell / ispell lisp libraries to turn on/off after the words have been checked in the current command loop. The disadvantage with my solution is that re-reading custom words, depending on the length of the list, could slow.. – lawlist Sep 12 '19 at 20:12
  • 1
    I'm looking for a similar option: Disable Trump when using Ispell. Also when not using Ispell. ;-) Sorry; couldn't resist. – Drew Sep 12 '19 at 22:21
  • @Drew and user25410: Here is a link to the bug report that I opened (and was subsequently closed) about a year ago requesting that users be given the choice to prevent aspell (or hunspell) from running all the time; e.g., to run only when checking a word during the current command loop and then disengage: debbugs.gnu.org/cgi/bugreport.cgi?bug=32610 Eli Z. opined that this was not desirable by most users and he stated a few reasons. I did not, however, advise Eli Z. of problems that I experienced when other programs were active as a running process. [I hacked my own on/off ...] – lawlist Sep 13 '19 at 3:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.