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: Fri, 10 May 2024 18:09:00 +0700 [thread overview]
Message-ID: <e6d8375a-aa7b-4448-aff2-e0dd23e99fd3@gmail.com> (raw)
In-Reply-To: <87seysnggb.fsf@gmail.com>
On 09/05/2024 04:26, Bruno Cardoso wrote:
> On 2024-05-08, 18:20 +0700, Max Nikulin wrote:
>
>> I have not managed to get all known groups with `shortdoc-display-group'
>> in Emacs-28. Is it a feature of `shortdoc' in Emacs-29?
>
> In Emacs-29 `shortdoc' is an alias for `shortdoc-display-group'.
> Interactvely, it prompts the user for a group from `shortdoc--groups'
> (that's what I meant by "all known groups").
Thank you for the explanation. Reading "lists all" I expected something
like list of all info manuals in the case of M-x info RET when there are
no info buffers yet.
>> "\\`\\([^:]+\\)\\(?:::\\(.+\\)\\'\\)?"
>
> `shortdoc-display-group' already handles empty group or function.
> Replacing "*" by "+" will throw an "Args out of range" error in the
> corner case you mentioned ("shortdoc:::file"). So I think it's fine to
> keep "*" there.
Out of range error happens because of `string-match' is called despite
`match-string' failure and match groups from some earlier regexp are
applied. Generally `match-string' should be inside `if', `when', `and',
etc., however I agree that the regexp with stars always succeeds,
perhaps really matching nothing. That is why I do not insist.
The following garbage in - garbage out case is a bit confusing:
<shortdoc::*file>
=> "No such documentation group "
> ol.el: Add support for `shortdoc' link type
Bruno, has you signed the copyright form? This patch is above the
TINYCHANGE limit.
<https://orgmode.org/worg/org-contribute.html#copyright>
It will be a bit less work for the maintainer if you attach result of
"git format-patch" command. It adds email-like headers allowing to
properly set commit author.
> * lisp/ol.el: Add support for storing and inserting links to `shortdoc'
> documentation groups for Emacs Lisp functions.
List of new functions is missed:
* lisp/ol.el (org-link--open-shortdoc org-link--store-shortdoc)
(org-link--complete-shortdoc): Add support...
> * doc/org-manual.org (External Links): Add shortdoc link type
> documentation.
>
> * etc/ORG-NEWS (=ol.el=: Support for =shortdoc= link type): Document
> the new feature.
Empty line is separator before free-form comments, so list of formal
changes should be dense.
> + (condition-case nil
> + (progn
> + (shortdoc-display-group group fn)
> + (and str (not fn) (search-forward str nil t)))
> + (user-error "Unknown shortdoc group: %s" group))))
Sorry, it does not work so. It means catch `user-error' however
`shortdoc-display-group' signals `error'. Try to enable debug-on-error
and to open a broken link. Either `condition-case' should be dropped or
proper signal should be captured.
next prev parent reply other threads:[~2024-05-10 11:09 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
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 [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6d8375a-aa7b-4448-aff2-e0dd23e99fd3@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).