Ihor Radchenko <[email protected]> writes:

> "J.D. Smith" <[email protected]> writes:
>
>>> I think that you forgot to update :set function for
>>> org-inside-appearance.
>>> At least, doing M-x customize-variable did not refresh changes made via
>>> customize interface.
>>
>> Strange, this works just fine for me.  Is there some particular change
>> sequence you tried that didn't update?  The one thing that doesn't
>> update is auto-unhiding state when you are inside an entity.
>
> Hmm. I see what happened. It is not that it did not update, but rather I
> was confused by the UI. Try
>
> 1. make repro
> 2. open
> * This is test
> [[link][test]]
> 3. M-x org-inside-mode
> 4. M-x customize-variable RET org-inside-appearance RET
> 5. Click on "unhide" checkbox
> [X] Key: :unhide
>
> It will still default to "nil", which I totally missed.

Yeah, I noticed that too, one of custom's many small oddities. There was
also a real (small) oversight, in that auto-hide didn't automatically
update visual state on custom-set.  Now fixed in latest.

>>>> Regarding having `org-inside-toggle-hidden' (now, C-c C-c) operative by
>>>> default, one idea would be to add it to the org keymap.  If it is
>>>> invoked inside a hidden-contents entity while `org-inside-mode' is
>>>> disabled, turn on `org-inside-mode' in the buffer and print a message to
>>>> the user ("org-inside-mode enabled in foobar.org; M-x org-inside-mode to
>>>> disable").
>>>
>>> Not sure here. Consider a link on a heading. The user may genuinely want
>>> to set tags.
>>
>> Didn't know that one; I use the speed keys.  We could use
>> `org-ctrl-c-ctrl-c-hook' instead, so that all the "builtin" C-c C-c
>> actions get first priority.  Although usually the hidden-contents entity
>> would be the smallest thing at point.  Not sure here.
>
> The most conservative way is simply leaving this command up to users to
> bind or add to the hook.

Or make `org-inside' itself opt-in.  I remembered that
`hide-emphasis-markers' is opt-in, but `link-descriptive' is /not/, so
it's not clear what `org-inside' should be.  We have a few options:

   | # | org-inside-mode on | C-c C-c bound |
   |---+--------------------+---------------|
   | 1 | NO                 | NO            |
   | 2 | NO                 | YES           |
   | 3 | YES                | NO            |
   | 4 | YES                | YES           |

I lean toward #2, but am OK with any.

> But I think adding to org-ctrl-c-ctrl-c-hook will be fine as long as
> second C-c C-c will not trigger the hook anymore and proceed to next action.

Not sure I understand your proposal.  Is the idea is to temporarily
disable hide toggling from the C-c C-c hook after one invocation?  Won't
that be surprising if you want to... toggle back?  I think the least
surprising thing is to have hidden-marker entities "capture" C-c C-c
when inside of them.

Reply via email to