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.devel Subject: Change default behavior of some commands that act on region? Date: Fri, 21 May 2021 20:58:48 +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="17480"; mail-complaints-to="usenet@ciao.gmane.io" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 21 22:59:58 2021 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 1lkCFS-0004MI-5C for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 22:59:58 +0200 Original-Received: from localhost ([::1]:56978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkCFR-00047M-7o for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 16:59:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkCER-0003IV-IV for emacs-devel@gnu.org; Fri, 21 May 2021 16:58:55 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:36764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkCEP-00085Y-F4 for emacs-devel@gnu.org; Fri, 21 May 2021 16:58:55 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14LKeOeE156490 for ; Fri, 21 May 2021 20:58:52 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-2020-01-29; bh=KSGKWLZDx/359d8xVMsYPaZqIr0QauX1Qw8tl/SxJ+Y=; b=UofJcvBxXJG2+ovltXsRgFcXG2mSRerOtWI17cmkPjt49PneUbQzvWZandVAZWO09YRU LwRu13WVZimogcWV0iTgxoJXcAr8WvxNvxSpujgWkBRGwKBubFphN2RLBM96FK5K4gpf 4RaX2fk8guqK3CNyBPCSps4QiSrf8gP3QV4oVDmCDw95Go0QzZ+y2phh4rE++/SizpeK wpldpG99u6I+ARyI1zILKps9BlC4NTP6zLBI72xA/GUEjDZ/yj+fsyQbdZAUBau5mN0X 19w6N6zyR86qkSf9YsMnVKMkQzPyh9FL6nekafPgx+ovKIHolzsde4KtkEq2uGpTGRMB +Q== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2130.oracle.com with ESMTP id 38j3tbru50-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 21 May 2021 20:58:51 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14LKeMuU170246 for ; Fri, 21 May 2021 20:58:51 GMT Original-Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2048.outbound.protection.outlook.com [104.47.51.48]) by aserp3020.oracle.com with ESMTP id 38nry3t6m8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 21 May 2021 20:58:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kXdYjrs/8xfOi179jGqOZt0wwGp/VjAHaAB5+G9Fu+hT5sfKR4B7CH8EoCpYNVN5pzMLuuZam10OCH9tE2zEj2z3JJRwjB9J0CbrjXI52+PS+QTz3QmeiNZvZZ49UoIYggTVdyPj5Bto2Q7RuvruhVKgLwyF0kbgZeVPrSdD/pofH6+P6BKE28MU7XoWqr3zvIDJqnRJ1+77saIJm7DMDp0rJx3UfwkThk4zHV/cjqDLyWO+KM0e6yQ5yF3uCCS/5eZ+lVQlyx9LqTdWOq9fDQdfFv8tRH0DwK6vh9fkn3glXEUGG3/3sObcY0qMn5z1xsdIYbdeNvCBCptiA0yCBg== 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-SenderADCheck; bh=KSGKWLZDx/359d8xVMsYPaZqIr0QauX1Qw8tl/SxJ+Y=; b=X9j/3fOajYQupW3wfexIokBSTk9EFJ0VDZUcbaUfgoRBFPNOHNIqmFoAwKRqe3OhyB4EB/dg5OEvjrJWpUX2ZtyCFyZZbaVu7O4OTEZcdd11dQnB1PKOzoATAgzBI4ZufW1RIUEGirZ/cVFQuPV89cUf5cbVaZsMwzqxkD9mr9Vp/8Cy/sAKQDpD/aI+bBN2iRJm7+Ng4s0dgj9/ktcupNMzLegyVP2PeopLrJ0HfDvB4/DEj7VRdx9Zpla2rVdSeyQaABEowa5OufC3q4jcsON1JSA41j/ZS1tZvDrXd08FsXfYY2wV0D0pjdB0Us6iuZWgAEWQCvU7hTvTsSqQjg== 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=KSGKWLZDx/359d8xVMsYPaZqIr0QauX1Qw8tl/SxJ+Y=; b=D0X06zdV6qlPI5NqPMKH95YaYADK1+IHrFO/YRodYrr2u4OQyT9cl5MPJQDtNGV1feqrWzY1abk1/cp6O1iZ8Xz5A67p7OQpkEGAeIZLfbMJybYhN8Y0MQ7oBvnGSrDdDvsCCOVhMkkLExgGsmVk4SCttoa4INLDosQ+dizf/Qk= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4507.namprd10.prod.outlook.com (2603:10b6:806:119::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Fri, 21 May 2021 20:58:48 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4150.026; Fri, 21 May 2021 20:58:48 +0000 Thread-Topic: Change default behavior of some commands that act on region? Thread-Index: AddOgj9jmbCPuskvSDmMk5TwAnSeOQ== Accept-Language: en-US Content-Language: en-US authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a86144b9-9796-447e-b579-08d91c9b3b03 x-ms-traffictypediagnostic: SA2PR10MB4507: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2ejkOZZzatka3qrwi+EVZPuGigbPIT3Xs/1nyNs52GmZC6tqYR5uSUmNGVBjgE2Kf9wg8h4LoROVLFVV4quEozqgFjhpLAedDa9Yg7EwHI+gZZiqLE0JuIb+8YhdxkJ7R0mbFdKHV6kiniBdYsu+gNmmIiY8ZUpNeyQiQNxuEERkyjBuo1ibt0Qug30xW8eu49o/h/zs5WQ1SBT5CWHAZgw6glOTGW5WIxETxmRyv/U1oOsERTL80RnUHBZk6ZM6gqHW0fer0hszD002cOc4Ancq/0wqlh7XGdDkpMRm3MYIQ2FccVfWwesNtGESBTxRSYzXsuOPuwcUEsyDpYNwxuY0iW8iU7cGK1/a/PdtSLJuO2xVentymwL34s+oIBth/6MD6+xitknkS0ET4vFQb3ePSaZ8p+5RkgmMyBxGQqae9cLTESeiCjIhl9Nr6D310CBDWhV2/xqwiIRcF/I2UhaNZgkTVU48bn5p+ZFQcdpnKQhu1i8EcV0DChembZbzkCmileR2j6bZ7zjHLGxmvsylxqv3KbGbeEtgSEENMAjeuh3gelkmVU95sHfcvoj+pRSNAQDQVD0jSJ+jS3dpAly5d4f/E8qeV6Ev3ec9sYOkpK0/bJQWsxm+E7dL6T1hkUlymngykfIP+Vs10XMpo0tMeRGZcgQQbeted/uA1u0+YhMu80aN+Vfg05dYYfhJgJmPN6rwjvDiEB63RdmtSg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(39860400002)(366004)(376002)(396003)(346002)(33656002)(316002)(6506007)(38100700002)(2906002)(7696005)(83380400001)(122000001)(66556008)(66476007)(8936002)(64756008)(66946007)(86362001)(55016002)(9686003)(44832011)(26005)(76116006)(71200400001)(66446008)(966005)(186003)(8676002)(478600001)(6916009)(5660300002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?oeR29u/vq3eJiqprx/Ixh4rvCZAwxJ61VnWhHS2l0yLIfrCXZWRop9C4yoj8?= =?us-ascii?Q?TSChONTxtMR3MlLJZh5tuazXqOAEnmRMSJwQ1ecQnmoPv41yXw2SSRQ7fvlB?= =?us-ascii?Q?FEBGa588KlDR/1nLmlYHngne81rsbz5nEIsAwKL04fqK/LMaRgwqOI6/Rg7K?= =?us-ascii?Q?L4oJsR8x/W9F17WSLW4I5Ncwfl26zt9HcD6z7nQAclgCaFUCm0LV6SnBjOql?= =?us-ascii?Q?bQ6RK0dsgnfpqht46N3GWdqQSBWNxEaAu65ryHvk/OIi55UuF0RSxkF2Fg+d?= =?us-ascii?Q?5StPy7VX0mrZnQUJjTm/nPOv5EjV9nbm0o7uOYB4bWA1ruZ9HhgKPbhN7QSE?= =?us-ascii?Q?iY/Pu9r/NGp8GaFJAfXDEh1Xhe9LN/Xid/7HdJ1GrEUO00I8o6eEpvaqmwxI?= =?us-ascii?Q?BDtzWN84swDPg2Z6yBGB5cLqBpShIT47RFnBtRLJxnwvG00agSCnBbKjClXh?= =?us-ascii?Q?+P4ylO23fjcK1D+FqPcSzER6lD0EY/8r8CCXmxfWUbNIV7/ka1+uEf1DWCmP?= =?us-ascii?Q?xb9b+Dp7duiJCnKMW3FAOOCieiwHZ2T0oAyyFd+D4GQXIZb7gUNk1SdMBJ1r?= =?us-ascii?Q?y/yPiKLe98aLobGlPQfGUsXAejvgLL95GEWY6YkyB7xBxckTojfhVgDdEqiy?= =?us-ascii?Q?9lfI x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a86144b9-9796-447e-b579-08d91c9b3b03 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2021 20:58:48.4367 (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: 5SljDVxsGKiJVPBB5Yzx9yYy6Dr2nb5MuWYCt0hXp7G3T5fkQWjW2BmjuNFSjTdhq0W7TxBiPi3nHzDqG63qqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4507 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9991 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=376 adultscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105210113 X-Proofpoint-ORIG-GUID: WHz-PQdzdemYGp_gP8jFt1OTtkUzoBib X-Proofpoint-GUID: WHz-PQdzdemYGp_gP8jFt1OTtkUzoBib X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9991 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=680 mlxscore=0 impostorscore=0 adultscore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105210113 Received-SPF: pass client-ip=141.146.126.79; envelope-from=drew.adams@oracle.com; helo=aserp2130.oracle.com 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, SPF_HELO_PASS=-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.23 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" Xref: news.gmane.io gmane.emacs.devel:269580 Archived-At: This is a follow-up to this post to help-gnu-emacs@gnu.org: https://lists.gnu.org/archive/html/help-gnu-emacs/2021-05/msg00762.html I hesitate to suggest changing default behavior, but maybe this is worth considering. There are some commands, such as `downcase-region', that act on the region regardless of whether it's active. Because `transient-mark-mode' has been on by default for quite a while now, and because there are few such commands, users can wonder what's going on. Or worse, they can sometimes not notice that anything happened until much later, and then not understand what caused the change (whatever it is). Would it be too shocking to change the default behavior of some such commands, so that they would do something "safer"? For example, when invoked interactively, if the region is not active, and if `transient-mark-mode' is turned on, such commands could do something like: * be a no-op * raise an error * prompt for confirmation first Those conditions are important: There'd be no change when invoked from code, or when `transient-mark-mode' is off. Anyone who leaves that mode off would see no change in behavior, and the same for existing Lisp code.