all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Branham <alex.branham@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 33975@debbugs.gnu.org
Subject: bug#33975: [PATCH] inhibit read-only text properties in comint-interrupt-subjob
Date: Sat, 23 Feb 2019 07:36:43 -0600	[thread overview]
Message-ID: <87va1ask2c.fsf@gmail.com> (raw)
In-Reply-To: <83zhqmq44v.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]


On Sat 23 Feb 2019 at 02:51, Eli Zaretskii <eliz@gnu.org> 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 <alex.branham@gmail.com>
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




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-comint.el-comint-skip-input-Set-inhibit-read-on.patch --]
[-- Type: text/x-patch, Size: 1304 bytes --]

From 0eba90f40c4ffdd020b86ffa2e19815c0edfe2f0 Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@gmail.com>
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


  reply	other threads:[~2019-02-23 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 16:35 bug#33975: [PATCH] inhibit read-only text properties in comint-interrupt-subjob Alex Branham
2019-02-21 16:32 ` Alex Branham
2019-02-22  8:37   ` Eli Zaretskii
2019-02-22 21:26     ` Alex Branham
2019-02-23  8:51       ` Eli Zaretskii
2019-02-23 13:36         ` Alex Branham [this message]
2019-02-23 17:01           ` Eli Zaretskii
2019-02-24 14:47             ` Alex Branham
2019-02-25  1:11             ` Alex Branham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va1ask2c.fsf@gmail.com \
    --to=alex.branham@gmail.com \
    --cc=33975@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.