Ihor Radchenko <[email protected]> writes:

> "J.D. Smith" <[email protected]> writes:
>
>> Sorry that got cutoff. I've pushed a change to ensure all local state is
>> reset and removed during reset-all (including auto-unhide), so any
>> `setopt' change should now update live (please test).  You do need,
>> e.g.:
>>
>>  (setopt org-inside-appearance
>>          (plist-put org-inside-appearance :face 'org-inside-face))
>>
>> etc.
>
> Seems to be working.
>
>>> 2. With org file containing just
>>> [[foo][bar *asd* a]]
>>> and org-inside activated, moving the point towards asd will trigger
>>> infinite error.
>>
>> This works fine for me.  Is this from emacs -Q or using your config?
>
> 1. make repro
> 2. M-x org-mode RET
> 3. M-x org-inside-mode RET
> 4. Type [[foo][bar]]
> 5. Move cursor to [[foo][bar|]]
> 6. Type " *bold*", so that you end up with [[foo][bar *bold*|]]
> 7. Observe
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   <=(nil 165 nil)

Thanks.  Reproduced, and fixed in latest.  This is an edge case:
`org-element' see that final `*bold*]]` as a nested entity, but org's
font-lock disagrees.  It does not have its markers hidden, so
`org-inside` should not treat it as a nested entity.  Add a space after
`*bold*` to see the normal behavior.

I think this is an org font-lock bug, or at least an unfortunate
disagreement between `org-element` and org's font lock engine as to what
`*bold*]` actually is.

BTW, not related to `org-inside', but I've long thought when you are
typing, e.g.

  *this is a|*

then back up to the point (`|') and edit it to read

  *this is a long bold phrase*

org's font lock should /not/ flash face and marker hiding off and on
rapidly as you type.  Perhaps a similar trick could be used as for
comments in many modes.  Comment fontification "holds off" on
re-fontifying syntactically for a time (reset ever time you type
something), to give you a chance to close the comment before it messes
with the rest of the buffer.  Stefan could probably help with that.

Reply via email to