From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 15 16:08:35 2024 Received: (at submit) by debbugs.gnu.org; 15 Mar 2024 20:08:35 +0000 Received: from localhost ([127.0.0.1]:53817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlDr1-0006ZC-Db for submit@debbugs.gnu.org; Fri, 15 Mar 2024 16:08:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:37032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlDqw-0006Z0-4f for submit@debbugs.gnu.org; Fri, 15 Mar 2024 16:08:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlDqL-0001pW-Cc for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 16:07:53 -0400 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlDqG-0008De-96 for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 16:07:52 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 7CFA31380086 for ; Fri, 15 Mar 2024 16:07:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 15 Mar 2024 16:07:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1710533265; x=1710619665; bh=wdIGikzNW6He4QJcFCVwLo/FateU/Qzn sLrYZSLEpPo=; b=MMytxnp/LYmGNLx0zbi5uR+rRsulm7p8wU2JTQn1dkeIvXOt JCcq7kv0b5Oe3SBMAdecS6q9y1lYqhkeJ0aNUt+nzF35+PdSWzeDZe4HSHBJOCXH 6fQojVjMMR7gpjg8tHZR2rtNJdtlAwXopm4KgyP3bATeAHGQIRPh2LzNFovkj1fa vYYKDGlRV/GGQbfJvs7eIMUK8J7umpLROQxEqsHqGxFqIVWYm23OtBfhJjKbGuXS 9Y1kEKtfD1OUfHrC4QbAtS7Pia1q5gbSZt5t4pyNNFdTvod4Mrbpk7/uQCdclxJY YpyFmS7pOOgozrxsStbVv7tge9M72BOtDfUNlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1710533265; x=1710619665; bh=wdIGikzNW6He4QJcFCVwLo/FateU/QznsLr YZSLEpPo=; b=XVMWw8B7SEmmQU9PiSdzyzSNhw29asSveCpxM8/gD6S5DAGhKDT AgdjzJoz4h9WavCMVloUuAPwloXXIzbnNIf6pgBATMyHBia7DzN+QzXuzPiZ5p5G DA4T+kvfBMv5tJ0zvWXXhEPeNe1CxgL0GYvSO6bcXuHhk0alkZiftRWk7nW394DS Rcfg+gNn3UiOjrzO+eYjoEfwJ6Ui6sosHI+PGsmAUsBDXBpZrRyCRZLL3vinsNAw SbHtDGb3fTBDBTUmVtmUEds9LW7t9QE79JNMPxSXtj2wGfYCsHb72SoUxYZlXOge nvvFNwKqIwcAVRWflVU5DHEeN2MBs4tNGdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeelgddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttd dtnecuhfhrohhmpeffihhmrgcumfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgruhgt vgdrnhgvtheqnecuggftrfgrthhtvghrnhepffdvffduhfekfffhieefhfffvddtgfefje evuedvfedujeejudevfedtgeeguedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepughimhgrsehsvggtrhgvthhsrghutggvrdhnvght X-ME-Proxy: Feedback-ID: i3e8042a0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 15 Mar 2024 16:07:44 -0400 (EDT) From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 30.0.50; comint-mode does not always respect the read-only flag X-Debbugs-Cc: Date: Fri, 15 Mar 2024 13:07:40 -0700 Message-ID: <87frwrxnqr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.147; envelope-from=dima@secretsauce.net; helo=fout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Hi. Here's a recipe: 1. emacs -Q 2. M-x shell 3. Observe that the shell is live. You can run commands, and the inferior process responds 4. C-x C-q Turns on read-only-mode 5. Observe that we now cannot interact with the shell since it's read-only. We can C-x C-q again to make it work again. Before step 6, C-x C-q again, to make it read-only 6. C-d This normally exits the shell. But if we're read-only, it shouldn't do that. I see that it still works, despite being read-only. I'm observing this with all comint-based modes, not just shell-mode. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 03:19:36 2024 Received: (at 69819) by debbugs.gnu.org; 16 Mar 2024 07:19:36 +0000 Received: from localhost ([127.0.0.1]:54759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlOKO-0000QQ-Hy for submit@debbugs.gnu.org; Sat, 16 Mar 2024 03:19:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlOKK-0000QB-H3 for 69819@debbugs.gnu.org; Sat, 16 Mar 2024 03:19:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlOHX-0005HL-N6; Sat, 16 Mar 2024 03:16:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6A4+SRfuynfepnqERQzU+ZGVr5bf7+j4SiBrO/GGfLE=; b=JRQ0DT/ZHW9N sASZYoCbwbWl59mM+xTu0EUac8RW/ecwNnHSidiAkwEWVuPzynm7T344VQqWa62cUhbqLvRtGiQ+A USuZrDDFfRmCF1dc48QeeW0l+JcKff6PDw93ylDQzluDdEVwtQKkiHHjEkWPbSMv1VX1ffTzjMzQY 59oKHb47R4ujX/C+n+6M/qaWVxbolBUBh3am014WaxT0jOC0qnH0Gk2sLpOfF4qgr+rt1hX6bl0Us oivH/pswyIGp08/QId9z+/TMlAn/SeUkWU4i79rEkeTBZ8QVaZTCg6CUDRqy/yhNDPUe//k+CaSkW JsmEl3mFrMWjGnFfhp5liQ==; Date: Sat, 16 Mar 2024 09:16:37 +0200 Message-Id: <86r0ga7iju.fsf@gnu.org> From: Eli Zaretskii To: Dima Kogan In-Reply-To: <87frwrxnqr.fsf@secretsauce.net> (message from Dima Kogan on Fri, 15 Mar 2024 13:07:40 -0700) Subject: Re: bug#69819: 30.0.50; comint-mode does not always respect the read-only flag References: <87frwrxnqr.fsf@secretsauce.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69819 Cc: 69819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dima Kogan > Date: Fri, 15 Mar 2024 13:07:40 -0700 > > Hi. Here's a recipe: > > 1. emacs -Q > > 2. M-x shell > > 3. Observe that the shell is live. You can run commands, and the > inferior process responds > > 4. C-x C-q > > Turns on read-only-mode > > 5. Observe that we now cannot interact with the shell since it's > read-only. We can C-x C-q again to make it work again. Before step 6, > C-x C-q again, to make it read-only > > 6. C-d > > This normally exits the shell. But if we're read-only, it shouldn't > do that. I see that it still works, despite being read-only. Why do you think C-d shouldn't work when the buffer is read-only? > I'm observing this with all comint-based modes, not just shell-mode. It's a feature, AFAICT. But I'm interested in hearing why you thought it was a bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 16:01:38 2024 Received: (at 69819) by debbugs.gnu.org; 17 Mar 2024 20:01:38 +0000 Received: from localhost ([127.0.0.1]:38685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlwhO-0005BP-7H for submit@debbugs.gnu.org; Sun, 17 Mar 2024 16:01:38 -0400 Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:48737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlwhL-0005B0-Eu for 69819@debbugs.gnu.org; Sun, 17 Mar 2024 16:01:36 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id 2A4451C000B2; Sun, 17 Mar 2024 16:00:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 17 Mar 2024 16:00:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1710705650; x= 1710792050; bh=cqUiIFtRiFRgZlImESWU1CJVO/G0aeG9TrYI8PF6fK4=; b=F 85vP2BLP10F4TJ/L1aa6yTVl5tSYoOqp1tzDuCSxQgpAndn2rkR2E1+tL8TNYPX6 2tOFpx1PIAtJaXs65i+6k/ZxEHpGtoCkxBKKPYjA/zkNciKXgDkA4KCf5yNGsi7P jkdwYT0Vw7gGJRmGlrIFKsdOvKtKQ6uOyxyof3lYilAkSkttNPhMcBl1YsESdDjQ WPle7werSFAVS8GU5Y7jB6E8C+1bKdnUZjoAXskPIpJ1uwcUTkw8Vfx/RLfRW9DX BMV6zwuSqts8FtbEtjiD0YCiPW+Dd7rf35MyIhl8hZl4t1FceGMWTTHhZccTWSpv djQxaN/NE29oFZ9rP7MTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710705650; x=1710792050; bh=cqUiIFtRiFRgZlImESWU1CJVO/G0 aeG9TrYI8PF6fK4=; b=OL6S8l14obyvR1ZYGbvp82rp31C+j809z9T3LzV9MLhT uax+6OaQ8CqmqEeVYW6Vlkt1TcfGNFXtCE22JJbcFaiw4KaFOYGjs5zchTMFbfpq HdCXpsoE4bEy/awP/mDxM8TA7a9w7YjQcZVpaLSBHC+lBuXrMGImWDp5HS/PVNh8 QN4gKOFZYXraBCEp1JIOpc32L768XRxErK9/wsdz/2I/p/fNxK70eaWWivqeSHMt Vr5lwNhzgQKSrO0w2pS1oCcDNRyIrkMgx98UuGos+JziPRJewEST8CMSCvOIzjdI MrXYO8ZrIapnFoVxgyYHBO3XB6uqJQaWjKU0NLLadQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeehgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefuffgjkfggtgesthdtredttdertdenucfhrhhomhepffhimhgr ucfmohhgrghnuceoughimhgrsehsvggtrhgvthhsrghutggvrdhnvghtqeenucggtffrrg htthgvrhhnpefgieefheegvdekkedvvedvledvgeelveetvdeujedvjeevudevueelveel veduteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe guihhmrgesshgvtghrvghtshgruhgtvgdrnhgvth X-ME-Proxy: Feedback-ID: i3e8042a0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Mar 2024 16:00:49 -0400 (EDT) References: <87frwrxnqr.fsf@secretsauce.net> <86r0ga7iju.fsf@gnu.org> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Dima Kogan To: Eli Zaretskii Subject: Re: bug#69819: 30.0.50; comint-mode does not always respect the read-only flag Date: Sun, 17 Mar 2024 12:51:20 -0700 In-reply-to: <86r0ga7iju.fsf@gnu.org> Message-ID: <874jd4y6fq.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69819 Cc: 69819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Why do you think C-d shouldn't work when the buffer is read-only? > >> I'm observing this with all comint-based modes, not just shell-mode. > > It's a feature, AFAICT. But I'm interested in hearing why you thought > it was a bug. Is there no expectation that a "read-only" mode would block any changes to a buffer? Killing the inferior process breaks that expectation, hence this report. That said, I've been a daily user of shell-mode for something like 25 years, and encountered it for the first time just recently, so fixing this surely isn't very high priority. But still. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 16:44:39 2024 Received: (at 69819) by debbugs.gnu.org; 17 Mar 2024 20:44:39 +0000 Received: from localhost ([127.0.0.1]:40248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlxN1-00075i-47 for submit@debbugs.gnu.org; Sun, 17 Mar 2024 16:44:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlxMy-00075K-9n for 69819@debbugs.gnu.org; Sun, 17 Mar 2024 16:44:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlx24-0005dg-IS; Sun, 17 Mar 2024 16:23:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5WObbcarbtMZcOCq22AA9K02ufXF8Y1+aoFSF7a9CkI=; b=GCceAT9Ai+00 66f2iri6BvPtHdP71Fv+52OH9ROEXx3/U3vA7jqbHvr+WTYbtdlruIMcInshc0pEXdqLEnFUQZuic JxGLaubQGad1Y4FehYuI0qE6sA0GgJwjdQnDQK1pr1WWsQwDsidZ4ad1RjV2IvryYKTrCZvG7lzC0 fm2g4rmReltaFSoOHXfqA0C/Wg3Nn2dVCP5BrmMqIbxvJd//25JJrcW1MSxUcprhamYXsVS0ujfLn 6PquOE9gy3pOwr4PptiHTUdFgeitTvYdkVXqpiZZqSbiPG4hMIH7EHU5pvd+X5v79d1vOqcgcBqm2 0T/u1y3Mb3cQJujd1Ixn6g==; Date: Sun, 17 Mar 2024 22:22:56 +0200 Message-Id: <86v85k4nhb.fsf@gnu.org> From: Eli Zaretskii To: Dima Kogan In-Reply-To: <874jd4y6fq.fsf@secretsauce.net> (message from Dima Kogan on Sun, 17 Mar 2024 12:51:20 -0700) Subject: Re: bug#69819: 30.0.50; comint-mode does not always respect the read-only flag References: <87frwrxnqr.fsf@secretsauce.net> <86r0ga7iju.fsf@gnu.org> <874jd4y6fq.fsf@secretsauce.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69819 Cc: 69819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dima Kogan > Cc: 69819@debbugs.gnu.org > Date: Sun, 17 Mar 2024 12:51:20 -0700 > > > Why do you think C-d shouldn't work when the buffer is read-only? > > > >> I'm observing this with all comint-based modes, not just shell-mode. > > > > It's a feature, AFAICT. But I'm interested in hearing why you thought > > it was a bug. > > > Is there no expectation that a "read-only" mode would block any changes > to a buffer? Killing the inferior process breaks that expectation, hence > this report. What expectation, exactly? The buffer is not changed; the process is terminated, but that's not the same as changing the process's buffer! From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 18 01:08:46 2024 Received: (at 69819) by debbugs.gnu.org; 18 Mar 2024 05:08:46 +0000 Received: from localhost ([127.0.0.1]:34195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm5Es-0002zT-1t for submit@debbugs.gnu.org; Mon, 18 Mar 2024 01:08:46 -0400 Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]:52189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm5Eq-0002z2-NV for 69819@debbugs.gnu.org; Mon, 18 Mar 2024 01:08:45 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A07CA11400E8; Mon, 18 Mar 2024 01:08:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 18 Mar 2024 01:08:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1710738481; x= 1710824881; bh=U07VN1tISpBb0nV8iz9GUcNvn8rCJsuOf0QDfSEdxqM=; b=L fIFrUCpKxmgXtRw4K1K5sqxUfST1/ykmYPWMylXfCU3sYCWodq47L/8yXbdrrfa/ lAetfZKIFGjFwV4Zo2yw2XHj/bT0ndTY6RzN2zVvguGmSn0iucjih2GBFLf8Xgr7 qdSVXUX8FCEkju0IzSuIt31fV4Vm2/2nE9TeI0otUQE6BLmSKCC6LZ0pkyaLu2Ps dK34/AkOqS7UOwOzAb/AbI3IiMoVj5mFsncF35rwEo/0JU7QhhAA44V8QwVXyXSw sJIZxP5Er82XIsrERHd+WbB3cU+NxNnCigtu62uMfEpiUiDagjTrmUlvHv0iTXaa r+Di+3WEzEIFRtR001l7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710738481; x=1710824881; bh=U07VN1tISpBb0nV8iz9GUcNvn8rC JsuOf0QDfSEdxqM=; b=XZkuH55K2OLXoCXYsNCpQeckn1WmNZKBsfL4t8CVqbea gcsAnUd2QBLeenUcYHRTb+K0uUqzPVOudtAxQMo7eOZXrxfH5rWb9s29hLmVXoZ5 uoObVlzUPWtqC/GpeG3OnOvXGN7Io1X5C92AyJVxSqazJw+cMIti6/8JIH6ZbhFq LvhUGRn0Tn9jakaJbMlgcybSqhH87fC95LXG0YRtFx24rajdONWvsyHA7ogkzkdE UTaU2zh+Kl+Fqcg7HLg65b+rZcifby53i4ZhZInRTJVprAcF/wzRPhz/sapRzbwH Z8FTqwS970nY2HaFP3HyjU+1bHFlUIIEjOgetkprvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeeigdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpeffihhmrgcu mfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvtheqnecuggftrfgrth htvghrnhepgfeifeehgedvkeekvdevvdelvdegleevtedvueejvdejveduveeuleevleev udetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug himhgrsehsvggtrhgvthhsrghutggvrdhnvght X-ME-Proxy: Feedback-ID: i3e8042a0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 01:08:00 -0400 (EDT) References: <87frwrxnqr.fsf@secretsauce.net> <86r0ga7iju.fsf@gnu.org> <874jd4y6fq.fsf@secretsauce.net> <86v85k4nhb.fsf@gnu.org> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Dima Kogan To: Eli Zaretskii Subject: Re: bug#69819: 30.0.50; comint-mode does not always respect the read-only flag Date: Sun, 17 Mar 2024 21:57:26 -0700 In-reply-to: <86v85k4nhb.fsf@gnu.org> Message-ID: <87v85kw2j7.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69819 Cc: 69819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > What expectation, exactly? The buffer is not changed; the process is > terminated, but that's not the same as changing the process's buffer! The buffer IS changed, actually: when the inferior process dies, it prints a message into the buffer: Process shell<1> finished But that's a red herring I think: if the inferior process died, but the printing was blocked by the read-only mode, I would still consider that to be a bug. My use case is this. I use shell-mode buffers extensively. Periodically I want to examine the output of some command in a *shell* buffer: compare it against other data, look at it, cut/paste it, whatever. While I'm doing that I don't want to accidentally change anything, so I C-x C-q. Then accidental keystrokes don't end up changing anything. UNLESS that accidental keystroke is C-d (and probably a few others I haven't hit by mistake yet). This use case and expectation seems reasonable to me. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 18 09:17:48 2024 Received: (at 69819) by debbugs.gnu.org; 18 Mar 2024 13:17:48 +0000 Received: from localhost ([127.0.0.1]:52079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmCs7-0003s5-LL for submit@debbugs.gnu.org; Mon, 18 Mar 2024 09:17:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmCs5-0003rd-Rx for 69819@debbugs.gnu.org; Mon, 18 Mar 2024 09:17:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmCrO-0002sx-Ae; Mon, 18 Mar 2024 09:17:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bPFOjUKU2xHoki8YPsFCavAr9YRnrEXP6Ok9z43Rl6I=; b=okehRGbpArVr tdholoMXcCE33l6faIXKtB41hVEtJzT4VeKO5o4BYIat7zvLsoYGxjm6hWibDgUETDsofoOJ9AgOI AToE/ZJHDUDiMzXjxzQqOyAu9290jS+f+WUgW5Rk2Ni2rWeCqqLnlx2Edjw0F7CPex5VQB9YJTTaC Ld+DG1mSvSVVkxEncgDVedFI/uyUTZbvxrT0wTKqrqgpE8R+3dmmMLd6dwVQ9FY4eJxQEfOvSRtFi MBKzI8+P6XnQYmhfDG/y3J7zKwm5/hig4g1Qt6aTdkWJs23PCpbzFtv0VDPgZzb1R2J6LKwcKKy10 YQjtaQ9BwayAz7dVzs00qA==; Date: Mon, 18 Mar 2024 15:16:49 +0200 Message-Id: <86o7bb4r3y.fsf@gnu.org> From: Eli Zaretskii To: Dima Kogan In-Reply-To: <87v85kw2j7.fsf@secretsauce.net> (message from Dima Kogan on Sun, 17 Mar 2024 21:57:26 -0700) Subject: Re: bug#69819: 30.0.50; comint-mode does not always respect the read-only flag References: <87frwrxnqr.fsf@secretsauce.net> <86r0ga7iju.fsf@gnu.org> <874jd4y6fq.fsf@secretsauce.net> <86v85k4nhb.fsf@gnu.org> <87v85kw2j7.fsf@secretsauce.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69819 Cc: 69819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dima Kogan > Cc: 69819@debbugs.gnu.org > Date: Sun, 17 Mar 2024 21:57:26 -0700 > > > What expectation, exactly? The buffer is not changed; the process is > > terminated, but that's not the same as changing the process's buffer! > > The buffer IS changed, actually: when the inferior process dies, it > prints a message into the buffer: > > Process shell<1> finished Not relevant: this comes from the process sentinel, which is invoked when the process exits. By that time, the buffer is no long a shell buffer, and the process finished notification is shown to announce the end of the session. > My use case is this. I use shell-mode buffers extensively. Periodically > I want to examine the output of some command in a *shell* buffer: > compare it against other data, look at it, cut/paste it, whatever. While > I'm doing that I don't want to accidentally change anything, so I C-x > C-q. Then accidental keystrokes don't end up changing anything. UNLESS > that accidental keystroke is C-d (and probably a few others I haven't > hit by mistake yet). This use case and expectation seems reasonable to > me. I don't agree that it is reasonable. C-d is a key that is bound to a certain function, not unlike C-f or C-v. You wouldn't expect C-f or C-v not do their job when a buffer is read-only, would you? Then why expect that from C-d? As for your use case: I understand now where you are coming from, but I think that what you want is a missing feature; that it just happens to work with 99% of your keystrokes is sheer luck. What you want is a feature whereby input to the shell is blocked until explicitly unblocked by the user, in which case C-d would be blocked as well. I don't think we have such a feature, so I propose to add it.