unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: 13963@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	[thread overview]
Message-ID: <jwvhak2rtzv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ehfe6q2p.fsf@gmail.com> (Thierry Volpiatto's message of "Sun,  17 Mar 2013 15:47:26 +0100")

>> 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)))






  reply	other threads:[~2013-03-23 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 19:34 bug#13963: 24.3; eshell: "Text is read-only" and unresponsive eshell to kill-buffer, C-x C-c and C-x C-q joe M
2013-03-15  7:34 ` Thierry Volpiatto
2013-03-17 12:18   ` Thierry Volpiatto
2013-03-23 10:05     ` Thierry Volpiatto
2013-03-23 10:23       ` Thierry Volpiatto
2013-03-17 14:47   ` Thierry Volpiatto
2013-03-23 15:58     ` Stefan Monnier [this message]
2013-03-23 16:27       ` Thierry Volpiatto
2013-03-26  0:42         ` Stefan Monnier
2013-03-30  2:13           ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhak2rtzv.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13963@debbugs.gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).