GNU bug report logs - #13963
24.3; eshell: "Text is read-only" and unresponsive eshell to kill-buffer, C-x C-c and C-x C-q

Previous Next

Package: emacs;

Reported by: joe M <joe9mail <at> gmail.com>

Date: Thu, 14 Mar 2013 19:38:02 UTC

Severity: important

Merged with 17563

Found in version 24.3

Fixed in version 24.4

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 13963 <at> debbugs.gnu.org
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: Sat, 23 Mar 2013 11:58:52 -0400
>> 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.

The problem is that the last char of the prompt (the space) should be
rear-nonsticky, but if the others are rear-nonsticky and are not
front-sticky, then indeed you can't erase them but you can insert
anything inside them.  So I think the better fix is to make the prompt
(including the trailing space) both rear-nonsticky and front-sticky.

Does the patch below fix the problem?


        Stefan


=== modified file 'lisp/eshell/em-prompt.el'
--- lisp/eshell/em-prompt.el	2013-01-01 09:11:05 +0000
+++ lisp/eshell/em-prompt.el	2013-03-23 15:57:29 +0000
@@ -122,6 +122,7 @@
 	   (add-text-properties 0 (length prompt)
 				'(read-only t
 				  face eshell-prompt
+				  front-sticky (face read-only)
 				  rear-nonsticky (face read-only))
 				prompt))
       (eshell-interactive-print prompt)))





This bug report was last modified 10 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.