[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: |
Wed, 5 Jun 2024 22:37:00 +0700 |
User-agent: |
Mozilla Thunderbird |
On 13/05/2024 20:04, Bruno Cardoso wrote:
+++ b/etc/ORG-NEWS
Bruno, I am sorry, but Org-9.7 has been released and your patch can not
be cleanly applied any more. Please, rebase it and check that the new
feature is described in the proper section for changes that have not
released yet.
A couple of notes that unlikely affect real life usage.
+ (defun org-link--store-shortdoc (&optional _interactive?)
+ "Store \"shortdoc\" type link."
+ (when (eq major-mode 'shortdoc-mode)
`derived-mode-p' is more reliable in general.
+ (let* ((buffer (buffer-name))
+ (group (when (string-match "*Shortdoc \\(.*\\)\\*" buffer)
+ (match-string 1 buffer))))
+ (if (and group (assoc (intern-soft group) shortdoc--groups))
+ (org-link-store-props :type "shortdoc"
+ :link (format "shortdoc:%s" group)
+ :description nil)
+ (user-error "Unknown shortdoc group: %s" group)))))
I believed that store link functions should fail silently if no suitable
link may be offered.