The documentation says,
"Temporary buffers can be dismissed by pressing q. This kills the buffer and restores the window configuration as it was before the buffer was displayed."
Using emacs 22.3.1 (or the latest Aquamacs or CarbonEmacs) and a CVS checkout of SLIME (current) when I (for example) open documentation with C-c C-d C-d and press 'q', it closes the whole window. I expect (based on the documentation above) that it should actually kill that buffer, show the REPL again, and put my cursor/focus back in my main window where I started, correct?
Is there anything I could have set wrong, or somewhere I should look to debug this, if so? It would save me so much time if I didn't have to kill buffer and change windows after each little lookup, etc.
It should be noted that I am using Clojure with swank-clojure, if that has any affect. I imagine that SLIME is what handles the interface though.
Thanks! Brett
On Thu, 2008-11-20 at 18:02 -0600, Brett Hoerner wrote:
It should be noted that I am using Clojure with swank-clojure, if that has any affect. I imagine that SLIME is what handles the interface though.
i'm using Emacs 23.0.60.1, SBCL 1.0.22.17 and Slime from CVS and `q' does not behave like it used to do here either
* Brett Hoerner [2008-11-21 01:02+0100] writes:
The documentation says,
"Temporary buffers can be dismissed by pressing q. This kills the buffer and restores the window configuration as it was before the buffer was displayed."
Using emacs 22.3.1 (or the latest Aquamacs or CarbonEmacs) and a CVS checkout of SLIME (current) when I (for example) open documentation with C-c C-d C-d and press 'q', it closes the whole window. I expect (based on the documentation above) that it should actually kill that buffer, show the REPL again, and put my cursor/focus back in my main window where I started, correct?
Yes. The problem is that it's pretty hard to decide what should be restored on pressing q.
Restoring the window config is easy to implement, but some people said that unconditionally restoring the window config is to much. E.g. if the user opens a new window after C-c C-d C-d but before pressing q, that new window would also disappear.
For some time we tried to detect that situation. We only restored the window config if it was unchanged (modulo cursor positions). If the window config was changed we only buried the buffer [with bury-buffer, which acts strangely incompatible in XEmacs.]
But that's also not exactly what I want. I want that q deletes the window if it was created for the temporary buffer. Restoring the window config also kills the temp window, but bury-buffer doesn't. This scheme also doesn't work well if, e.g. C-c C-d C-d is used (recursively) in the doc buffer.
[Things get even more complicated if the temp buffer is displayed in a new frame. Presumably, new frames should only be created rarely and stay there for a long time, i.e. 'q' shouldn't close them.]
Currently, q just kills windows displaying the buffer. Occasionally, that kills a window that wasn't created specifically for a temp buffer. I can live with that, because I don't use more than 2 windows anyway. Not sure what other people need.
Is there anything I could have set wrong, or somewhere I should look to debug this, if so? It would save me so much time if I didn't have to kill buffer and change windows after each little lookup, etc.
Useful would be a description of the behavior that you want. Even more useful would be a test.
The current implementation kills the window (and buries the buffer) so you don't have to do that manually. If you are in a lisp buffer, press C-c C-d C-d and press q quickly afterwards, you will end up in the original buffer, right? So maybe you need to say a bit more what you need.
Helmut.
On Sat, Nov 22, 2008 at 5:41 AM, Helmut Eller heller@common-lisp.net wrote:
Currently, q just kills windows displaying the buffer. Occasionally, that kills a window that wasn't created specifically for a temp buffer. I can live with that, because I don't use more than 2 windows anyway. Not sure what other people need.
I don't use more than 2 either, but I guess I don't understand what you mean here.
W1: clojure-mode editing foo.clj [with cursor] W2: slime-repl
I'm in W1 and I C-c C-d C-d on 'defn', now I have
W1: clojure-mode editing foo.clj W2: clojure documentation [with cursor]
Now I press 'q'
W1: clojure-mode editing foo.clj [with cursor] [W2 is destroyed, so I have to make a new window and bring up the slime-repl again --- C-x 2, C-x o, C-x b, find slime-repl, C-x o]
That's basically it. So how does your work? You seem to imply that for you C-c C-d C-d opens a 3rd window that you don't mind deleting, or something? Mine re-uses W2 and I'm using the default configuration.
Regards, Brett
"Brett Hoerner" bretthoerner@gmail.com writes:
[W2 is destroyed, so I have to make a new window and bring up the slime-repl again --- C-x 2, C-x o, C-x b, find slime-repl, C-x o]
ow.
since the first time someone realized (way, way back; probably still when lisp machines ruled the prehistoric Earth) that counting on emacs window configuration being anywhere near pereservable (or even predictable) is an exercise in futility, people adopted a convention of devising so-called "selector keys" to quickly pop to persistent interesting buffers.
C-c C-z from any SLIME-aware buffer will pop you into the SLIME REPL.
hth, --m
On Sat, Nov 22, 2008 at 1:20 PM, Michael Livshin gmane@cmm.kakpryg.net wrote:
C-c C-z from any SLIME-aware buffer will pop you into the SLIME REPL.
Thanks, that does help a lot.
Brett
On Sat, Nov 22, 2008 at 2:20 PM, Michael Livshin gmane@cmm.kakpryg.net wrote:
"Brett Hoerner" bretthoerner@gmail.com writes:
[W2 is destroyed, so I have to make a new window and bring up the slime-repl again --- C-x 2, C-x o, C-x b, find slime-repl, C-x o]
ow.
since the first time someone realized (way, way back; probably still when lisp machines ruled the prehistoric Earth) that counting on emacs window configuration being anywhere near pereservable (or even predictable) is an exercise in futility, people adopted a convention of devising so-called "selector keys" to quickly pop to persistent interesting buffers.
C-c C-z from any SLIME-aware buffer will pop you into the SLIME REPL.
hth, --m
For me, C-c b takes me to the REPL from any buffer at all, SLIME-aware or not. This is slime-current-buffer.
Liam
* Brett Hoerner [2008-11-22 19:37+0100] writes:
On Sat, Nov 22, 2008 at 5:41 AM, Helmut Eller heller@common-lisp.net wrote:
Currently, q just kills windows displaying the buffer. Occasionally, that kills a window that wasn't created specifically for a temp buffer. I can live with that, because I don't use more than 2 windows anyway. Not sure what other people need.
I don't use more than 2 either, but I guess I don't understand what you mean here.
W1: clojure-mode editing foo.clj [with cursor] W2: slime-repl
[...]
That's basically it. So how does your work? You seem to imply that for you C-c C-d C-d opens a 3rd window that you don't mind deleting, or something? Mine re-uses W2 and I'm using the default configuration.
No, it works just like you described. I just don't mind (to much) that W2 get's deleted. I have a global key binding `C-c s' for slime-selector, which I use a lot.
However, in CVS HEAD, W2 should no longer be deleted. It should be deleted only if you started with a single window.
Helmut.
On Sun, Nov 23, 2008 at 4:20 PM, Helmut Eller heller@common-lisp.net wrote:
However, in CVS HEAD, W2 should no longer be deleted. It should be deleted only if you started with a single window.
I saw the commit and am using HEAD, but if I pull up docs (I'm using Clojure, should this matter?) - which opens over my REPL and hit 'q', it still closes the window.
That said, knowing C-c C-z exists is very handy regardless.
Brett