Gents,
I used several IDEs for Python. I like Spyder, but I have have been a pretty obsessive Emacs user for a LONG time. I install ELPY. It works very well for my needs. However, I cannot get code folding to work. Whenever I click on anything and then choose EPLY->Code folding->Hide/show at point (through the menu system), I get the following error:
Debugger entered--Lisp error: (void-variable hs-minor-mode) elpy-folding-toggle-at-point() funcall-interactively(elpy-folding-toggle-at-point) call-interactively(elpy-folding-toggle-at-point nil nil) command-execute(elpy-folding-toggle-at-point)
Does anybody know how to get this working? It does not matter much where I click on a function or pretty much anything.
Debugger entered--Lisp error: (invalid-function hs-life-goes-on) hs-life-goes-on(nil) elpy-folding-toggle-at-point() funcall-interactively(elpy-folding-toggle-at-point) call-interactively(elpy-folding-toggle-at-point nil nil) command-execute(elpy-folding-toggle-at-point)
Any ideas? – Pablo A Perez-Fernandez Dec 7 '19 at 9:41(void-variable hs-minor-mode)
means the the variable hs-minor-mode isnil
, and becomes true if you enable the mode withM-x hs-minor-mode
. After this is enabled, you may type the commandELPY -> Code-folding ->...
. Try if this works for you, you may add a hook to elpy config to enable this mode automatically. Also see the same question here: stackoverflow.com/questions/5244485/…. – Ian Dec 7 '19 at 14:20M-x hs-minor-mode
and did confirm that the varhs-minor-mode
evaluates tot
usingM-: hs-minor-mode
. I addedhs-minor-mode
as a hook forelpy-mode
. As I mentioned, I can fold/unfold code usinghs-minor-mode
, but the ELPY menus throw an error. – Pablo A Perez-Fernandez Dec 8 '19 at 16:38hs-minor-mode
, the ELPY menus do fold/unfold code. However, they fold and unfold code as well as throwing the error I mentioned. What does not make sense is that the symbolhs-life-goes-on
is defined (contrary to the error at the top of the stack trace) as if defined as a macro. – Pablo A Perez-Fernandez Dec 8 '19 at 16:47