Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

(emacs) "Selecting deleted buffer" after *hie* buffer killed #121

Closed
mgsloan opened this issue Dec 3, 2015 · 2 comments
Closed

(emacs) "Selecting deleted buffer" after *hie* buffer killed #121

mgsloan opened this issue Dec 3, 2015 · 2 comments

Comments

@mgsloan
Copy link
Collaborator

mgsloan commented Dec 3, 2015

If you use M-x kill-buffer on the *hie* buffer, subsequent commands error out with "Selecting deleted buffer". This is due to a use of with-current-buffer (hie-buffer). Maybe defining a utility like with-hie-buffer would be good, which also ensures that the buffer is initialized.

@ankhers
Copy link
Contributor

ankhers commented Dec 6, 2015

I seem unable to reproduce this. I am doing the following

  1. Open a Haskell file
  2. Ensure hie-mode is running and the *hie* buffer is available
  3. Switch to *hie* buffer
  4. Call M-x kill-buffer
  5. Within my Haskell file, try calling M-x hie-base-plugins

I receive the following message

Process Haskell IDE Engine not running

If this is still an issue, would you be able to provide me with the exact steps you use to get this message?

Should the hie process be started if you call a function when it is not started?

@cocreature
Copy link
Collaborator

@ankhers The buffers got refactored since @mgsloan opened that issue, but the general problem still exists.
Here’s an example:

  1. Open a haskell file.
  2. M-x hie-mode
  3. M-x hie-eg2-sayHello
  4. Kill the *hie-log* buffer
  5. M-x hie-eg2-sayHello
    In this case the error is in hie-log but from a quick look almost all cases where we use with-current-buffer suffer from that problem although it might be hard to reproduce it in some cases. We already have a with-hie-refactor-buffer macro so just adding macros for the other buffers and using them should be enough.

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

No branches or pull requests

3 participants