unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: `inhibit-mark-movement'
Date: Wed, 8 Dec 2004 17:40:48 +0200	[thread overview]
Message-ID: <200412081740.48280.pogonyshev@gmx.net> (raw)
In-Reply-To: <871xe1trnq.fsf-monnier+emacs@gnu.org>

Stefan Monnier wrote:
> > In other words, I'd like these two scenarios be possible
> > simultaneously (in Transient Mark mode):
> >
> >     1. Select text from point to the end of function: C-SPC C-M-e
> >
> >     2. Glance at buffer beginning and go back: M-< C-u C-SPC
>
> I don't understand: just turning on transient-mark-mode, I get exactly
> this behavior.  No need to fiddle with inhibit-mark-movement.
> What am I missing?

Sorry, the first scenario is wrong.  It should read this way:

	1. Select text from point to somewhere else: C-SPC C-M-e / C-n...
	   where C-M-e and C-n (or something similar) can be mixed.

What I'm trying to suggest is that commands should not modify active mark
in Transient Mark mode _by side effect_.  Commands like M-h are fine to
modify mark, because they _activate_ it.  If command is not meant to
activate mark and the mark is active, the command should not touch it at
all, because I activated mark exactly where I wanted it to be.  If the
mark is inactive, commands can alter it, because this is not intrusive
for Transient Mark mode users and is useful for popping to previous mark
positions.

Juri Linkov wrote:
> I already encountered the same problem some time ago.  I fixed it as
> below and really like this.  It makes use of transient-mark-mode
> more natural: the mark should not be changed when it is active.
> If there is a need to set a new mark when the mark is already
> active, it's possible to deactivates the current region with C-g,
> and set a new mark.

I didn't try your patch, but looks like it implements exactly what I'm
trying to explain.  Except that I proposed to make this behaviour
optional.  However, this behaviour seems much more natural to me, so
maybe customization is not necessary if we don't mind surprising a few
users.

Juri Linkov wrote:
> > I'd like these two scenarios be possible simultaneously (in
> > Transient Mark mode):
> >
> >     1. Select text from point to the end of function: C-SPC C-M-e
> >
> >     2. Glance at buffer beginning and go back: M-< C-u C-SPC
>
> You can achieve the desired result with 3 more keys:
>
>  1. Select text from point to the end of function: C-SPC C-M-e
>
>  2. Glance at buffer beginning and go back: C-g M-< C-u C-SPC C-x C-x
>                                             ===               === ===

Yes, you are right, but I meant "simultaneously" in that sense that
I don't want to evaluate `(setq inhibit-mark-movement ...)' before
realization of either of scenarios.

Paul

  reply	other threads:[~2004-12-08 15:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08  0:56 `inhibit-mark-movement' Paul Pogonyshev
2004-12-08  3:08 ` `inhibit-mark-movement' Stefan Monnier
2004-12-08 15:40   ` Paul Pogonyshev [this message]
2004-12-08 16:59     ` `inhibit-mark-movement' Stefan Monnier
2004-12-08 17:59     ` `inhibit-mark-movement' Juri Linkov
2004-12-08 19:22       ` `inhibit-mark-movement' Stefan Monnier
2004-12-09  1:48         ` `inhibit-mark-movement' Juri Linkov
2004-12-13 19:51           ` `inhibit-mark-movement' Richard Stallman
2004-12-13 23:17             ` `inhibit-mark-movement' Stefan Monnier
2004-12-14 10:55               ` `inhibit-mark-movement' Juri Linkov
2004-12-14 11:24                 ` `inhibit-mark-movement' Stefan Monnier
2004-12-17 16:11         ` `inhibit-mark-movement' Juri Linkov
2004-12-20 10:56           ` `inhibit-mark-movement' Richard Stallman
2004-12-08  3:29 ` `inhibit-mark-movement' Juri Linkov
2004-12-08  3:46 ` `inhibit-mark-movement' Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200412081740.48280.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=emacs-devel@gnu.org \
    /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 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).