From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Wed, 18 Jul 2012 06:55:36 -0700 Message-ID: <23B93A33CBB6419F9DA18F520F1A9759@us.oracle.com> References: <87ipdqx6e4.fsf@gnu.org><87a9z19jgj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342619829 12213 80.91.229.3 (18 Jul 2012 13:57:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 13:57:09 +0000 (UTC) Cc: 'Chong Yidong' , 11520@debbugs.gnu.org To: "'Stefan Monnier'" , "'Simon Law'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 15:57:08 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrUkT-000682-SB for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 15:57:06 +0200 Original-Received: from localhost ([::1]:43584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrUkT-0008TW-8O for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 09:57:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrUkQ-0008TQ-7K for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 09:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrUkK-0002HF-Aq for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 09:57:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrUkK-0002H7-70 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 09:56:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SrUqD-00033D-JL for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 10:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2012 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11520 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11520-submit@debbugs.gnu.org id=B11520.134262013011653 (code B ref 11520); Wed, 18 Jul 2012 14:03:01 +0000 Original-Received: (at 11520) by debbugs.gnu.org; 18 Jul 2012 14:02:10 +0000 Original-Received: from localhost ([127.0.0.1]:48547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrUpO-00031u-2T for submit@debbugs.gnu.org; Wed, 18 Jul 2012 10:02:10 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:20848) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrUpL-00031m-6g for 11520@debbugs.gnu.org; Wed, 18 Jul 2012 10:02:08 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q6IDtxZr025283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Jul 2012 13:56:00 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q6IDtwFN025356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Jul 2012 13:55:59 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q6IDtwqW007692; Wed, 18 Jul 2012 08:55:58 -0500 Original-Received: from dradamslap1 (/10.159.216.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 18 Jul 2012 06:55:57 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1k3vwtUchVCRxWQISPnzh9Ps9+SgACz3Mw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62102 Archived-At: > I don't much like delete-selection-mode because of its > implementation strategy (using a pre-command-hook along with > symbol properties, as opposed to modifying the commands > themselves). I can fully understand why it was done this > way, but I'd be happy to see it changed, along the > same lines as what we did for the shift-select-mode. FWIW, I am not enthused by that prospect. > AFAICT, of the various `delete-selection' properties, `kill' is only > used for `open-line' (for no good reason) and could be eliminated. > `supersede' is only used by command which should obey > `delete-active-region' or close enough, `yank' is only used > for commands which end up calling `yank' (so adding code to the > `yank' command would cover them), and t is used for commands > which end up calling `self-insert-command' (with a few minor > exceptions like open-line). Delete-selection mode is not only for use by end users out of the box with vanilla Emacs. It is especially designed to be easy to use to adapt code, modes, and general interactive behavior, for both users and other libraries. In this respect it is similar to the general programming functionality provided by thingatpt.el. It would be short-sighted to look only to how the existing code uses thing-at-point features and ignore how they can be (are designed to be) used more generally. Same with delete-selection mode. When will Emacs Dev stop looking only to the existing vanilla code that is distributed to determine the "only" uses of some existing functionality. That last paragraph of yours is a classic: feature A seems only to be used for X,Y,Z in the Emacs code, so let's simplify things by amputating the feature and hard-coding its uses into the existing code. The design of delete-selection mode is for its potential uses, not just its existing uses in the current code that you maintain. Such proposed amputation is like looking at how the character `(' is actually used in one file and proposing to change the possibility to use it more generally, limiting it to its uses in that one file. Just one opinion - from a longtime delete-selection mode user and someone who has also used it in programming. (Likewise thing at point.)