all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <larry.camilli@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: How to stop emacs from moving marks I set
Date: Wed, 29 Aug 2012 09:34:09 -0700	[thread overview]
Message-ID: <ED2A7262B60F441C92A78AC83848998D@us.oracle.com> (raw)
In-Reply-To: <05c8263f-b9e7-4782-ac8a-4a47e64df00c@googlegroups.com>

> I often like to set a mark (with C-@) and then move the 
> cursor to another location to, say, cut a section of text.
> 
> Under certain circumstances, when I use search (C-s) to move 
> the cursor, and then move the cursor a bit more (with, say 
> arrow keys), emacs moves the mark to where the search started 
> ("Mark saved where search started").
> 
> 1. Is there a way to get emacs to leave the mark where I 
> explicitly set it?
> 
> 2. Under what circumstances does emacs decide to ignore the 
> mark that I set explicitly and set its own mark?
> 
> 3. By what logic does this editor allow the user to set a 
> mark and then ignore that setting?

Your mark is not removed or moved.  It is "ignored" only in the sense that it is
no longer the most recent marker, since, yes, Isearch does set the mark at the
search start position.  It does this because it is very convenient to use `C-x
C-x' to get back to that starting point.

You can use `C-u C-SPC' to pop back to the previous marker.  Repeat to move
backward in the mark history.  This is general for Emacs (not specific to
search): markers are kept in a history (a ring), which you can cycle through to
navigate among marked positions.

See also these pages wrt Isearch:

http://emacswiki.org/emacs/IncrementalSearch#toc6
http://emacswiki.org/emacs/IsearchOtherEnd
http://www.emacswiki.org/emacs/IsearchPlus#Isearch%2b 
(for the last one, see option `isearchp-set-region-flag', Isearch key `C-SPC' to
toggle that option, and command `set-region-around-search-target')





  reply	other threads:[~2012-08-29 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 16:13 How to stop emacs from moving marks I set larry.camilli
2012-08-29 16:34 ` Drew Adams [this message]
2012-08-30  8:49 ` Barry Margolin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED2A7262B60F441C92A78AC83848998D@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=larry.camilli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.