From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties Date: Sat, 30 Nov 2013 00:31:31 -0800 Message-ID: <87haaumgt8.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1385800334 1773 80.91.229.3 (30 Nov 2013 08:32:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 08:32:14 +0000 (UTC) To: 16010@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 30 09:32:20 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 1VmfyN-0006c2-NA for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Nov 2013 09:32:19 +0100 Original-Received: from localhost ([::1]:51274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmfyN-0000zr-A8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Nov 2013 03:32:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmfyF-0000zU-6Q for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:32:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmfy9-0001NW-Sg for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:32:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmfy9-0001NS-Pm for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:32:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vmfy8-0003oz-Os for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:32:05 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2013 08:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16010 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138580032114676 (code B ref -1); Sat, 30 Nov 2013 08:32:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Nov 2013 08:32:01 +0000 Original-Received: from localhost ([127.0.0.1]:51091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vmfy3-0003od-Uq for submit@debbugs.gnu.org; Sat, 30 Nov 2013 03:32:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45628) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vmfy0-0003oQ-Cr for submit@debbugs.gnu.org; Sat, 30 Nov 2013 03:31:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmfxq-0001Hs-3Z for submit@debbugs.gnu.org; Sat, 30 Nov 2013 03:31:51 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmfxq-0001Ho-0d for submit@debbugs.gnu.org; Sat, 30 Nov 2013 03:31:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmfxk-0000z8-QZ for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:31:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmfxf-0001FN-Kh for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:31:40 -0500 Original-Received: from mail-pb0-x22d.google.com ([2607:f8b0:400e:c01::22d]:39284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmfxf-0001FG-C8 for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2013 03:31:35 -0500 Original-Received: by mail-pb0-f45.google.com with SMTP id rp16so15638029pbb.4 for ; Sat, 30 Nov 2013 00:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=Glxd/NWi/+MkDjoDDjIf5yBhAiwBp7ZQmkZgBT1Te0o=; b=hPFZBMpZLHONCBR8eL0osBv+X69/qOVVt3MvgXw3QS0gYeW2S6FH2JblrOTiVwC4/H Z6na0maO24/ium8VnLbsKGUlIIUa1v3xWQaN/TuwWyDLpXkHxcP5F6hwvZ/y1GxHE/t0 EZQFWWerfZVAhv54OY1Y0KZDMz7cVYA2bKZT+uFbwQzEeIHrPap7yMp6UEdFGlw2kWbH 9mtizxN9D68cZL3foNKqeZoogX3JczqtbsOXvfsvnr3EyB+HlJwBjYmyBeHI9cJNkGvH lNlXS5or3DJX0cB77cBnvp+mtiNHP4CD3Jjb+VwGpFXsfsPetw99aMYoI0zURRJTQPWC qeaw== X-Received: by 10.68.196.69 with SMTP id ik5mr20379334pbc.132.1385800293938; Sat, 30 Nov 2013 00:31:33 -0800 (PST) Original-Received: from localhost (cs178-201.anderson.ucla.edu. [164.67.178.201]) by mx.google.com with ESMTPSA id de1sm107350337pbc.7.2013.11.30.00.31.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 30 Nov 2013 00:31:32 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:81130 Archived-At: --=-=-= Content-Type: text/plain Hi, If comint-use-prompt-regexp is t typing in comint buffers inherits text properties from the prompt. See this screencast: http://screencast.com/t/xYa9KVWu7 You can also reproduce it by setting comint-use-prompt-regexp to t in shell buffers. Attached is the fix with minor reformatting of the adjacent code for the readability reasons. This was probably recently introduced when eliminating the overlays from comint buffers. Vitalie --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-add-rear-nonsticky-t-to-comint-prompt.patch >From 36dd963f3e7eb3a6775879aa98a24ca2221079bb Mon Sep 17 00:00:00 2001 From: Vitalie Spinu Date: Fri, 29 Nov 2013 23:25:55 -0800 Subject: [PATCH] add rear-nonsticky t to comint prompt make sure typing in comint buffers doesn't inherit comint-highlight-prompt face and other prompt properties. --- lisp/comint.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 3aff313..ee83918 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2063,20 +2063,18 @@ Make backspaces delete the previous character." (with-silent-modifications (or (= (point-min) prompt-start) (get-text-property (1- prompt-start) 'read-only) - (put-text-property - (1- prompt-start) prompt-start 'read-only 'fence)) - (add-text-properties - prompt-start (point) - '(read-only t rear-nonsticky t front-sticky (read-only))))) + (put-text-property (1- prompt-start) prompt-start + 'read-only 'fence)) + (add-text-properties prompt-start (point) + '(read-only t front-sticky (read-only))))) (when comint-last-prompt (remove-text-properties (car comint-last-prompt) (cdr comint-last-prompt) '(font-lock-face))) (setq comint-last-prompt (cons (copy-marker prompt-start) (point-marker))) - (add-text-properties (car comint-last-prompt) - (cdr comint-last-prompt) - '(font-lock-face comint-highlight-prompt))) + (add-text-properties prompt-start (point) + '(rear-nonsticky t font-lock-face comint-highlight-prompt))) (goto-char saved-point))))))) (defun comint-preinput-scroll-to-bottom () -- 1.8.1.2 --=-=-=--