From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Bruno Cardoso <cardoso.bc@gmail.com>
Subject: Re: [PATCH] Add support for shortdoc link type
Date: Sun, 5 May 2024 18:01:07 +0700 [thread overview]
Message-ID: <9f6bbe0f-7cc2-4d55-a77d-331c8f71bb2c@gmail.com> (raw)
In-Reply-To: <87h6fdeb3i.fsf@gmail.com>
On 05/05/2024 00:33, Bruno Cardoso wrote:
>
> I updated the patch to use the optional function argument instead.
Thanks
> +++ b/doc/org-manual.org
> @@ -3372,6 +3372,10 @@ Here is the full set of built-in link types:
>
> Execute a shell command upon activation.
>
> +- =shortdoc= ::
> +
> +Link to short documentation summary for a function group. For more information, see [[info:emacs#Name Help][Help by Command or Variable Name]].
I would consider explicit mention that it is related to Emacs Lisp and
perhaps that the origin of its name is the ~shortdoc-display-group~ user
command. <info:elisp#Documentation Groups> might be a better link.
This line is rather long though I do not have a link where formatting
conventions are documented.
> +++ b/etc/ORG-NEWS
> @@ -1369,6 +1369,10 @@ place the entry in the ~Misc~ category if ~TEXINFO_DIR_CATEGORY~ is missing.
> =TEXINFO_DIR_TITLE= is renamed to =TEXINFO_DIR_NAME=.
> The old name is obsolete.
>
> +*** =ol.el=: Support for =shortdoc= link type
> +
> +Add support for storing and inserting links to =shortdoc= groups.
Again I am unsure that it is clear to all readers.
> +++ b/lisp/ol.el
> @@ -1582,6 +1582,41 @@ PATH is a symbol name, as a string."
> :follow #'org-link--open-help
> :store #'org-link--store-help)
>
> +;;;; "shortdoc" link type
> +(when (version< "27" emacs-version)
Is it correct?
2a7488d42d8 2020-10-11 05:51:16 +0200 Lars Ingebrigtsen: Add support for
displaying short documentation for function groups
git tag --contains 2a7488d42d8
emacs-28.0.90
> + (defun org-link--open-shortdoc (path _)
> + "Open a \"shortdoc\" type link.
> +PATH is a group name or \"group::#function\"."
> + (string-match "\\`\\([^#:]*\\)\\(::#?\\(.*\\)\\)?\\'" path)
I think, it is enough to use [^:] since next group is started from "::".
You may use use non-capturing group \\(?:::# ...\\) (requires update of
next index below) unless you are going add search code back. I am unsure
concerning your intentions. You dropped search code, but "#" after "::"
is still optional.
> + (let ((group (match-string 1 path))
> + (fn (match-string 3 path)))
> + (condition-case nil
> + (shortdoc-display-group group (intern-soft fn))
> + (error (message "Unknown shortdoc group: %s" group)))))
I do not have strong opinion what is better here: `user-error' (used in
earlier revisions) or `error'. However I do not see the point of
capturing original error and signalling another one if it is not
`user-error'.
next prev parent reply other threads:[~2024-05-05 11:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 3:29 [PATCH] Add support for shortdoc link type Bruno Cardoso
2024-05-01 11:00 ` Ihor Radchenko
2024-05-01 16:52 ` Bruno Cardoso
2024-05-01 17:55 ` Ihor Radchenko
2024-05-01 19:24 ` Bruno Cardoso
2024-05-02 10:41 ` Max Nikulin
2024-05-03 21:41 ` Bruno Cardoso
2024-05-04 7:38 ` Max Nikulin
2024-05-04 17:33 ` Bruno Cardoso
2024-05-05 11:01 ` Max Nikulin [this message]
2024-05-05 21:35 ` Bruno Cardoso
2024-05-06 10:55 ` Max Nikulin
2024-05-08 1:11 ` Bruno Cardoso
2024-05-08 11:20 ` Max Nikulin
2024-05-08 21:26 ` Bruno Cardoso
2024-05-10 11:09 ` Max Nikulin
2024-05-11 16:58 ` Bruno Cardoso
2024-05-13 11:14 ` Max Nikulin
2024-05-13 13:04 ` Bruno Cardoso
2024-05-16 10:58 ` Max Nikulin
2024-05-17 14:55 ` Bruno Cardoso
2024-06-04 23:59 ` Bruno Cardoso
2024-06-05 15:14 ` Ihor Radchenko
2024-06-05 21:15 ` Bastien Guerry
2024-06-05 15:37 ` Max Nikulin
2024-06-05 22:21 ` Bruno Cardoso
2024-06-06 11:53 ` Ihor Radchenko
2024-06-06 23:11 ` Bruno Cardoso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f6bbe0f-7cc2-4d55-a77d-331c8f71bb2c@gmail.com \
--to=manikulin@gmail.com \
--cc=cardoso.bc@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.