From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Updated proposal for DEL to delete active region Date: Sat, 22 May 2010 15:14:11 -0700 Message-ID: References: <87ljbbbzl1.fsf@stupidchicken.com><611EBC8A88E34310966D561E92C6B1B3@us.oracle.com><83zkzroj46.fsf@gnu.org><800971D1E7124B2CA4885E0242798264@us.oracle.com> <871vd3mx9z.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274566502 8228 80.91.229.12 (22 May 2010 22:15:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 May 2010 22:15:02 +0000 (UTC) To: "'David Kastrup'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 23 00:15:00 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFwyC-0002kM-2u for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 00:15:00 +0200 Original-Received: from localhost ([127.0.0.1]:41751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFwyB-00011I-8t for ged-emacs-devel@m.gmane.org; Sat, 22 May 2010 18:14:59 -0400 Original-Received: from [140.186.70.92] (port=57566 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFwy2-0000zs-9l for emacs-devel@gnu.org; Sat, 22 May 2010 18:14:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFwxz-0003Hb-73 for emacs-devel@gnu.org; Sat, 22 May 2010 18:14:48 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:38038) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFwxy-0003HP-UH; Sat, 22 May 2010 18:14:47 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4MMEiY0012090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 22 May 2010 22:14:45 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4MLuRHs023758; Sat, 22 May 2010 22:14:43 GMT Original-Received: from abhmt020.oracle.com by acsmt353.oracle.com with ESMTP id 259954611274566431; Sat, 22 May 2010 15:13:51 -0700 Original-Received: from dradamslap1 (/10.175.220.217) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 22 May 2010 15:13:50 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <871vd3mx9z.fsf@lola.goethe.zz> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Thread-Index: Acr591wL1x2aNR63Tpira9VrgS6AdAAADFMA X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090207.4BF85755.0145:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125087 Archived-At: > >> Why not just attach a property to any existing command > >> symbols that you want to become sensitive to this new > >> feature? That's the way `delete-selection-mode' does > >> this sort of thing. > > You could read up on the corresponding discussion. Tying special > behavior to symbols rather than functions is a bad idea. I read the discussion at the time. Hard-coding behavior the way that was proposed is a worse idea. With the proposal, any command that you might want to use in place of the new `delete-(back|for)ward' commands will need to hard-code the same behavior they have in order to take account of the new option `delete-deletes-active-region'. IOW, the proposal would purportedly add flexibility by having an option to define the alternative behaviors, but overall it would take away flexibility by hard-coding the behavior that makes use of that option. The option is made-to-order for those two new commands, and vice versa. Nothing flexible about it. That option-respecting behavior should be factored out and made easily applicable (attachable, hookable, whatever) to any command you like. If you do not like the mechanism for such loose and easy coupling to be simply putting a property on a command symbol - (put 'delete-char 'delete-selection 'supersede), then provide another simple and elegant mechanism. What's your proposal - defadvice? Hard-coding the behavior and replacing (only two of) the existing char-deletion commands is not the answer. (When can we expect the same approach to be used to transform thingatpt.el?)