From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: comint read only prompt "leaking" properties Date: Wed, 07 Feb 2007 10:28:25 -0700 Message-ID: <1170869305.2452.5.camel@turtle.as.arizona.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170869793 16964 80.91.229.12 (7 Feb 2007 17:36:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Feb 2007 17:36:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 07 18:36:26 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HEqbG-0001Em-Sj for ged-emacs-devel@m.gmane.org; Wed, 07 Feb 2007 18:28:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HEqbG-0000G0-Dy for ged-emacs-devel@m.gmane.org; Wed, 07 Feb 2007 12:28:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HEqb2-0000F5-Qw for emacs-devel@gnu.org; Wed, 07 Feb 2007 12:28:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HEqb0-0000EA-2N for emacs-devel@gnu.org; Wed, 07 Feb 2007 12:28:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HEqaz-0000E7-S4 for emacs-devel@gnu.org; Wed, 07 Feb 2007 12:28:37 -0500 Original-Received: from nsa.as.arizona.edu ([128.196.210.37]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HEqaz-0003kS-Cd for emacs-devel@gnu.org; Wed, 07 Feb 2007 12:28:37 -0500 Original-Received: from nsa2.srv.as.arizona.edu (nsa2.srv.as.arizona.edu [10.100.2.1]) by nsa.as.arizona.edu (8.13.8/8.13.8) with ESMTP id l17HSXrZ026160 for ; Wed, 7 Feb 2007 10:28:34 -0700 Original-Received: from biff.as.arizona.edu (biff.as.arizona.edu [128.196.211.142]) by nsa.as.arizona.edu (8.13.6/8.13.6) with ESMTP id l17HSO9U018463 for ; Wed, 7 Feb 2007 10:28:24 -0700 Original-Received: from turtle.as.arizona.edu (turtle.as.arizona.edu [128.196.208.207]) by biff.as.arizona.edu (8.12.8/8.12.8) with ESMTP id l17HSN7t007848 for ; Wed, 7 Feb 2007 10:28:23 -0700 X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4) X-Scanned-By: MIMEDefang 2.57 on 10.100.7.1 X-Scanned-By: MIMEDefang 2.57 on 10.100.2.1 X-so-MailScanner-Information: Please contact the ISP for more information X-so-MailScanner: Found to be clean X-so-MailScanner-SpamCheck: so2: not spam, SpamAssassin (score=-1.44, required 7.2, autolearn=disabled, ALL_TRUSTED -1.44) X-so-MailScanner-From: jdsmith@as.arizona.edu X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66071 Archived-At: The read only prompt enabled in COMINT modes by `comint-prompt-read-only' can "leak" the read-only text property into subsequent input. This inhibits the printing of the next prompt, and garbles the input. The misplaced properties will also get saved on the input ring, and can re-inject the troublesome text upon recalling earlier input, even after the buffer is cleared. Steps to reproduce: M-x shell M-x set-variable [Ret] comint-prompt-read-only [Ret] t [Ret] In the shell buffer: host% echo "foo" [Ret] Drag to highlight the prior command, including the space before "echo". Paste it in at the new prompt. host% echo "foo" Hit Return to send the command. Note that a new prompt is not sent, and that the input line keeps doubling in length. Examine the properties along the input, to find that `front-sticky (read-only) read-only t' has been littered across the input fields. I know of know general means to inhibit any property transfer when pasting text in a given buffer, but if one did exist, that would be a (heavy handed) solution. As another option, is there a text property for "don't copy any of these properties"? I doubt anyone is ever interested in copying properties from the prompt. In reality, though, any read-only property pasted in from anywhere can cause trouble on the COMINT command line. This is the list of prompt properties: (front-sticky (read-only) read-only t inhibit-line-move-field-capture t field output rear-nonsticky t fontified t) JD