From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: question about org-region-active-p Date: Wed, 17 Dec 2008 18:01:18 +0100 Message-ID: <3471BCE9-5D57-4D71-9404-E21D66DA72CA@uva.nl> References: <494709A4.1000703@sift.info> <9F73C60D-A8B2-4D0B-AFE0-DE210312A021@uva.nl> <4947CC95.60900@sift.info> <494908C5.5050702@sift.info> <531B6C47-6267-4530-ACF8-F2C1548159CE@uva.nl> <87d4fq4uqp.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCzm8-0003A0-Qw for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 12:01:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCzm7-00039Y-SF for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 12:01:32 -0500 Received: from [199.232.76.173] (port=48300 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCzm7-00039U-2Q for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 12:01:31 -0500 Received: from mail-ew0-f13.google.com ([209.85.219.13]:39434) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCzm6-0004lb-8V for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 12:01:30 -0500 Received: by ewy6 with SMTP id 6so4573940ewy.18 for ; Wed, 17 Dec 2008 09:01:28 -0800 (PST) In-Reply-To: <87d4fq4uqp.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: Robert Goldman , emacs-orgmode@gnu.org Ah, so maybe Robert did not turn it off.... Anyway, in Emacs 23 the default will be ON. It was always my understanding that in order to use regions efficiently, you needed to turn on that mode. Anyway, Robert, could you please try to identify a location in the docs where I should put this information? Ask yourself: "Where would I have seen this, had i been there....". - Carsten On Dec 17, 2008, at 5:44 PM, Bernt Hansen wrote: > Hi Carsten, > > Just to add to the discussion, transient-mark-mode is off for me in > GNU > Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of > 2008-11-09 on raven, modified by Debian. > > If I start with emacs -q transient-mark-mode is nil. > > I've explicitly set it on in my .emacs (as of the beginning of this > discussion) and that makes things work better for me. > > ,----[ end of my .emacs ] > | (transient-mark-mode 1) > `---- > > Regards, > Bernt > > Carsten Dominik writes: > >> Dear Robert, >> >> also region-active-p requires transient-mark-mode to be active, if >> you >> look >> at the definition of the region-active-p function, you will see that. >> >> transient-mark-mode is on by default in Emacs. Why did you turn it >> *off* in the >> first place????? >> >> - Carsten >> >> On Dec 17, 2008, at 3:12 PM, Robert Goldman wrote: >> >>> Carsten Dominik wrote: >>>> Hi Robert, >>>> >>>> no, I do not think this would make sense, to step out with >>>> an error, because all the commands that need a region will >>>> also work without one. This is how regions work in Emacs. >>>> >>>> If you find places in the documentation where this could >>>> be made clearer, let me know. >>> >>> Thank you Carsten for the response. I am still inclined to think >>> that >>> this case is one where the user should get some warning because it's >>> in >>> that bad class of bug-like situations where code quietly does >>> something >>> that the user does not expect and that contradicts the >>> documentation. >>> >>> On the other hand, I can't see where one would raise an error. It's >>> not >>> an error to call org-region-active-p without transient-mark-mode; >>> indeed >>> some libraries turn this on and off, and the user is entitled not to >>> use it. >>> >>> The call to export isn't right, because the export command does not >>> give >>> the system any opportunity to infer whether the user intended to >>> operate >>> on a region or on the whole. So there's no way to tell that the >>> user's >>> expectations are going to be violated. >>> >>> The loading of org-mode isn't the right place, either, since the >>> vast >>> majority of org-mode works just fine with t-m-m turned off. >>> >>> I'm inclined to think that the answer is simply that one shouldn't >>> turn >>> transient-mark-mode off, ever. This works for me, but I hate to >>> think >>> of the next person coming along to fall into this same trap, from >>> which >>> the only means of escape is to inspect the source code and use the >>> debugger. >>> >>> I would suggest a modification to the manual and will submit one, >>> but >>> need clarification about one issue: the use of t-m-m seems to be a >>> fallback for older emacsen that don't have region-active-p. I have >>> such >>> an emacs, so I don't know --- does this mean that on newer emacsen >>> org-region-active-p will work even without transient-mark-mode? >>> >>> Best, >>> Robert >> >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode