unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* isearch doesn't seem to set mark where search began
@ 2004-10-02 16:34 Drew Adams
  2004-10-02 20:15 ` Juri Linkov
  2004-10-03 14:32 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2004-10-02 16:34 UTC (permalink / raw)


>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'

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-04 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-02 16:34 isearch doesn't seem to set mark where search began Drew Adams
2004-10-02 20:15 ` Juri Linkov
2004-10-04 15:19   ` Richard Stallman
2004-10-03 14:32 ` Richard Stallman
2004-10-03 17:35   ` Drew Adams
2004-10-04 15:20     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).