bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13963: 24.3; eshell: "Text is read-only" and unresponsive eshell to


From: Thierry Volpiatto
Subject: bug#13963: 24.3; eshell: "Text is read-only" and unresponsive eshell to kill-buffer, C-x C-c and C-x C-q
Date: Sun, 17 Mar 2013 15:47:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> joe M <joe9mail@gmail.com> writes:
>
>> Reproducing the bug:
>>
>> 1. Type something right after the '$' in the prompt without a space. For
>> example, '$pwd' instead of '$ pwd'. That causes the "Text is read-only"
>> message.
>> 2. Cannot close out of eshell or emacs when that message appears
>> 3. The only way to close out of eshell/emacs is:
>> <taylanub> joe9: M-: (let ((inhibit-read-only t)) (kill-this-buffer)) in the
>>            eshell buffer.
>> <taylanub> To recover after the bug triggers, that is, not to solve the bug 
>> ..
>> <jlf> joe9: you can also C-x C-e after forms such as taylanub's if you get
>>       into a situation where M-: doesn't function  [14:59]
>>
>>
>
> The problem I think is that the eshell prompt is read-only but this
> doesn't forbid user to write in this zone and because the prompt have
> also rear-nonsticky property, the new character entered are made
> read-only and eshell when it try to delete this characters return "text
> read only".
> Didn't look deeper where this happen though.

I resend, it seems the sended patch never arrive here ?

diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index c1c4d47..bb6f563 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -119,11 +119,12 @@ arriving, or after."
       (set-marker eshell-last-output-end (point))
     (let ((prompt (funcall eshell-prompt-function)))
       (and eshell-highlight-prompt
-          (add-text-properties 0 (length prompt)
-                               '(read-only t
-                                 face eshell-prompt
-                                 rear-nonsticky (face read-only))
-                               prompt))
+           (add-text-properties 0
+                                ;; Assume `eshell-prompt-function'
+                                ;; add a space at end of prompt.
+                                (1- (length prompt))
+                                '(read-only t face eshell-prompt)
+                                prompt))
       (eshell-interactive-print prompt)))
   (run-hooks 'eshell-after-prompt-hook))

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]