emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Ihor Radchenko
Subject: Re: [RFC][PATCH v2] Allow to export to ascii custom link types as notes
Date: Wed, 08 Nov 2023 11:16:09 +0000

Max Nikulin <manikulin@gmail.com> writes:

> On 08/11/2023 17:45, Ihor Radchenko wrote:
>> (unless (org-element-property :org-link-code-exported link)
>>   (setq link (org-element-copy link))
>>   (org-element-put-property link :org-link-code-exported t)
>>   (org-element-put-property :raw-link (org-element-create-inline-src-block 
>> ...)))
>
>  From my point of view a non-trivial element as :raw-link is a more ugly 
> kludge than returning a `cons'. Perhaps a fragment of plain text with 
> e.g. attr_ascii_note attribute set to inline source block is a better 
> alternative.

I think that a middle ground could be introducing pseudo objects, like
what we do in ox-latex: See latex-math-block, latex-matrices,
`org-latex-math-block-tree-filter', `org-latex-matrices-tree-filter',
and the corresponding transcoders.

We can introduce a special ox-ascii-specific object `object-with-note'
that will be exported by ox-ascii according to
`org-ascii-links-to-notes' settings. Then, we can transform link objects
into `object-with-note' that will later be used in
`org-ascii--describe-links'.

WDYT?

-- 
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]