Ihor Radchenko <[email protected]> writes:

> "J.D. Smith" <[email protected]> writes:
>
>> Along the way I also realized my window-parameter based state was less
>> reliable than expected, since many window-altering commands can lose
>> window parameters.  This caused various subtle state corruption.  I have
>> switched from window-backed to a buffer-local store of state
>> (e.g. overlays).  This has the advantage that /only/ a buffer local
>> `window-buffer-change-functions' hook is needed: no global hooks (again
>> in v31+).
>
> 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.

>>> One idea is inheriting from secondary-selection.
>>
>> I've created a new face `org-inside-face' which by default inherits from
>> secondary-selection, and turned it on by default.  This may be too heavy
>> of a default, since as you mouse through, the selection tends to turn on
>> and off for entities you visit only incidentally.  Perhaps an underline
>> the color of `secondary-selections's background would be a good lighter
>> weight option?
>
> secondary-face looks OK for me from emacs -Q.
> We may ask more people for feedback. This very much depends on taste.

Yeah, more feedback would be valuable.

>> 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.

>
> Also, I tested the branch, and found a couple of issues:
>
> 1. Doing (plist-put org-inside-appearance :unhide t) does not
>    immediately take effect. The very next move into a link will still
>    not unhide. The same when switching back to :unhide nil.

You have to trigger the custom set function (and plist-put creates a
copy anyway), e.g.

(setopt org-inside-appearance (plist-put org-inside-appearance :unhide nil))

> 2. With org file containing just
> [[foo][bar *asd* a]]
> and org-inside activated, moving the point towards asd will trigger
> infinite error.

Reply via email to