From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: (insert ...) won't respect delete-selection-mode Date: Thu, 9 Oct 2008 14:27:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <1223460628.620979@arno.fh-trier.de> <1223500491.534035@arno.fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1223588539 16363 80.91.229.12 (9 Oct 2008 21:42:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 21:42:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 23:43:16 2008 Return-path: Envelope-to: geh-help-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 1Ko3Hr-0004AJ-Nq for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 23:43:12 +0200 Original-Received: from localhost ([127.0.0.1]:42899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ko3Gn-0002uj-Lh for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 17:42:05 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!t39g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1223587656 541 127.0.0.1 (9 Oct 2008 21:27:36 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 9 Oct 2008 21:27:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t39g2000prh.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163296 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58640 Archived-At: In this thread: =C2=AB(insert ...) won't respect delete-selection-mode Options=C2=BB =C2=AB(put 'insert-date 'delete-selection t)=C2=BB =C2=ABThe command also needs to be activated with keyboard. M-x does not do it.=C2=BB =C2=ABDoesn't this look like a delicate problem? Maybe a bug?=C2=BB I reported this to FSF. http://groups.google.com/group/gnu.emacs.bug/browse_frm/thread/ba8ab4a52235= 91b7 Richard M Stallman wrote: =C2=ABIt'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.=C2=BB Xah Lee wrote: =C2=ABInteresting point. For elisp programers who wish to write extentions where the command's behaviors change depending on whether user has delete-selection-mode on, what should they do? Check for mark-active and delete-selection- mode before any call to the insert function? also, the current behavior seems to introduce a complexity, where command behaves differently depending on whether it is invoked by a keybinding or by M-x. =C2=BB Richard wrote: =C2=ABIf you really want to make behavior depend on those variables, you need to check them. Whether you check them before or after calling `insert' is up to you. But that seems like a strange thing to do.=C2=BB Doh! I failed humanity. Xah =E2=88=91 http://xahlee.org/ =E2=98=84