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

> I've pushed a substantial update to org-inside.  I've now added support
> for hidden links.

For some reason, the cursor is changing even when links are not hidden.

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

When I do make repro, open Org file, and run M-x org-inside-mode, I get
Debugger entered--Lisp error: (wrong-type-argument symbolp 'org-inside-mode)
  (defvar 'org-inside-mode)
  load-with-code-conversion("/home/yantar92/Git/org-mode/lisp/org-inside.el" 
"/home/yantar92/Git/org-mode/lisp/org-inside.el" nil t)
  command-execute(org-inside-mode record)
  execute-extended-command(nil "org-inside-mode" "org-insi")
  funcall-interactively(execute-extended-command nil "org-inside-mode" 
"org-insi")
  command-execute(execute-extended-command)

Also, I tried to
1. make repro
2. M-: (setopt org-hide-emphasis-markers t)
3. C-x C-f /tmp/test.org
4. Insert

*bold*
<point>
5. M-x org-inside-mode
6. C-b and C-f many times to cross the bold
7. C-b does not change cursor shape

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

As I said in another email, org-appear would fit here. It also has a
bind C-c C-r already.

> 1. I implemented a new abnormal hook
>    `org-activate-hidden-links-functions'.

And this hook is only called in bracket-style links for some reason.
Similarly, `org-do-emphasis-hook' is only called when
org-hide-emphasis-markers is non-nil.

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

Sounds like you are over-complicating things. Do we really need
hyper-specialized per-link-type activation here?

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

org-element-context.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to