[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add support for shortdoc link type
From: |
Max Nikulin |
Subject: |
Re: [PATCH] Add support for shortdoc link type |
Date: |
Sat, 4 May 2024 14:38:40 +0700 |
User-agent: |
Mozilla Thunderbird |
On 04/05/2024 04:41, Bruno Cardoso wrote:
On 2024-05-02, 17:41 +0700, Max Nikulin wrote:
<shortdoc:file::#find-file>
[...]
I implemented the search option by borrowing the regexp from `ol-info':
It is necessary to maintain backward compatibility for `ol-info'. I do
not know what kind of separator was added earlier: "::" or "#". I
suppose, for new link type, rules more close to file: links may be used, see
(info "(org) Search Options")
https://orgmode.org/manual/Search-Options.html
That is why I suggested shortdoc:GROUP::#FUNCTION. This way
shrotdoc:GROUP::SEARCH_STRING is possible as well.
(shortdoc-display-group group)
(when fn
(re-search-forward (concat "^(" (string-remove-prefix "#" fn))
nil t)
Notice that `shortdoc-display-group' has optional FUNCTION argument.
(beginning-of-line)))
(error (message "Unknown shortdoc group: %s" group)))))
It works, but I'm not quite sure if this is the best approach.
I do not have strong opinion as well. Some points to consider:
- Unambiguous parsing of link target.
- Flexibility it respect to later improvements.
- Re: [PATCH] Add support for shortdoc link type, Ihor Radchenko, 2024/05/01
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/01
- Re: [PATCH] Add support for shortdoc link type, Ihor Radchenko, 2024/05/01
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/01
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/02
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/03
- Re: [PATCH] Add support for shortdoc link type,
Max Nikulin <=
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/04
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/05
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/05
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/06
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/07
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/08
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/08
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/10
- Re: [PATCH] Add support for shortdoc link type, Bruno Cardoso, 2024/05/11
- Re: [PATCH] Add support for shortdoc link type, Max Nikulin, 2024/05/13