From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Don't override 'comint-prompt-read-only' by default Date: Sun, 15 Sep 2024 15:48:00 +0000 Message-ID: <87frq0kjf3.fsf@posteo.net> References: <87a5gb4fti.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14933"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 15 17:48:59 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sprUg-0003kA-OR for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Sep 2024 17:48:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sprTu-0005JH-Ke; Sun, 15 Sep 2024 11:48:11 -0400 Original-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 1sprTr-0005J2-PK for Emacs-devel@gnu.org; Sun, 15 Sep 2024 11:48:08 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sprTp-000302-3m for Emacs-devel@gnu.org; Sun, 15 Sep 2024 11:48:07 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 23612240027 for ; Sun, 15 Sep 2024 17:48:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726415281; bh=I3hE9LOXnvDshoWJ+9t+o4cHUTlNbZP/i80/8DAWNeo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Uvddr23anPxEiCL5Wl6r3sy5N8jaZqJJBiJUdSwmaRl+sEljux2h22lKi4toY64S7 CdRy0YC3YOZJYjjUom/gNQZo++okXS1Ud29PXq42nDpVVT7qSw84GJkeDPwhLFtXVl wP/yD8V5etak9hkLW7CyoDOf+5MUGOTcneRYsM2rtRCbfpO61W0cpY2zytKr4EP8w4 IJfZiLlKWdb09rBeLynD4wQJSzOEAxcehGQGFbIBKxqUYcsqJwf5w7zT4huwRy82C3 4UXzfXEPunUKySsEcjUFgxt5Ax9VjW/ifb9hxKXy0Sa/knNpXVqb1vtUe3GpUTrvZn SGMB3/HCIn5KQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X6C9r4HW0z9rxF; Sun, 15 Sep 2024 17:48:00 +0200 (CEST) In-Reply-To: (Stefan Kangas's message of "Sat, 14 Sep 2024 16:13:12 -0700") X-Hashcash: 1:20:240915:emacs-devel@gnu.org::B2xa3k21AvLYzfpM:MHV X-Hashcash: 1:20:240915:stefankangas@gmail.com::RsqK2nrM9V2kgM18:2i+U Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323638 Archived-At: Stefan Kangas writes: > Philip Kaludercic writes: > >> I am proposing this change here, because I am aware it might be >> controversial. My motivation is to have more consistent inferior modes, >> and not have to be surprised that (as in my case right now, >> inferior-python-mode doesn't allow be to kill a prompt). I haven't >> written a NEWS entry yet, but it should probably mention that anyone >> interested in restoring the old behaviour should just set >> 'comint-prompt-read-only' directly. >> >> WDYT? > > Making `comint-prompt-read-only` nil in more modes seems like a step > backwards to me though; if anything I'd like to make it t in more > places. I'm actually not sure why it does not already default to t. > That's certainly the default in any REPL that I can think of, so our > default breaks most user expectations. > > See, for example, users asking questions on StackOverflow like "How to > prevent backspace from deleting my shell prompt": > https://emacs.stackexchange.com/questions/21751/how-to-prevent-backspace-from-deleting-my-shell-prompt > > It makes sense to have the option to be able delete the prompt, though > my preferred UI for that is closer to something like hitting `C-w` twice > (the second time to confirm) rather than setting a variable. I just > feel like this is highly situation dependent: most of the time I do not > want backspace to delete the prompt, but maybe occasionally I do. > > That said, if we can agree to flip `comint-prompt-read-only` to t, > I think your patch should definitely be installed. > > My $.02. I personally wouldn't be a fan, as I think that there is a value in realising that comint is just a regular buffer and you can edit any way you like. That being said, I do understand the issue that newcomers have when they are used to deleting a line by waiting on backspace instead of using a command like `kill-whole-line'. But regardless, we can split this up into two patches. All I want it to ensure consistency; perhaps we can discuss what the default should be on emacs-devel? -- Philip Kaludercic on icterid