[Top][All Lists]

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

RE: [External] : Re: Allowing point to be outside the window?

From: Drew Adams
Subject: RE: [External] : Re: Allowing point to be outside the window?
Date: Tue, 30 Nov 2021 20:57:59 +0000

My main purpose in raising this possible gotcha
was just to point to it.

And yes, the potential problem is wider than just

As for possible remedies -

1. A user option, to specify preferred behavior,
   for sure.

   This could even be per-command, either by way
   of the option value or via a command-symbol
   property - see below, at the end.

2. Some possible choices for the behavior:
   a. Do nothing special (just act, silently).
   b. Show a message that point is off-window.
      (Could also do it even for mark off-window).
   c. Require y/n confirmation, to act.
   d. Don't allow the command (raise an error).

For 2c, it might be good, while waiting for
confirmation, to let you use a key to indicate the
region in some way.  Here's one way (similar to
`C-x C-x' behavior):

Move temporarily to point - and when repeated,
move to mark, i.e., toggle between them.  And
highlight the region text, to make clear on
which side of the boundaries the text to be
operated on lies.

Another possibility would be to automatically
bounce to show you the off-window point location.
But I think letting you do that on demand makes
more sense.

IOW, let me tell Emacs to show me point, before
I decide whether to confirm, but also let me
just confirm or not, without showing me point.

In any case, by default the feature should be
off: no off-window point.

Another possibility might be to force users who
want the ability to act on the region when point
is off-window to use different commands for that.

That is, bind particular (new) commands that
allow it.  This would let you, say, permit some 
operations but not others.  You could even be
able to make a _per-command_ choice like what
the user-option allows.

And each command that lets you act on a region
when point is off-window would be disabled, by
default.  E.g.,

  (put 'kill-region-maybe-offscreen 'disabled)

reply via email to

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