emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: Thomas Lord
Subject: Re: Shift selection using interactive spec
Date: Fri, 14 Mar 2008 11:41:09 -0700
User-agent: Thunderbird 1.5.0.5 (X11/20060808)

David Kastrup wrote:
 strictly less functionality?

Tentative marks do *not* make it impossible to recreate a
mark where one had been last time.
    

So what's your complaint about C-x C-x?
  

In t-m-m?  For the purpose of shift-select?   It's that the
marker being "reactivated" by C-x C-x shouldn't be on
the mark stack at all.



  
They do imply that "recreatable" tentative marks are stored
someplace else besides the mark stack.
    

C-x C-x does not push onto the mark stack.

  

Right.   By the time it is run, the mistake is already made -- the marker
in question has already been pushed.

Here is an interaction script that shows what shift-marking should
do:

      a) start with a big buffer of text (e.g. COPYING).
      b) Set a mark somewhere in the file using C-@  -- this is "the mark"
      c) Navigate away.   No highlighting should happen.  C-x C-x
          should swap the point and mark, as usual.
      d) While navigated away, put the point at the start of some word
           and type M-C-S-f.    The entire word should now be selected
           between the point and a *transient* mark.
       e) Kill-region (C-w).   The selected word is now gone.  So is
           the *transient* mark.
       f) C-x C-x C-y   -- the word you killed should now be
           inserted at "the mark" from step b


For a user, that means you can set marks and reliably return to
them using C-@ and C-x C-x or C-u C-@ but you can *also*
just use all of your familiar "shift-select" gestures for simple
edits -- the two concepts work side by side rather than one trying
to emulate the other.




  
Tentative marks are by definition not precious so
I don't know that you'd want to put much effort into saving
them but you could always keep, maybe the most recent
one or two if you have commands that would want to restore them.
    

What's the advantage to what is already there?  Can you present a
sequence of operations or keypresses where your scheme would provide an
advantage?  What advantage?

  

The above (a..f) is one such example.  The key thing is that tentative marks
give you one level of additional selection without perturbing the traditional
mark stack.

Another way to look at it is to think about what shift-marking means
in most GUIs.   Most GUIs support shift-marking.    If you start marking
some region it's highlighted but then if you do anything that cancels
that selection, the selection is simply gone and the application is back to
its original state -- no trace of the former region.     That's a good default.




-t


reply via email to

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