emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-selection-mode as default


From: Drew Adams
Subject: RE: delete-selection-mode as default
Date: Tue, 11 Sep 2018 17:13:32 -0700 (PDT)

> > But we should also offer a command that just activates the region,
> > nothing more. By default that would be unbound (or at most bound
> > to something other than `C-x C-x').
> 
> This is an interesting idea.  Often there is need to type C-x four(!) times:
> first `C-x C-x' to activate the region, and another `C-x C-x' to put point
> back where it was before previous swapping point and mark with `C-x C-x'
> because some commands expect point to be at certain boundary of the region,
> like query-replace operating on the region with the initial position
> at the region beginning.
> 
> So perhaps `activate-mark' should be a command, preferably
> bound to some easy to type key like `C-x C-SPC'.

That's taken by `pop-global-mark'. And users who have rebound it
might well have rebound it to some similar action. Icicles binds it
by default to ` icicle-goto-global-marker-or-pop-global-mark', which
lets you navigate among local or global markers.

Let's just have the command first, without binding it to a key.

> > `C-x C-x' bound to a command that just swaps point and mark
> > without activating the region
> 
> `C-u C-x C-x' swaps point and mark without activating the region,
> so a new customizable option could invert the meaning of its prefix arg,
> and its default value could depend of whether d-s-m is active.

Again, users who have rebound it might well have rebound it to some
similar action. Icicles puts several alternative behaviors on `C-x C-x':

  'exchange-point-and-mark' or save a region or select a saved region.
  With no prefix arg, invoke 'exchange-point-and-mark'.
  If you use library 'Bookmark+', then you can use a prefix arg.

   * Plain 'C-u': What vanilla Emacs does - temporary Transient Mark mode.
   * Plain 'C-u C-u': select (activate) one or more bookmarked regions.
   * Numeric prefix arg: bookmark (save) the active region using
     'icicle-bookmark-cmd'.

     . Arg < 0: Prompt for the bookmark name.
     . Arg > 0: Do not prompt for the bookmark name.  Use the buffer name
                plus a prefix of the region text as the bookmark name.
     . Arg = 0: Same as > 0, except do not overwrite any existing bookmark
                with the same name.



reply via email to

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