Subject: bug#16010: closed (Re: bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 20 Dec 2013 06:27:04 +0000

Your bug report

#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16010: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16010
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#16010: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties
From: Chong Yidong <[email-masked]>
To: Vitalie Spinu <[email-masked]>
Cc: [email-masked]
Date: Fri, 20 Dec 2013 14:25:52 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Vitalie Spinu <[email-masked]> writes:

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

Thanks, look correct; committed to trunk.

Subject: [patch] 24.3.50; Typing in comint buffers inherits prompt text properties
From: Vitalie Spinu <[email-masked]>
To: [email-masked]
Date: Sat, 30 Nov 2013 00:31:31 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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

>From 36dd963f3e7eb3a6775879aa98a24ca2221079bb Mon Sep 17 00:00:00 2001
From: Vitalie Spinu <[email-masked]>
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