I had installed Pymacs, rope, ropemode, ropemacs, and when I executed pymacs-terminate-services
by accident, I couldn't save modified buffers. It first asked me - The Pymacs helper died. Restart it? (yes or no)
. If I answered "yes", it threw - Debugger entered--Lisp error: (error "There is no Pymacs helper!")
. If I answered "no", it threw:
Debugger entered--Lisp error: (error "Python: Traceback (most recent call last):
File \"/usr/local/lib/python2.7/dist-packages/Pymacs.py\", line 258, in loop
value = eval(text)
File \"<string>\", line 1, in <module>
IndexError: list index out of range
")
I managed to work around by executing pymacs-load
, loading os
module, and answering yes to Pymacs helper restart question. The buffer was saved, but then I started to get another error everytime I saved the file:
Debugger entered--Lisp error: (error "Python: Traceback (most recent call last):
File \"/usr/local/lib/python2.7/dist-packages/Pymacs.py\", line 258, in loop
value = eval(text)
File \"<string>\", line 1, in <module>
TypeError: major() takes exactly 1 argument (0 given)
")
This is my init-file:
(load "~/.emacs.d/pymacs.el")
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(autoload 'pymacs-autoload "pymacs")
(require 'pymacs)
(pymacs-load "ropemacs" "rope-")
Pymacs manual describes death of Pymacs helper. It tells that I shouldn't close *Pymacs*
buffer, because this kills the helper, and should also restart Emacs if helper is killed. This is unacceptable as I have a habit of closing all buffers from time to time and also rarely restart Emacs. I have several related questions now:
- What is the best way to handle Pymacs to minimize such problems? Is it possible to run Pymacs only when i work with Python and then safely terminate it again?
- What is
pymacs-terminate-services
for and should I ever run it? - What should I do if I ever accidentally run
pymacs-terminate-services
? I'm especially interested in how to editbefore-save-hook
to make buffer saves possible without error messages.