From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: isearch doesn't seem to set mark where search began Date: Sat, 2 Oct 2004 09:34:51 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1096734937 19910 80.91.229.6 (2 Oct 2004 16:35:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Oct 2004 16:35:37 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 02 18:35:25 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CDmqz-0004IS-00 for ; Sat, 02 Oct 2004 18:35:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CDmxT-0005nW-VI for ged-emacs-devel@m.gmane.org; Sat, 02 Oct 2004 12:42:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CDmxE-0005jS-Vq for emacs-devel@gnu.org; Sat, 02 Oct 2004 12:41:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CDmxE-0005ix-2A for emacs-devel@gnu.org; Sat, 02 Oct 2004 12:41:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CDmxD-0005in-VP; Sat, 02 Oct 2004 12:41:51 -0400 Original-Received: from [148.87.2.204] (helo=inet-mail4.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CDmqX-0000g6-TV; Sat, 02 Oct 2004 12:34:58 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.191.10]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i92GTX5u027226; Sat, 2 Oct 2004 09:29:34 -0700 (PDT) Original-Received: from rgmgw1.us.oracle.com (localhost [127.0.0.1]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i92GYsUC028453; Sat, 2 Oct 2004 10:34:54 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-81-110.vpn.oracle.com [141.144.81.110]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id i92GYrKS028445; Sat, 2 Oct 2004 10:34:53 -0600 Original-To: "Help-Gnu-Emacs" , "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27801 gmane.emacs.help:21009 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27801 >>From Info, node Incremental Search: "When you exit the incremental search, it sets the mark to where point _was_, before the search. That is convenient for moving back there. In Transient Mark mode, incremental search sets the mark without activating it, and does so only if the mark is not already active." However, this is not the case if you end via Control-g. The doc should be corrected - or, better, the product changed to set mark _if different from point_ no matter how the search ends. Why is this important? A lot of folks are doing this now: (add-hook 'isearch-mode-end-hook 'my-goto-match-beginning) (defun my-goto-match-beginning () (when isearch-forward (goto-char isearch-other-end))) If you end with Control-g, point is left at the beginning of the last find. You would like to be able to do C-x C-x to return to the search start. If you end with, say, RET or C-b, no problem. The behavior should consistently set mark at the search start point, provided point is different. FYI, I use transient-mark-mode, but the remark is independent of this. -----------8<--------------------------------------------- In GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600) of 2004-07-26 on BERATUNG4 configured using `configure --with-gcc (3.3) --cflags -I../../jpeg-6b-1/include -I../../libpng-1.2.4-1/include -I.. /../tiff-3.5.7/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.1.4-1/in clude'