Is there an ESS version of the Clear Console command that can be found in the RGui(Ctrl-L)?
I want to have a blank * R * buffer.
Is there an ESS version of the Clear Console command that can be found in the RGui(Ctrl-L)?
I want to have a blank * R * buffer.
From the EmacsWiki, this Elisp function works well for me:
(defun clear-shell ()
(interactive)
(let ((old-max comint-buffer-maximum-size))
(setq comint-buffer-maximum-size 0)
(comint-truncate-buffer)
(setq comint-buffer-maximum-size old-max)))
Put this in your ~/.emacs.d/init.el
and execute with M-x clear-shell
, or bind it to a key in your init.el
with something like:
(global-set-key (kbd "\C-x c") 'clear-shell)
clear-shell' or
C-x c` when I am not in the window with the active shell I get an error; processp, nil
. I am new to emacs so please bear with me if I have overlooked something basic. –
Aliber Execute M-x comint-clear-buffer
which is bound to C-c M-o
From the EmacsWiki, this Elisp function works well for me:
(defun clear-shell ()
(interactive)
(let ((old-max comint-buffer-maximum-size))
(setq comint-buffer-maximum-size 0)
(comint-truncate-buffer)
(setq comint-buffer-maximum-size old-max)))
Put this in your ~/.emacs.d/init.el
and execute with M-x clear-shell
, or bind it to a key in your init.el
with something like:
(global-set-key (kbd "\C-x c") 'clear-shell)
clear-shell' or
C-x c` when I am not in the window with the active shell I get an error; processp, nil
. I am new to emacs so please bear with me if I have overlooked something basic. –
Aliber The easy way would be to mark the whole buffer (C-x h
), delete it, and then hit RET
to have the prompt come back.
© 2022 - 2024 — McMap. All rights reserved.
C-l
keybinding is not available only in RGui, but in R interactive session on *NIX systems also. It's kind-of universal for all *NIX shells. =) – Abstain