From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xah lee Newsgroups: gmane.emacs.bugs Subject: bug#1120: issues on (put 'insert-date 'delete-selection t) Date: Thu, 9 Oct 2008 00:45:10 -0700 Message-ID: <6ECA96C2-0CF2-47B2-82EE-3B6490ED6486@xahlee.org> References: <51DE3BC4-A565-472C-90A5-028B38C523BC@xahlee.org> Reply-To: xah lee , 1120@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1223539916 29297 80.91.229.12 (9 Oct 2008 08:11:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 08:11:56 +0000 (UTC) Cc: 1120@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 10:12:42 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Knqc7-0002M0-PB for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 10:11:16 +0200 Original-Received: from localhost ([127.0.0.1]:53337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knqb3-0006fG-G5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 04:10:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Knqaz-0006fB-OT for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2008 04:10:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Knqav-0006ey-91 for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2008 04:10:04 -0400 Original-Received: from [199.232.76.173] (port=37896 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knqau-0006eu-Sb for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2008 04:10:00 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:24849) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Knqau-0002hh-Kh for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2008 04:10:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Knqat-0000ZJ-JY for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2008 04:09:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9989vlT024533; Thu, 9 Oct 2008 01:09:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m997t6AB020416; Thu, 9 Oct 2008 00:55:06 -0700 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 09 Oct 2008 07:55:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1120 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1120-submit@emacsbugs.donarmstrong.com id=B1120.122353838218981 (code B ref 1120); Thu, 09 Oct 2008 07:55:05 +0000 Original-Received: (at 1120) by emacsbugs.donarmstrong.com; 9 Oct 2008 07:46:22 +0000 Original-Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m997kGTT018965 for <1120@emacsbugs.donarmstrong.com>; Thu, 9 Oct 2008 00:46:17 -0700 Original-Received: from [192.168.1.2] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0MKp8S-1KnqDk23YN-0001oB; Thu, 09 Oct 2008 03:46:09 -0400 In-Reply-To: X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX18WZ1rfxOSZYzcdOhO25aoth1Ks7vKyPTb/WNL cLsV4tnbuuzEIGpU0KsdoYlwz91xWcn9GUhGbDFCvWI4gJ6xKV 4af0eSmHBmEaCq8lgowuQ== X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Resent-Date: Thu, 09 Oct 2008 04:10:04 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21315 Archived-At: Interesting point. For elisp programers who wish to write extentions where the command's =20= behaviors change depending on whether user has delete-selection-mode =20 on, what should they do? Check for mark-active and delete-selection-=20 mode before any call to the insert function? also, the current behavior seems to introduce a complexity, where =20 command behaves differently depending on whether it is invoked by a =20 keybinding or by M-x. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Oct 8, 2008, at 7:59 PM, Richard M. Stallman wrote: according to delete-selection-mode's header file, elisp code that insert text that wants to respect delete-selection-mode should set the symbol's delete-selection property to true. However, this works only when the command is called by a keyboard, not by M-x. This appears to be a bug? It's intentional. This feature implements expectations that users have for single-character editing operations in other editors, where those commands don't have names and there's nothing like M-x. So there's no reason why M-x should delete the region. It is better for M-x just to call the function. =E2=98=84