Bruno Cardoso <cardoso...@gmail.com> writes:

> Thanks for your comments. See attached the updated patch.

Thanks for the update!

> +- =shortdoc= ::
> +
> +  Link to short documentation summary for a function group.

Might be useful to throw a link to Emacs manual here - [[info:emacs#Name Help]]

> +*** =ol.el=: Support for ~shortdoc~ link type
> +Add support for storing and inserting links to ~shortdoc~ groups.

=shortdoc= I think. It is not ~code~, but rather =verbatim=.

> +  (defun org-link--store-shortdoc (&optional _interactive?)
> +    (when (eq major-mode 'shortdoc-mode)
> +      (let* ((buffer (buffer-name))
> +             (group (when (string-match "*Shortdoc \\(.*\\)\\*" buffer)
> +                      (match-string 1 buffer))))
> +        (when (assoc (intern group) shortdoc--groups)

This will err when GROUP is nil (string-match does not match).

> +  (org-link-set-parameters "shortdoc"
> +                           :follow #'org-link--open-shortdoc
> +                           :store #'org-link--store-shortdoc))

Maybe also implement :complete parameter? It should be relatively easy.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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