From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs 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 13:18:25 +0100 Organization: Emacs Helm Message-ID: <87d2uymd7y.fsf@gmail.com> References: <87a9q5qfou.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363538957 5426 80.91.229.3 (17 Mar 2013 16:49:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Mar 2013 16:49:17 +0000 (UTC) To: 13963@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 17 17:49:42 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHGmE-0003wm-Ew for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Mar 2013 17:49:42 +0100 Original-Received: from localhost ([::1]:44576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHGlr-0005jX-J8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Mar 2013 12:49:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHGkl-0003rU-3i for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:49:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHGbT-0000E4-53 for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:42:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHGbT-0000Du-1l for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:38:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UHGct-0005aA-1z for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:40:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Mar 2013 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136353837421396 (code B ref -1); Sun, 17 Mar 2013 16:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Mar 2013 16:39:34 +0000 Original-Received: from localhost ([127.0.0.1]:60191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHGcP-0005Z0-4g for submit@debbugs.gnu.org; Sun, 17 Mar 2013 12:39:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53578) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHGcI-0005Yf-73 for submit@debbugs.gnu.org; Sun, 17 Mar 2013 12:39:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHGZh-00080N-UM for submit@debbugs.gnu.org; Sun, 17 Mar 2013 12:37:51 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:49728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHGZh-00080C-Rl for submit@debbugs.gnu.org; Sun, 17 Mar 2013 12:36:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHGYd-0000Zf-Oj for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:36:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHGPa-0003Qs-9o for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 12:30:34 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHCXt-00065c-JA for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 08:18:37 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UHCYE-0004h3-LJ for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2013 13:18:58 +0100 Original-Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Mar 2013 13:18:58 +0100 Original-Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Mar 2013 13:18:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:v73Uy8oTtGvDBM/L09C3ZEkDb/g= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -4.9 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: -4.9 (----) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72639 Archived-At: Thierry Volpiatto writes: > joe M 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: >> joe9: M-: (let ((inhibit-read-only t)) (kill-this-buffer)) in the >> eshell buffer. >> To recover after the bug triggers, that is, not to solve the bug .. >> 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. Fix the problem by making the prompt region read-only. diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index c1c4d47..ac3649d 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