From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: delete-selection-mode as default Date: Sun, 9 Sep 2018 07:48:05 -0700 (PDT) Message-ID: References: <83k1nxvm5j.fsf@gnu.org> <877ejxsm18.fsf@toy.adminart.net> <874lf0oul4.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1536504443 27490 195.159.176.226 (9 Sep 2018 14:47:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2018 14:47:23 +0000 (UTC) Cc: hw@adminart.net, cpitclaudel@gmail.com, lokedhs@gmail.com, emacs-devel@gnu.org To: rms@gnu.org, charles@aurox.ch Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 09 16:47:18 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz0ze-00073r-Lx for ged-emacs-devel@m.gmane.org; Sun, 09 Sep 2018 16:47:18 +0200 Original-Received: from localhost ([::1]:47656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz11l-0004tR-8a for ged-emacs-devel@m.gmane.org; Sun, 09 Sep 2018 10:49:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz10k-0004Qw-5S for emacs-devel@gnu.org; Sun, 09 Sep 2018 10:48:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fz10g-0001PT-Q0 for emacs-devel@gnu.org; Sun, 09 Sep 2018 10:48:26 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:49600) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fz10g-0001Nl-DB; Sun, 09 Sep 2018 10:48:22 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w89El5N1140758; Sun, 9 Sep 2018 14:48:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=yZrkzm7FYRWhDwl/r2Lj3eTXC5LLqYYI3Jwp7pI0rvE=; b=JIA/JLG6jqu6IRT0ml3e9L0ZR1heyJaagkPa/POzPR/2T/mswiq0Ldnt+FBvwP7DT0vU RaxpUGSn5PR1A3MrFxtxSfYfyncB4BjAymfzlplrTsarDfINNzKZCgRGgxjlv8sZ66j4 5cnHETq0QUIVE/NK24ozNZTfzpnKmn7XAYH8RQhaSfT+3b85+iFwtauulfQdEB5AVLni Hdn1y8SDSmVKKKbd7oc4GfB+UL1fBbdh/EDvmlmJUBL5EcY26pT/yJARSf5tRuWPbcQO eKjx6O6b8VOa51pQTR0diqSupD0PCxxp8xwIymRPI2I91HiLCKTCoJ5dRH98tmbdiFzr Yg== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2mc72qafjd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 09 Sep 2018 14:48:13 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w89Em8MK027072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 9 Sep 2018 14:48:08 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w89Em66f013852; Sun, 9 Sep 2018 14:48:06 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9011 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809090162 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229560 Archived-At: > > > How come it wasn't distinguished between the concept of a region be= ing > > > active and the visual aid of marking a region? >=20 > > Separating these two concepts could be useful, but Emacs would then > > need some other way of showing the user that a region is active, like > > a mode line indicator. >=20 > We could have another minor mode to control whether Backspace deletes > an active region. That would solve the problem for me. We would still > have the issue of what the default should be. 1. The behavior you object to here does not come from `d-s-m'. (I guess you realize that, since you see the behavior and you don't turn on `d-s-m'.) It comes from option `delete-active-region': ----8<------ delete-active-region is a variable defined in `simple.el'. Its value is t Documentation: Whether single-char deletion commands delete an active region. This has an effect only if Transient Mark mode is enabled, and affects `delete-forward-char' and `delete-backward-char', though not `delete-char'. If the value is the symbol `kill', the active region is killed instead of deleted. You can customize this variable. This variable was introduced, or its default value was changed, in version 24.1 of Emacs. ----8<------ So you don't need another mode, to get what you want; just customize that option. 2. Wrt `d-s-m', you can easily configure `d-s-m' to do what you want for any given command. For example, if you were seeing the behavior that you dislike here because `d-s-m' was turned on (and not because of `delete-active-region') then you could just tell `d-s-m' not to do anything for the command that you have bound to . All you need to do, to make `d-s-m' do nothing for a given command, is to set the `delete-section' property on that command's symbol to nil. E.g., if `d-s-m' was the culprit in the behavior you object to here, and if was bound to `delete-backward-char', then you would just do this: (put 'delete-backward-char 'delete-selection nil)