hylang / hy-mode

Hy mode for Emacs
GNU General Public License v3.0
189 stars 48 forks source link

Add longer startup timeout #103

Open jams2 opened 3 years ago

jams2 commented 3 years ago

I believe this fixes #85. I was getting the error

hy-shell--redirect-check-prompt-regexp: No prompt found or ‘comint-prompt-regexp’ not set properly

when running the tests, and when starting the first hy buffer of an emacs session (hy process starting up for jedhy). It may have been occurring at other times, but I did not note the exact circumstances. The was caused by accept-process-output timing out before the hy REPL writes its banner text ("hy 0.20.0 ..."). I've added a variable (hy-shell--startup-timeout) with a default of 3 seconds, and this seems to fix it for me.

swapneils commented 3 years ago

Since this isn't in the Master copy yet: can the fix be added to a MELPA download without causing undue difficulties, i.e. with updating hy-mode in the future?

I've only recently started studying LISP, and being a perfectionist downloaded Emacs (and with it hy-mode and paradox-mode, among other packages) for that purpose, so I'm not fully aware of how Emacs interacts with packages.

jams2 commented 3 years ago

@swapneils emacs package management is pretty painless IME. You could, for example, check out this branch (or the main branch on my fork) into ~/.emacs.d, then run M-x package-install-file, ~/.emacs.d/hy-mode/. If at some point this repository is updated, the package metadata should be updated to increment its version number, so updating from M-x package-list-packages should smoothly upgrade to the newer version (and you could manually remove ~/.emacs.d/hy-mode/).

brandonwillard commented 2 years ago

This needs to be rebased.