From b0b673a19f05664db77b3512dc57a03c4be7c6a9 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 19 Jul 2021 12:26:44 +0800 Subject: fix: fix bugs * eshell-conf.el (eshell-current-command-stop): I forgot to remove a message statement that was for the debugging purpose only. (durand-eshell-emit-prompt): Add necessary text properties for eshell to function normally. (eshell-clear): Add inhibit-read-only so that we can clear even if the prompt is not after the last prompt. --- eshell-conf.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eshell-conf.el b/eshell-conf.el index 425d5cc..3d7052c 100644 --- a/eshell-conf.el +++ b/eshell-conf.el @@ -63,8 +63,7 @@ (mapconcat #'identity (delq nil (list format-seconds-string micro-str)) - " ")) - (message eshell-prompt-time-string)) + " "))) (setq eshell-current-command-start-time nil)))) ;;;###autoload @@ -110,7 +109,10 @@ Add a time information at the beginning. -- Modified by Durand." (list (cond ((> (length eshell-prompt-time-string) 0) (propertize eshell-prompt-time-string - 'font-lock-face 'modus-themes-heading-1)) ) + 'font-lock-face 'modus-themes-heading-1 + 'read-only t + 'front-sticky '(font-lock-face read-only) + 'rear-nonsticky '(font-lock-face read-only))) ) prompt)) " ")) (setq eshell-prompt-time-string ""))) @@ -132,7 +134,8 @@ Add a time information at the beginning. -- Modified by Durand." ;;;###autoload (defun eshell-clear () (interactive) - (delete-region eshell-last-output-end (point)) + (let ((inhibit-read-only t)) + (delete-region eshell-last-output-end (point))) (eshell/clear t) (eshell-emit-prompt)) -- cgit v1.2.3-18-g5258