-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
For what it may be worth when working very long sessions playing in utop... and accumulating huge read-only *utop* buffer in emacs; I managed to make the following work without destroying the session/buffer state (maybe there's more to consider, since I couldn't find such a thing I hacked this up) - so far it seems to work for me YMMV of course. Have I missed a trick or potentially broken anything? I did think to guard this with 'edit state...
(use-package utop
:ensure t
:preface
(defun utop-erase-buffer ()
"Erase the utop buffer contents..."
(interactive)
(with-current-buffer (utop-buffer)
(utop-perform
(erase-buffer)
(utop-insert-prompt (utop-default-prompt)))))
:hook
((utop-mode . company-mode))
:bind
(:map utop-mode-map
("C-c C-d" . utop-erase-buffer)
("C-<down>" . utop-history-goto-next)
("C-<up>" . utop-history-goto-prev)
("S-<return>" . utop-eval-input-auto-end)))Metadata
Metadata
Assignees
Labels
No labels