Discussion:
Paredit-mode in the slime repl
Alexandre Rademaker
2018-07-28 00:40:12 UTC
Permalink
After the last Emacs upgrade to 26.1, the M-s key bind from paredit-mode is replaced by `Next element matching (regexp)` command in the slime repl buffer. Sorry for the silly question, but how to get M-s mapped to paredit-splice-sexp again? In a lisp file buffer it is working as expected.

Best,

--
Alexandre Rademaker
http://arademaker.github.io
Pascal Bourguignon
2018-07-28 01:10:23 UTC
Permalink
Post by Alexandre Rademaker
After the last Emacs upgrade to 26.1, the M-s key bind from paredit-mode is replaced by `Next element matching (regexp)` command in the slime repl buffer. Sorry for the silly question, but how to get M-s mapped to paredit-splice-sexp again? In a lisp file buffer it is working as expected.
(push (lambda () (local-set-key (kbd “M-s”) ‘paredit-splice-sexp)) slime-repl-mode-hook)

or more emacsy: (add-hook ‘slime-repl-mode-hook (lambda () (local-set-key (kbd “M-s”) ‘paredit-splice-sexp)))

Also to consider: there’s probably a keymap for the silme-repl-mode, you could modify it directly.
--
__Pascal J. Bourguignon__
Alexandre Rademaker
2018-08-04 01:13:30 UTC
Permalink
Thank you Pascal. What I didn't understand is why the keybinds are so
different in the slime-repl-mode and in the lisp-mode while editing a .lisp
file.

Best,

Alexandre Rademaker
http://arademaker.github.com/
http://researcher.ibm.com/person/br-alexrad
Post by Alexandre Rademaker
After the last Emacs upgrade to 26.1, the M-s key bind from paredit-mode
is replaced by `Next element matching (regexp)` command in the slime repl
buffer. Sorry for the silly question, but how to get M-s mapped to
paredit-splice-sexp again? In a lisp file buffer it is working as expected.
(push (lambda () (local-set-key (kbd “M-s”)
‘paredit-splice-sexp)) slime-repl-mode-hook)
or more emacsy: (add-hook ‘slime-repl-mode-hook (lambda () (local-set-key
(kbd “M-s”) ‘paredit-splice-sexp)))
Also to consider: there’s probably a keymap for the silme-repl-mode, you
could modify it directly.
--
__Pascal J. Bourguignon__
Pascal Bourguignon
2018-08-05 11:54:52 UTC
Permalink
Thank you Pascal. What I didn't understand is why the keybinds are so different in the slime-repl-mode and in the lisp-mode while editing a .lisp file.
Output in the slime repl buffer is rarely lisp forms.
And even input in the slime repl buffer is lisp forms only when you’re entering into the REPL itself. But if you’re running a lisp program, using read-line or read-char, you can edit and input anything there.

So there’s little reason why the key bindings in the slime repl buffer should be as restrictive as in a lisp buffer.
--
__Pascal J. Bourguignon__
Rommel MARTINEZ
2018-08-07 03:41:00 UTC
Permalink
That is one of the reasons why I use smartparens [1], instead.

[1]: https://github.com/Fuco1/smartparens
Post by Alexandre Rademaker
After the last Emacs upgrade to 26.1, the M-s key bind from paredit-mode
is replaced by `Next element matching (regexp)` command in the slime repl
buffer. Sorry for the silly question, but how to get M-s mapped to
paredit-splice-sexp again? In a lisp file buffer it is working as expected.
Best,
--
Alexandre Rademaker
http://arademaker.github.io
--
Rommel MARTINEZ
https://ebzzry.io
Rommel MARTINEZ
2018-08-07 03:33:25 UTC
Permalink
That is one of the reasons why I use smartparens [1], instead.

[1]: https://github.com/Fuco1/smartparens
Post by Alexandre Rademaker
After the last Emacs upgrade to 26.1, the M-s key bind from paredit-mode
is replaced by `Next element matching (regexp)` command in the slime repl
buffer. Sorry for the silly question, but how to get M-s mapped to
paredit-splice-sexp again? In a lisp file buffer it is working as expected.
Best,
--
Alexandre Rademaker
http://arademaker.github.io
--
Rommel MARTINEZ
https://ebzzry.io
Loading...