From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thomas Lord Newsgroups: gmane.emacs.devel Subject: Re: Shift selection using interactive spec Date: Thu, 13 Mar 2008 18:22:46 -0700 Message-ID: <47D9D366.4060000@emf.net> References: <87k5k69p92.fsf@stupidchicken.com> <47D9CA73.40501@emf.net> <85wso66u7s.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070709000302000602070800" X-Trace: ger.gmane.org 1205455484 7868 80.91.229.12 (14 Mar 2008 00:44:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 00:44:44 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 01:45:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZy2m-0005RX-LL for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 01:45:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZy2D-0004Xo-GE for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 20:44:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZy28-0004Tm-8t for emacs-devel@gnu.org; Thu, 13 Mar 2008 20:44:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZy23-0004QY-MC for emacs-devel@gnu.org; Thu, 13 Mar 2008 20:44:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZy23-0004QV-Fx for emacs-devel@gnu.org; Thu, 13 Mar 2008 20:44:23 -0400 Original-Received: from mail.42inc.com ([205.149.0.25]) by monty-python.gnu.org with esmtps (SSL 3.0:RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JZy1z-0001i0-49; Thu, 13 Mar 2008 20:44:19 -0400 X-TFF-CGPSA-Version: 1.5 X-TFF-CGPSA-Filter-42inc: Scanned X-42-Virus-Scanned: by 42 Antivirus -- Found to be clean. Original-Received: from [69.236.65.4] (account lord@emf.net HELO [192.168.1.64]) by mail.42inc.com (CommuniGate Pro SMTP 5.0.13) with ESMTPA id 25417857; Thu, 13 Mar 2008 17:44:05 -0700 User-Agent: Thunderbird 1.5.0.5 (X11/20060808) In-Reply-To: <85wso66u7s.fsf@lola.goethe.zz> X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92458 Archived-At: This is a multi-part message in MIME format. --------------070709000302000602070800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David Kastrup wrote: > Thomas Lord 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 --------------070709000302000602070800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit David Kastrup wrote:
Thomas Lord <lord@emf.net> 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

--------------070709000302000602070800--