[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

isearch doesn't seem to set mark where search began

From: Drew Adams
Subject: isearch doesn't seem to set mark where search began
Date: Sat, 2 Oct 2004 09:34:51 -0700

>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

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

FYI, I use transient-mark-mode, but the remark is independent of this.


In GNU Emacs (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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]