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: Wed, 8 Oct 2008 09:55:27 -0700 Message-ID: <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 1223485970 11240 80.91.229.12 (8 Oct 2008 17:12:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 17:12:50 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 08 19:13:46 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 1KncZB-0004QK-1u for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 19:11:17 +0200 Original-Received: from localhost ([127.0.0.1]:55037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KncY7-0001rj-1F for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 13:10:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KncY2-0001qg-8U for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 13:10:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KncXz-0001pa-B0 for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 13:10:05 -0400 Original-Received: from [199.232.76.173] (port=53853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KncXz-0001pV-6J for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 13:10:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38807) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KncXx-0003CY-1Y for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 13:10:02 -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 m98H9vHc027840; Wed, 8 Oct 2008 10:09:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m98H54gG026739; Wed, 8 Oct 2008 10:05:04 -0700 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 08 Oct 2008 17:05:04 +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 submit@emacsbugs.donarmstrong.com id=B.122348498524634 (code B ref -1); Wed, 08 Oct 2008 17:05:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 8 Oct 2008 16:56:25 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m98GuL0r024628 for ; Wed, 8 Oct 2008 09:56:22 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KncKj-00042e-FH for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 12:56:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KncKi-00042G-Te for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 12:56:20 -0400 Original-Received: from [199.232.76.173] (port=60815 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KncKi-00042D-JC for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 12:56:20 -0400 Original-Received: from mout.perfora.net ([74.208.4.196]:54297) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KncKi-0007TT-N7 for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 12:56:20 -0400 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-1KncKf3LcU-0001eE; Wed, 08 Oct 2008 12:56:19 -0400 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX18NHSwyZR/2/H7lapxePZS0p004XwpuvVB8kyS rg9d9xV7o9OdcQA4seiEUCgsq/Ap0Y2UWSWRymtpkWSJ4pgcUH mCSbJ86EEAarFXFercQrg== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 08 Oct 2008 13:10:05 -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:21288 Archived-At: according to delete-selection-mode's header file, elisp code that =20 insert text that wants to respect delete-selection-mode should set =20 the symbol's delete-selection property to true. However, this works only when the command is called by a keyboard, =20 not by M-x. This appears to be a bug? Example for reproduction: (defun insert-date () "Insert current date." (interactive) (insert (format-time-string "%Y-%m-%d")) ) (put 'insert-date 'delete-selection t) then call M-x insert-date, and it'll not replace text selection. (PS thanks to Drew Adams and Chetan on gnu.emacs.help) Xah =E2=88=91 http://xahlee.org/ =E2=98=84=