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: Thu, 13 Mar 2008 18:22:46 -0700
User-agent: Thunderbird 1.5.0.5 (X11/20060808)

David Kastrup wrote:
Thomas Lord <address@hidden> writes:

  
A problem (in my view) with such an approach
is that transient mark mode has the wrong semantics
to implement shift-marking.

Transient mark mode is just about the appearance
of the display -- whether or not the current region
is highlighted.
    

Uh, no.  It is also about whether or not the current region is actively
modifying a number of commands.
  
Sorry.  Yes, oddly, transient mark mode does that.  It makes
little sense to me.

I'm proposing adding a "tentative" flag to the top entry of the
mark stack --- if set, that entry tends to be discarded.

Transient mark mode, as you correctly point out, seems to
add a "usable" flag.  If not set, that entry is there but the user
is forbidden from using it.   Strange thing to do.


Another way to think about tentative marks is to think
that, in addition to the mark stack, there is a separate piece
of dynamic state that holds at most 1 mark -- call it "that point".
So, maybe not a "tentative flag" but just a separate, per-buffer,
"tentative mark" variable.     The user, with a gesture like
shifting a motion command, sets that tentative mark.   Most
commands will set that variable back to nil but, while it's
set, if the last command was reached by unshifting the keysequence
then keep the tentative mark;  or if the last command explicitly
set some flag then keep the tentative mark;  (otherwise set
it to nil).

In the emacs command set, the "tentative mark" is just another
"pronoun" so to speak.   Emacs already has markers as one kind
of noun and a mark-stack as a fancy kind of pronoun that
contextually names some list of markers..... this adds another
pronoun for a distinguished marker.  

In contrast, tentative-mark-mode (aside from just modifying
display) adds this whole new "user concept" of "active vs. deactivated"
marks.



  
Shift-marking and other kinds of popular-style marking
are about more than display -- it's about marks that go away
by default, unless you keep them.
    

That's what the "transient" in "transient-mark-mode" is about.  Look it
up in a dictionary.  It has to be transient because it modifies the
behavior of many commands, and thus you want it deactivated as soon as
it may no longer be relevant.

  

Please don't be snarky.   I don't spell well.  I am quite literate, I think.
I chose the word "tentative" precisely to draw a subtle distinction from
"transient" regarding their ordinary english meanings as good analogies for
the technical distinction I was drawing.  I'm sorry to have to say so but
I am insulted.

-t


reply via email to

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