From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: question about org-region-active-p Date: Tue, 16 Dec 2008 08:53:58 +0100 Message-ID: <9F73C60D-A8B2-4D0B-AFE0-DE210312A021@uva.nl> References: <494709A4.1000703@sift.info> 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 1LCUko-0002yO-Se for emacs-orgmode@gnu.org; Tue, 16 Dec 2008 02:54:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCUkn-0002xo-95 for emacs-orgmode@gnu.org; Tue, 16 Dec 2008 02:54:06 -0500 Received: from [199.232.76.173] (port=35147 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCUkn-0002xi-0Q for emacs-orgmode@gnu.org; Tue, 16 Dec 2008 02:54:05 -0500 Received: from mx20.gnu.org ([199.232.41.8]:9316) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCUkm-0007Kk-AC for emacs-orgmode@gnu.org; Tue, 16 Dec 2008 02:54:04 -0500 Received: from ug-out-1314.google.com ([66.249.92.174]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCUkl-0005ov-6r for emacs-orgmode@gnu.org; Tue, 16 Dec 2008 02:54:03 -0500 Received: by ug-out-1314.google.com with SMTP id 36so285326uga.17 for ; Mon, 15 Dec 2008 23:54:01 -0800 (PST) In-Reply-To: <494709A4.1000703@sift.info> 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: Robert Goldman Cc: emacs-orgmode@gnu.org Hi Robert, Samuel has it right, let me add this: In Emacs, you do never remove the mark from the buffer, it is always there, wherever you or some command last left it. The only way to tell if the user intends to apply a command to a region is therefore the state of a flag that says if the mark is "active". Setting the mark activates the mark, most commands besides cursor motion and search deactivate it. The state flag does only exist if transient-mark-mode is active. - Carsten On Dec 16, 2008, at 2:51 AM, Robert Goldman wrote: > The definition of org-region-active-p in my copy of org-mode is as > follows: > > > (defun org-region-active-p () > "Is `transient-mark-mode' on and the region active? > Works on both Emacs and XEmacs." > (if org-ignore-region > nil > (if (featurep 'xemacs) > (and zmacs-regions (region-active-p)) > (if (fboundp 'use-region-p) > (use-region-p) > (and transient-mark-mode mark-active))))) > > What seems odd to me is that this command will only work on an emacs > 22 > (like my Aquamacs) if transient-mark-mode is enabled. Is that > correct, > and is that what's desired? > > [I found this because I tried to publish a subtree of an org file, > and I > found that org-region-active-p was NIL even after C-c @ > (outline-mark-subtree).] > > This may be an oddity of aquamacs -- it seems to prefer cua-mode and > turn off transient-mark-mode by default. I confess to not really > understanding that decision or its implications. > > thanks, > r > > > _______________________________________________ > 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