[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] question about org-region-active-p
From: |
Robert Goldman |
Subject: |
Re: [Orgmode] question about org-region-active-p |
Date: |
Wed, 17 Dec 2008 10:38:41 -0600 |
User-agent: |
Thunderbird 2.0.0.18 (Macintosh/20081105) |
Carsten Dominik wrote:
> 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?????
I suspect that this is an aquamacs oddity. Aquamacs (I believe) turns
on cua-mode by default and at least in the past, cua-mode was
incompatible with transient-mark-mode, and there was even an order
dependency (you had to turn cua-mode off before turning
transient-mark-mode on). There's a fair amount of discussion about this
that one can find by googling. I believe that this has changed,
however, since looking at a modern copy of cua-mode.el doesn't seem to
reveal any disabling of t-m-m.
I'll be honest with you --- I don't even know HOW I turned t-m-m off,
much less why! When I explicitly turn it ON in .emacs, all is well.
When I run aquamacs without my init files, it's on. But nothing
directly in my .emacs turns it off, nor do I have any customizations.
This suggests that some library I'm using, somewhere, interferes with
it, but as yet I have not found it.
Best,
r
>
> - 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
>
- [Orgmode] question about org-region-active-p, Robert Goldman, 2008/12/15
- Re: [Orgmode] question about org-region-active-p, Samuel Wales, 2008/12/15
- Re: [Orgmode] question about org-region-active-p, Carsten Dominik, 2008/12/16
- Re: [Orgmode] question about org-region-active-p, Robert Goldman, 2008/12/16
- Re: [Orgmode] question about org-region-active-p, Carsten Dominik, 2008/12/17
- Re: [Orgmode] question about org-region-active-p, Robert Goldman, 2008/12/17
- Re: [Orgmode] question about org-region-active-p, Carsten Dominik, 2008/12/17
- Re: [Orgmode] question about org-region-active-p,
Robert Goldman <=
- [Orgmode] Re: question about org-region-active-p, Bernt Hansen, 2008/12/17
- [Orgmode] Re: question about org-region-active-p, Carsten Dominik, 2008/12/17
- [Orgmode] Re: question about org-region-active-p, Robert Goldman, 2008/12/18
- [Orgmode] Re: question about org-region-active-p, Carsten Dominik, 2008/12/19
Re: [Orgmode] question about org-region-active-p, William Henney, 2008/12/16