idris-hackers / idris-mode

Idris syntax highlighting, compiler-supported editing, interactive REPL and more things for Emacs.
GNU General Public License v3.0
267 stars 70 forks source link

`idris-quit` throws error when `*idris-proof-script*` buffer is present and `hs-minor-mode` activated #570

Closed keram closed 1 year ago

keram commented 1 year ago

hs-minor-mode Hideshow mode is a buffer-local minor mode that allows you to selectively display portions of a program, which are referred to as blocks.

It is not unusual to have it enabled globally in Emacs with: (add-hook 'prog-mode-hook 'hs-minor-mode)

But that leads to an error when trying to quit Idris as *idris-proof-script* mode also inherits from prog-mode. M-x idris-quit

Debugger entered--Lisp error: (error "Idris-Proof-Script Mode doesn’t support Hideshow M...")
  error("%s Mode doesn't support Hideshow Minor Mode" "Idris-Proof-Script")

It should be possible to disable the hs-minor-mode with: (add-hook 'idris-prover-script-mode-hook (lambda () (hs-minor-mode -1))) but it does not seem to be working for the idris-prover-script-mode

Options to consider:

keram commented 1 year ago

Closing in favour of added note to Readme file how to disable the hs-minor-mode https://github.com/idris-hackers/idris-mode#hideshow-minor-mode-hs-minor-mode In future we can revisit other options which do not require user intervention.