emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [RFC][PATCH] Allow to export to ascii custom link types as notes


From: Ihor Radchenko
Subject: Re: [RFC][PATCH] Allow to export to ascii custom link types as notes
Date: Sun, 22 Oct 2023 09:13:36 +0000

Max Nikulin <manikulin@gmail.com> writes:

> it was discussed that attempts to customize export to plain text of link 
> types such as "elisp:" and "shell:" break formatting as notes at the end 
> of the heading (`org-ascii-links-to-notes').
>
> The attached patches is a draft implementing this feature (new functions 
> are not documented yet).
>
> For ascii backend :export function from `org-link-parameters' may return 
> (PATH . DESCRIPTION) `cons' instead of string. Depending on chosen link 
> style it will be exported as "[DESCRIPTION]" with the "[DESCRIPTION] 
> PATH" note at the end of heading or as the inline reference "DESCRIPTION 
> (PATH)".

This is non-standard. We should document it somewhere in the manual.

> I believe that parenthesis should be skipped in the case of angle 
> brackets "(<URI>)", but I do not change this behavior. There is some 
> inconsistency in respect to brackets for description of inline links, 
> but it is preserved as well.

May you elaborate?

> I do not like that :export functions are called twice: for text and for 
> note. In my opinion it is better to collect links in a property of INFO 
> to later format notes at the end of the heading. I would consider more 
> dense style of notes with list markers instead of empty line as separator.

Again, may you elaborate?

> +           (if (string-match-p "\\`\u200b*\\[.*\\]\u200b*\\'" anchor)
> +               anchor
> +          (format "[%s]" anchor))

This is out of scope of the patch, isn't it?
I can see the motivation, but we should probably move this change to a
separate patch and discussion thread.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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