"J.D. Smith" <[email protected]> writes:

I've pushed a substantial update to org-inside.  I've now added support
for hidden links.  This necessitated changing the cursor sensor
functionality, since the hidden text is obviously larger than one
character.  To gain enter/exit flexibility, I now use the same sensor
function on both the text and the overlay, which is now always brought
in when "inside".  This gives some freedom for when and how you "leave"
the hidden text entity, once you have entered.  Jens, you may notice I
preserve the same movement sequence whether or not auto-unhiding is on.
This is "by design", since now the user is free to toggle hiding.

I've also implemented the new command `org-inside-toggle-hidden', which
can be used at any time to toggle hiding for the specific entity you are
in (only).  There is no need to enable auto-unhiding to use this
command.  I think this is ideal:

1. For normal updates to emphasized text or e.g. a link description,
   just move "inside" and make your edits.  No distracting reflow of
   visual paragraphs, etc.  The cursor/face changes make it clear when
   you are inside.

2. For more difficult operations, e.g. to edit the raw link itself, run
   `org-inside-toggle-hidden', and a single entity will be revealed.
   Once finished, just leave and the link will automatically re-hide.

We could consider a keybinding for `org-inside-toggle-hidden'.

I think this is ready for review.  A couple thoughts/questions:

1. I implemented a new abnormal hook
   `org-activate-hidden-links-functions'.  This appears to be somewhat
   close to the `(org-link-get-parameter type :activate-func)',
   parameter but:
   a. I don't know what TYPE's are valid and therefore where to set my
      function (on multiple TYPEs?).
   b. It does not include visible-start/end among the arguments, which I
      need.

2. Emphasized text has an `org-emphasis' text property, but links do
   _not_ have an equivalent 'org-link' property.  I'm using
   'htmlize-link' to quickly find the boundaries of the link (including
   hidden text).  Is there a better way?

Reply via email to