From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#33975: [PATCH] inhibit read-only text properties in comint-interrupt-subjob Date: Sat, 23 Feb 2019 07:36:43 -0600 Message-ID: <87va1ask2c.fsf@gmail.com> References: <87d0pcfkjq.fsf@gmail.com> <87mumpgl0v.fsf@gmail.com> <83bm34fccz.fsf@gnu.org> <87mumncy6v.fsf@gmail.com> <83zhqmq44v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="187583"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 33975@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 23 14:37:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxXUN-000mjS-Kh for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2019 14:37:11 +0100 Original-Received: from localhost ([127.0.0.1]:38012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxXUM-0002GG-Gr for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2019 08:37:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxXUG-0002Fx-2p for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 08:37:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxXUF-0002Gf-0k for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 08:37:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxXUE-0002G2-37 for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 08:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gxXUD-0005EY-J4 for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 08:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Feb 2019 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33975 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33975-submit@debbugs.gnu.org id=B33975.155092901320102 (code B ref 33975); Sat, 23 Feb 2019 13:37:01 +0000 Original-Received: (at 33975) by debbugs.gnu.org; 23 Feb 2019 13:36:53 +0000 Original-Received: from localhost ([127.0.0.1]:48981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxXU5-0005EA-2L for submit@debbugs.gnu.org; Sat, 23 Feb 2019 08:36:53 -0500 Original-Received: from mail-ot1-f42.google.com ([209.85.210.42]:40927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxXU3-0005Dx-D7 for 33975@debbugs.gnu.org; Sat, 23 Feb 2019 08:36:52 -0500 Original-Received: by mail-ot1-f42.google.com with SMTP id v20so4256180otk.7 for <33975@debbugs.gnu.org>; Sat, 23 Feb 2019 05:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=j50s+zZa2ZCC5pjlEVAqsmZZRfjgn/pU7ko5xMQYVZc=; b=RLIqejMRh0hG4BksJaRfHYoV5bKcnZHprLg8XOUMZsxPMud5nADLa+tZWOzwq3svAD g8R7f39Gm5jEr93PoT3DZo3hGibvhG0ulmJcwUTgCGBScr68hb1wiQbFpanM/dvUjuWS 7+hksmvo6xTBaOa0jDSsuh6/rcdNjY094u+0Wz/CorXWvSd9BENuG2qG9Wd4+/JNqvG7 WZA4aWAJHHjANT6/gckSDbCKaKH/AxZpWaBLG+iXvIbLFviDQd76o4iZzHAU0ngIsf4T zIvIZNcODfZm2q4sLY97Muob3jP0GwDdqAtm93kpI3vdHhsdGeANwYvH6gHmO09kDRoF 6e1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=j50s+zZa2ZCC5pjlEVAqsmZZRfjgn/pU7ko5xMQYVZc=; b=mgInJLJpmRYPvDOx3GqblGB4q46quXvX5o2kHPVwV4NwAjHFvi9Wc/EI3Y4SB9AFHk Nl1wOnqQL99npe72LomEfljOBbn02LjphEmk0oOPNDqQ6MU8lmptxDbh4L8fpn4w9yDe 6mupXt+xKzGXSJhDVXzpsnY3Y7T4x54E5xHZanJBz8+XiXse+okQR2Tj2OoMGYNr18Bt DjrOiBTT6TqcEOjRhDyaXSogX9WZ/Y1+50LCi2nS6mBGLreMHyPkocmA+adoz43H0S2l aE42W0tmeBVVOGHAGilb8aRsoNXRo3lAChPFiAkxZYwIIFWxe20ugOKTLPAh5eW0zeHV EJkA== X-Gm-Message-State: AHQUAua5CX/O4x783sbBXWdcxLqqVe3c45CAulJlqr0QihlWMU6zhOyG 0VBV1cbFohISfN2MCe0Kga8fwnxA X-Google-Smtp-Source: AHgI3IZ2KmlzVrIGacS2mWn0E9D0JBmw5msaXjGm1Cmks4MWb10oRKQiTxuzlV9NBPs3cI9e9Gn7Ag== X-Received: by 2002:a9d:6d94:: with SMTP id x20mr5762115otp.78.1550929005388; Sat, 23 Feb 2019 05:36:45 -0800 (PST) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id m26sm1695420otl.32.2019.02.23.05.36.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Feb 2019 05:36:44 -0800 (PST) In-reply-to: <83zhqmq44v.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:155689 Archived-At: --=-=-= Content-Type: text/plain On Sat 23 Feb 2019 at 02:51, Eli Zaretskii wrote: > Then shouldn't the change be inside comint-skip-input instead? I > mean, the same problem will happen also in all other callers of > comint-skip-input, no? Probably, yes. Changed in the attached patch. > (I'm not sure I understand why that function inserts the description > of this-command-keys -- is that to insert "C-c C-c" into the buffer? > This is not in the doc string, perhaps we should add that.) The attached patch adds it. WDYT? >From 0eba90f40c4ffdd020b86ffa2e19815c0edfe2f0 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sat, 23 Feb 2019 07:35:01 -0600 Subject: [PATCH] * lisp/comint.el (comint-skip-input): Set inhibit-read-only to t Bug#33975 --- lisp/comint.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 0a6aff2e73..ab6297a709 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2536,13 +2536,16 @@ Useful if you accidentally suspend the top-level process." (defun comint-skip-input () "Skip all pending input, from last stuff output by interpreter to point. -This means mark it as if it had been sent as input, without sending it." +This means mark it as if it had been sent as input, without +sending it. The command keys used to trigger this command are +inserted into the buffer." (let ((comint-input-sender 'ignore) (comint-input-filter-functions nil)) (comint-send-input t t)) (end-of-line) (let ((pos (point)) - (marker (process-mark (get-buffer-process (current-buffer))))) + (marker (process-mark (get-buffer-process (current-buffer)))) + (inhibit-read-only t)) (insert " " (key-description (this-command-keys))) (if (= marker pos) (set-marker marker (point))))) -- 2.19.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-comint.el-comint-skip-input-Set-inhibit-read-on.patch >From 0eba90f40c4ffdd020b86ffa2e19815c0edfe2f0 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sat, 23 Feb 2019 07:35:01 -0600 Subject: [PATCH] * lisp/comint.el (comint-skip-input): Set inhibit-read-only to t Bug#33975 --- lisp/comint.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 0a6aff2e73..ab6297a709 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2536,13 +2536,16 @@ Useful if you accidentally suspend the top-level process." (defun comint-skip-input () "Skip all pending input, from last stuff output by interpreter to point. -This means mark it as if it had been sent as input, without sending it." +This means mark it as if it had been sent as input, without +sending it. The command keys used to trigger this command are +inserted into the buffer." (let ((comint-input-sender 'ignore) (comint-input-filter-functions nil)) (comint-send-input t t)) (end-of-line) (let ((pos (point)) - (marker (process-mark (get-buffer-process (current-buffer))))) + (marker (process-mark (get-buffer-process (current-buffer)))) + (inhibit-read-only t)) (insert " " (key-description (this-command-keys))) (if (= marker pos) (set-marker marker (point))))) -- 2.19.2 --=-=-=--