emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] ol-info: Define :insert-description function


From: Max Nikulin
Subject: [PATCH v2] ol-info: Define :insert-description function
Date: Sun, 14 Aug 2022 23:41:47 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 06/08/2022 14:00, Ihor Radchenko wrote:
Max Nikulin writes:

+If LINK is not an info link then DESC is returned."
+  (or (org-string-nw-p desc)
+      (let* ((file-node (org-info-link-file-node link))
+             (file (car file-node))
+             (node (cadr file-node)))

pcase-let would be shorter here.

I have rewritten the patch to use `pcase' and to fix allowed separators between file name and node.

I have realized that unlike other type specific functions, :insert-description receives link including "scheme:" prefix. However attempt to achieve consistency at this point may cause more problems.

Attachment: v2-0001-ol-info-Define-insert-description-function.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]