unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Files in wrong subdirs of emacs/lisp?
Date: 22 Dec 2003 12:00:48 +0100	[thread overview]
Message-ID: <m365g986cf.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1AYHM0-0005I9-My@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

>     We already have both pc-selection-mode and cua-mode doing the
>     same thing, so IMO s-region is obsolete.
> 
> The behavior of cua-mode is very different from the behavior
> of s-region, so we certainly cannot tell users "use cua mode
> instead of s-region."

Yes, s-region has one unique feature (compared to cua and pc-select)
which is that it only shows the region highlight temporarily (for one
second).  But other than that, cua can be customized to just provide
the same functionality as s-region and pc-selection mode.


But there are some fundamental problems with s-region which make me doubt
doubt that anyone is actually using it:

The list of keys which are rebound by s-region is pretty short.  Based
on the feedback I have got from users of CUA, I believe that those who
use shifted movement keys to select a region want such a mode to work
for practically all commands that move the cursor, not just the very
incomplete list provided by s-region.el.

S-region is activated just by loading the file, i.e. it doesn't have a
toggle-mode function with an autoload cookie.  It works by modifying
the global key bindings, and there is no way to turn it off again.

This also means that if some modes redefines these keys in their local
map, they lose their s-region binding (this happens for cua and
pc-select as well, but at least with cua mode, this is *easy* to
handle).

Also s-region uses an awful method of binding all the keys that it
controls to the same function (so C-h k doesn't really work).

> 
> Would a user who uses pc-selection-mode instead of s-region
> notice any differences in behavior?  If so, what differences?

The major difference is that with pc-selection-mode the region remains
highlighted while s-region only highlights it temporarily.  
Also pc-selection-mode has a few more bindings to make it recognize more
shifted movements.

BTW, pc-selection-mode also uses a method of rebinding a lot of keys
in the -mark (shifted) and -nomark (unshifted) state, e.g. S-left is
bound to forward-char-mark and left is bound to forward-char-nomark.
This means that it is non-trivial to add more movement commands to
pc-selection-mode, as you need to write lisp code to do that.  And it
also repeats the doc string for each of the original commands.  

CUA on the other hand doesn't rebind any of the movement keys (it
actually looks for the shift-modifier on user input), and it is
trivial to add more movement commands to be recognized by CUA (via
customize).


My conclusion is that s-region, no matter how ugly it is, has a unique
feature (temporary region highlighting) which may make it useful for
some users.  It doesn't harm to keep it, but I would still make it
obsolete, as I don't think it is something we should actively spend
any time on maintaining it.

Actually, the temporary highlighting of the region is ortogonal to the
shift region selection, so it might be useful to implement that as a
general mechanism based on transient-mark-mode: We could add a
transient-region-highlight-timeout setting which causes the
highlighting of the region to disappear N milliseconds after the last
user command (and shows the highlighting again if the mark is still
active when you execute the next command).  Personally, I would find
that confusing though...

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2003-12-22 11:00 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14 13:48 Files in wrong subdirs of emacs/lisp? Richard Stallman
2003-05-19 22:33 ` Juanma Barranquero
2003-05-20  6:25   ` Stefan Monnier
2003-05-20 12:55     ` Juanma Barranquero
2003-05-21  7:50       ` Kai Großjohann
2003-05-21  8:22         ` Juanma Barranquero
2003-05-21 12:32           ` Robert J. Chassell
2003-05-21 13:02             ` Juanma Barranquero
2003-05-21 14:37             ` Miles Bader
2003-05-22  8:33             ` Richard Stallman
2003-05-22 10:03               ` David Kastrup
2003-05-22 13:17                 ` Stefan Monnier
2003-05-21 15:30       ` Richard Stallman
2003-05-22  7:43         ` Juanma Barranquero
2003-05-22 11:04           ` Thien-Thi Nguyen
2003-05-22 11:28             ` Juanma Barranquero
2003-05-23 22:49               ` Richard Stallman
2003-05-24 12:38                 ` Juanma Barranquero
2003-05-24 12:49                   ` Thien-Thi Nguyen
2003-05-24 13:21                     ` Juanma Barranquero
2003-05-24 13:57                       ` Thien-Thi Nguyen
2003-05-25 18:02                   ` Richard Stallman
2003-05-23 12:05           ` Richard Stallman
2003-05-23 12:30             ` Juanma Barranquero
2003-05-24 23:18               ` Richard Stallman
2003-05-25  1:24                 ` Juanma Barranquero
2003-05-21 15:31       ` Richard Stallman
2003-05-22  8:28         ` Juanma Barranquero
2003-05-23 12:05           ` Richard Stallman
2003-05-23 12:55             ` Juanma Barranquero
2003-05-24 23:19               ` Richard Stallman
2003-05-25  0:02                 ` Stefan Monnier
2003-05-26 13:48                   ` Richard Stallman
2003-05-25  1:57                 ` Juanma Barranquero
2003-05-25  4:14                 ` Karl Eichwalder
2003-05-26 13:48                   ` Richard Stallman
2003-05-21  1:53     ` Richard Stallman
2003-05-21  2:03       ` Miles Bader
2003-05-22  8:33         ` Richard Stallman
2003-05-22 13:17           ` Stefan Monnier
2003-05-23 22:47             ` Richard Stallman
2003-05-24 10:15               ` Eli Zaretskii
2003-05-21  1:55   ` Richard Stallman
2003-05-21  7:10     ` Juanma Barranquero
2003-05-21 11:30       ` Andreas Schwab
2003-05-22  8:33       ` Richard Stallman
2003-05-21 15:45     ` Stefan Monnier
2003-12-15 16:24 ` Kim F. Storm
2003-12-15 23:13   ` Kenichi Handa
2003-12-15 23:23     ` Miles Bader
2003-12-16  1:25       ` Kim F. Storm
2003-12-16  6:17   ` Eli Zaretskii
2003-12-16 14:51   ` Richard Stallman
2003-12-17  1:14     ` Kim F. Storm
2003-12-17 15:20       ` Richard Stallman
2003-12-17 17:02         ` Kai Grossjohann
2003-12-18 14:04           ` Richard Stallman
2003-12-18 23:24             ` Miles Bader
2003-12-18 15:17           ` Per Abrahamsen
2003-12-18 17:01             ` Kim F. Storm
2003-12-18 16:34               ` Per Abrahamsen
2003-12-18 16:37               ` Kai Grossjohann
2003-12-18 17:44                 ` Benjamin Riefenstahl
2003-12-18 18:02                   ` Kai Grossjohann
2003-12-20 17:19                     ` Richard Stallman
2003-12-20 20:31                       ` Kai Grossjohann
2003-12-21  1:57                         ` Kim F. Storm
2003-12-21  5:23                         ` Richard Stallman
     [not found]               ` <E1AXQDT-0001Oz-QB@fencepost.gnu.org>
     [not found]                 ` <m33cbfaqld.fsf@kfs-l.imdomain.dk>
     [not found]                   ` <E1AYHM0-0005I9-My@fencepost.gnu.org>
2003-12-22 11:00                     ` Kim F. Storm [this message]
2003-12-23  5:04                       ` Richard Stallman
2003-12-17 15:20       ` Richard Stallman

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=m365g986cf.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --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).