From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#55756: 26.3; Document customization of `delete-selection-mode' behavior in Emacs manual Date: Wed, 1 Jun 2022 19:35:57 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26040"; mail-complaints-to="usenet@ciao.gmane.io" To: 55756@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 01 21:37:28 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nwU9o-0006Zs-Bl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 21:37:28 +0200 Original-Received: from localhost ([::1]:56382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwU9m-00008W-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 15:37:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwU9O-00006Q-GF for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:37:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwU9O-0005Qz-7e for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwU9O-0003wY-62 for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55756 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.165411217415071 (code B ref -1); Wed, 01 Jun 2022 19:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jun 2022 19:36:14 +0000 Original-Received: from localhost ([127.0.0.1]:51895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwU8c-0003v1-10 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:36:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwU8a-0003uu-R4 for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:36:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwU8a-0008IM-Kn for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:36:12 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:21800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwU8X-0005IF-Na for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:36:11 -0400 Original-Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 251GNke2012309 for ; Wed, 1 Jun 2022 19:36:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=vz0bMhHpxJUoSFVCk/GSxeOY1997LZSSPl48itKWPZY=; b=Ixfrk6dQAey+jOa0Gvo++LIeSzqG3cRztDo+Q+elnBf7YqOY8LqNynhSy2fzWvDLelVQ aCSXmXGJfDQVt+HVBZP45iO3EMBs46AfnvG8uEAMGumHYTPAAyzNRpTCcSp9FIKCzWpv LxzhyACgIYQjxRQOsheBpqvqg1CxVcpiIzAUIYtI566Jy/jo0552u0pIEezQgJPBqLOm kgy562NVKCuCzI9iLYXrADzcGo7F66CwuKAEVXeqlpR4xZ3hvRSFUWgP5XZ6SdujRxAy Rc5OmhnLgIR0ASRWx4KMLSS64A2EwdtiQSBY63Uq9j5Zcwofuqv6d91G1LsZ9xbxI2dh Eg== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gbcahrqje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 01 Jun 2022 19:36:07 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 251JQ94d031836 for ; Wed, 1 Jun 2022 19:36:06 GMT Original-Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2045.outbound.protection.outlook.com [104.47.56.45]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gc8p46w1n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 01 Jun 2022 19:36:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPaDUttCIf12bUXgtY66wc0tHDl3FSlMHH1RJZVS4ZtP7vDwBDiNyyMN3IWAesafc8XDW7bhCfVbFct1gvCaA6tG9QTS9+EHeZcglpQ93U8z+sIlf76/HI8fwov/SOGyFWuKiSHhgqZoGnnnQeCqSpBldawSZE4/Yg/DRPCY07U32KfeJVuUA0fAQq8fEEuIad3bhhxcx5jTFeLyzx1TJJxUgZu+JDoTkq1Unsz8mqlSD8bNKTkQHzhQU14jU/YCJqlgkEOutEryFNbu7XOb7vZkR8bVs/cqr3tWar8lMvI8krAJla/Yk+mPJQLJh/ypQf0WEULH3Y9HJbCQiBwCAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vz0bMhHpxJUoSFVCk/GSxeOY1997LZSSPl48itKWPZY=; b=hhbKfvGrpUtWwlJtYnFwICZ5GPM90iT7csVUhf3PWEx+5loHT0EoCmKU/W5fWsqKS5ZTiHjkimruKTRvOHFDoMWL0Nn6YE6l1D5AUZultIDiXjmej9vviPNsjCjGQQmp0U+ijTlx0N1IAczZJFCvDbt8kODjC/CnuuBgBMmnmCTLab7uQOykcQE1ZlJ5Vp3mE0C4u1JacLJgx3oROAf4EIa75VeLZIE4qeKWq25F2Kxfb2beuRCNwNhK0j8vCREvKi2rmUBv8MA27ITZNt9HE9KHN3/D4e4qg3223kKIoYoPqOlSVkir+vJtjRVWDLfg8Llx0XSVwa5GqXinKXHRYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vz0bMhHpxJUoSFVCk/GSxeOY1997LZSSPl48itKWPZY=; b=sqnyWxf9zeNAN4KOlTPvFxAkojffnPDt3AnQ+5K+fQouIukgyoEDiTrm9Th09NIExOddDq3IIAordIyTCr+Kmhd1KYdSQip/4Yj4G2akOB0VuD5aZNA0WNqQMymuplYfKSCkLIfbrFgYr/2QzvgFnhRHKeX1mu1MhyZ+Tw814xQ= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CY4PR1001MB2328.namprd10.prod.outlook.com (2603:10b6:910:4a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Wed, 1 Jun 2022 19:36:04 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::818c:10bf:c1b5:e224]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::818c:10bf:c1b5:e224%3]) with mapi id 15.20.5314.013; Wed, 1 Jun 2022 19:35:58 +0000 Thread-Topic: 26.3; Document customization of `delete-selection-mode' behavior in Emacs manual Thread-Index: Adh17sR/1RUrohIqSs64CaZDRHpYtA== Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4289b9d4-80af-4400-3d83-08da4405f3bc x-ms-traffictypediagnostic: CY4PR1001MB2328:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AK4vK2Y7zm0w9leu8QOmqSS/IxWn1o2RhC9LH99h3mvfvRctwj9MugDOGgKmDQ3+G4WWWxO2NYSseSPNGO9FHybaYru4aI1+NB2Gp25gOmv+2mX4uOm/LgGCfiSthQagZQBkicOwO5AzApkH3kp2l2MYSv0YtB5o55AjPKeN6fzO+X4jJ7X2iW3FNpDiPmk+ij4Oze2dwtkV7LZK2sYoXd82BR9/lp/AdBQeertFx8UIGotHzNKFE4Bcgi6cVxphpYoYtICiRHNYtF5x/LvjDEokImPLb60VXVbFDhel66ldzJ6WL0IvP8kpbQ8yViVEojY/mQh537CbmHMJYprbJVjpdILM5F3aROHt2CHMGfpD9uemHMbOJL1G58RAzApF31VAJ1bc2SmXQwA467TYVTgybcuyqcU2MHAbHzY0j3F7v/7/4+Q7Rfqe/emUtG2eOtywuC7p+XQfKT4I574Qlfp7P5bdxj6N+IQo+UzqHF6zFhsS1P0yQyoBUfpKuKgyMV2RglsVukBroc1EyppukJSOEx27uKFTe+/5gq1KHjL8uvECB6gv1zAIqYnKJ5OCoYmScg6cxpeN7GWTHXlJPgOpqYJkFFkIbN8Q9bpuwPcKyQs/ZbF3+ikfR9D9ttHIek8DHZVy/xcIi6FNRI7XMVBTUncQGuFc0Un5hkIeNrsP4IM7egbKFVk5qHTyx/ZJLhF0sQ6d7lDi58gdGU2KfrXzBtwZTiO9kCjd+NlGBMhfRvZvC7KviYSwMpWjT /SN8vZecg4+nAqGm7EIOiojyRBakNf2+h0EH5BJsATFA3nnApihJMbNeTp/wNOYsngW x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(2906002)(33656002)(86362001)(8936002)(966005)(186003)(38100700002)(44832011)(45080400002)(508600001)(5660300002)(122000001)(71200400001)(9686003)(7696005)(6506007)(26005)(76116006)(38070700005)(66946007)(8676002)(66556008)(316002)(66476007)(66446008)(64756008)(55016003)(6916009)(83380400001)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: f6IC4blBVlpbsBlM6kfQpF8uHbkR9k5TG43tuvXepja1l6xaNqAISNv0KtdSbu5O0Zqy4ovcY+uCBqfkGO/P5ok75IlL43IBbfveX+oCPj+A7UrDAwHhtrmAEdy3HWwjL2sya+IcYbf74G6zgvuenDwnDmpmKZcxs3VROl+sR/LW5OPEttjACF17SO0hjeLbaEt2ZJ9Njje51+Yyl6PXsDuNsFWDRnC3ev2rk+W7izSadLfzzlXQ2OY1YPqa8U0YXM7jQ/ujARmCzGMT4o/b80QXkpFcXlGNCbT0/Ja12o2Z+piKtLm15Jzn6LF2p185NkGqdNmoTCvvO/vL33elrA35whMQGZjnrDEXi5THMWkao+6c0X2Nw7V+NajCwL8mVx1hbJ6i9lwzNttEKoEw7NKMAOL8yDH5h+Kt9znD8J7yCiVWWVlkfXKx8fxu5Q40Rl9XOyqI8ltAK6BDCJOsa3QZgw+x/5bXnG9suf59qqfTLYDNjo8aHiA4ctLEnegMbjf8RBLJ8VjhX3pG0AnEhg8rnjbZ7nrwsJjlvhwfSCqGls+GtQz/YjOqRSh0OqCcvWIVJY7F2O5CiHxE1mlhXz+Pi612Ff5t4w+rrux0oSCc9k/vHOT5SL7n5P7RmrROwUlP5swjB22jy8wgJHoEXCLf4Q9lDyuc/8NId6j32TT6kBju1GQaNb54CGX8LNxE+2vKVJUSoAj94sGCHDjCDSoUAgRb4Om/4dspMGItRANxinonAFvMvj02EL 8Ag4yI3Rn1crRk+sNUyUgWrXYKfBNdT/ory5bjWyyCXDtrIDB5GA7VwFdoNKp0UbJeR/YT1yPvZ50u7x7Ly+FolWionyvqLP41 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4289b9d4-80af-4400-3d83-08da4405f3bc X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 19:35:58.0915 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XHZhCcg3AhHeLkrVC1NdzmrWczxHTl5kYgAes9BD+xktaurrxlIIHGGcHSesjmZyEjfchjF7kF3JLOJb1mpwaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1001MB2328 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.874 definitions=2022-06-01_07:2022-06-01, 2022-06-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206010081 X-Proofpoint-ORIG-GUID: h0mxd3wjwXqxa0FLl80jGOt30gpcM1F_ X-Proofpoint-GUID: h0mxd3wjwXqxa0FLl80jGOt30gpcM1F_ Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.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, RCVD_IN_MSPIKE_H2=-0.001, 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233508 Archived-At: Apparently (see bug #55692), starting with Emacs 29, some text is getting added to (emacs) `Using Region' to describe the use of new option `delete-selection-temporary-region', and that text touts the option as the/a way to "tune the behavior" of `delete-selection-mode'. Whether or not such text is added, the essential design of `deletion-selection-mode' should be documented: how to customize its behavior for individual commands. That's missing. The existing doc describes the behavior only partially - it describes only the default, replace-text behavior for, e.g., `self-insert-command'. Other commands have very different default behavior. More importantly, any command can have any of the predefined behaviors the mode provides, or even an arbitrary behavior. You don't get any `delete-selection-mode' behavior at all for a command unless it has property `delete-selection'. That's how essential this design is to understanding and customizing the mode. The mode does _not_ just replace selected text - even by default for some commands. Just put the kind of action you want on a command symbol as property `delete-selection'. There are basic, predefined actions, and you can define any other action you like. The doc says nothing about this, yet it's general, elegant, and easy-to-customize. `delete-selection-mode' doesn't have as its aim just to replicate behavior that you might be used to outside Emacs. The doc should make clear what it offers. See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55692#32. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.19044 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''