Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pymacs-unload" #41

Open
matthewlmcclure opened this issue Oct 23, 2012 · 5 comments
Open

"pymacs-unload" #41

matthewlmcclure opened this issue Oct 23, 2012 · 5 comments

Comments

@matthewlmcclure
Copy link

The pymacs-load function defines lots of new symbols and wreaks
havoc because of its dependency on the Pymacs buffer's helper
process. Pymacs should provide a sane way to unload itself and the
symbols it defines via pymacs-load. See also
http://www.gnu.org/software/emacs/manual/html_node/elisp/Unloading.html
and
http://www.gnu.org/software/emacs/manual/html_node/elisp/Named-Features.html.

@matthewlmcclure
Copy link
Author

I made myself a branch and added a little reminder in pymacs.el.in. Hopefully, I'll get around to implementing it. I'd love to know if someone else beats me to it or if there's an existing solution I should use instead.

@pinard
Copy link
Owner

pinard commented Jan 10, 2013

Someone else asked me, today, if there was some pymacs-unload function! :-)

If I read you correctly, you even suggest a function that would unload all Pymacs loaded modules at once.

One problem that I see, but I do not know if it worth being considered or not, is about postponing the cleanup until all functions become quiescent. To implement such a modification, one would likely have to carefully consider zombies. Functions may exist in numbered slots, and unloading a function without clearing the associated slot is prone to producing later errors. This has been the source of difficulties in some previous Pymacs version, and even if zombies are more bearable nowadays that they once were, Pymacs should nevertheless take care.

In any case, keep us posted on your progress on this matter. Keep happy! François

@matthewlmcclure
Copy link
Author

@pinard,

Sorry, I haven't revisited this since I last commented. My real interest is #32, specifically so that I can use Rope with multiple Python projects in a single Emacs where the interpreters are executing on a VM ("remote" host).

@matthewlmcclure
Copy link
Author

I misspoke. I remember now, my biggest pain point has nothing to do with multiple Python interpreters. Rather, it happens when the remote Python interpreter or its Pymacs process goes away, most often because my VM suspended due to low battery on my laptop. That condition makes Emacs report a Pymacs error anytime I try to save a buffer or quit Emacs, so I have to force quit.

@matthewlmcclure
Copy link
Author

This is my current workaround to unwedge my Emacs when the Pymacs helper has died and can't restart:

(remove-hook 'before-save-hook 'rope-before-save-actions)
(remove-hook 'after-save-hook 'rope-after-save-actions)
(remove-hook 'kill-emacs-hook 'rope-exiting-actions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants