Continuing my attempts to spam slime-devel:
I find the slime-repl comma shortcuts to be quite useful. However, it would be nice if when a comma shortcut was run, if a re-runable version of the command with its arguments could be put in the repl buffer and on the repl command history. That would seem make interacting with the repl a little bit nicer, as it would remove some of the discontinuity between lisp forms (you can see them in the repl buffer, and they can be called up with M-p) and repl commands (you can sometimes see their results in the repl buffer, and they cannot be called up with M-p.)
I looked into doing this, but it wasn't immediately obvious to me how I'd accomplish it.
(I was going to put the emacs form executed for the shortcut into the buffer prepended by a comma, much like you see the raw emacs forms when you use repeat-complex-command.)
-bcd
Brian Downing bdowning@lavos.net writes:
Continuing my attempts to spam slime-devel:
I find the slime-repl comma shortcuts to be quite useful. However, it would be nice if when a comma shortcut was run, if a re-runable version of the command with its arguments could be put in the repl buffer and on the repl command history. That would seem make interacting with the repl a little bit nicer, as it would remove some of the discontinuity between lisp forms (you can see them in the repl buffer, and they can be called up with M-p) and repl commands (you can sometimes see their results in the repl buffer, and they cannot be called up with M-p.)
we could do this with the (force-)?(load|compile)-system commands, just like we do with the defpapameter and resend commands, but i don't know what we'de put in the buffer in the case of change-directory, and i don't know what the point of putting (in-package :???) would be in the repl.
I looked into doing this, but it wasn't immediately obvious to me how I'd accomplish it.
see the definition of slime-repl-resend and slime-repl-defparameter, however if you tell me what commands you want i can do it pretty quickly.
On Wed, Jun 16, 2004 at 10:22:52AM +0200, Marco Baringer wrote:
we could do this with the (force-)?(load|compile)-system commands, just like we do with the defpapameter and resend commands, but i don't know what we'de put in the buffer in the case of change-directory,
I was thinking something like ,(slime-repl-change-directory "/where/to"), and it would catch the leading , on reevaluation and run the repl command again.
and i don't know what the point of putting (in-package :???) would be in the repl.
Well, if I'm changing between two packages repeatedly, it might be easier to get at them with the command-line history commands instead of retyping them over and over.
If I'm not mistaken, in something like the CLIM listener it's possible to pull up previous commands with the normal history functions. It also seems to work that way in the ACL repl with its commands. To me, the current behavior seems about as distracting as if the Unix shell special-cased "cd" commands and you couldn't get to them in the shell's history. (Or, for that matter, special-cased "pwd" commands to show the current directory once at the bottom of the screen and not in the normal output stream. :)
see the definition of slime-repl-resend and slime-repl-defparameter, however if you tell me what commands you want i can do it pretty quickly.
That gives me an idea as to where to start. I'll look into it, thanks.
-bcd
Brian Downing bdowning@lavos.net writes:
If I'm not mistaken, in something like the CLIM listener it's possible to pull up previous commands with the normal history functions.
In SLIME you can press , and then select previous commands from the minibuffer history. Not enough?
-Luke
On Wed, Jun 16, 2004 at 05:54:40PM +0200, Luke Gorrie wrote:
In SLIME you can press , and then select previous commands from the minibuffer history. Not enough?
You don't get the arguments with it, which is suboptimal.
I guess the comma shortcuts feel too much to me like just interacting with emacs normally. If I wanted to do that, I'd hit M-x. I'd like something a little bit more command-line-like to go with the repl.
(I know, complain, complain. :)
-bcd
Brian Downing bdowning@lavos.net writes:
On Wed, Jun 16, 2004 at 05:54:40PM +0200, Luke Gorrie wrote:
In SLIME you can press , and then select previous commands from the minibuffer history. Not enough?
You don't get the arguments with it, which is suboptimal.
One option is to use `repeat-complex-command', which I just learned recently. It's on `C-x M-:'.
-Luke
On Wed, 16 Jun 2004 18:12:26 +0200, Luke Gorrie wrote:
Brian Downing bdowning@lavos.net writes:
On Wed, Jun 16, 2004 at 05:54:40PM +0200, Luke Gorrie wrote:
In SLIME you can press , and then select previous commands from the minibuffer history. Not enough?
You don't get the arguments with it, which is suboptimal.
One option is to use `repeat-complex-command', which I just learned recently. It's on `C-x M-:'.
I love repeat-complex-command. I use it all the time. You can use M-n and M-p to go back and forth in the command history, just like in other modes. However, the keystrokes are all pretty clumsy. In my .emacs, I have the following:
(global-set-key [f7] 'repeat-complex-command) (define-key minibuffer-local-map [f7] 'previous-history-element) (define-key minibuffer-local-map [f8] 'next-history-element) (define-key minibuffer-local-completion-map [f7] 'previous-history-element) (define-key minibuffer-local-completion-map [f8] 'next-history-element) (define-key minibuffer-local-must-match-map [f7] 'previous-history-element) (define-key minibuffer-local-must-match-map [f8] 'next-history-element)
There's a couple of other minibuffer local maps as well, but these 3 are the most useful.
That way, I can press f7, then *keep* pressing f7 to go back in the history and f8 is conveniently next to it if I want to go forward.
-Luke