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: Max Nikulin
Subject: Re: [RFC][PATCH v2] Allow to export to ascii custom link types as notes
Date: Tue, 7 Nov 2023 18:48:33 +0700
User-agent: Mozilla Thunderbird

On 07/11/2023 16:30, Ihor Radchenko wrote:
Max Nikulin writes:

What about passing an extra argument to :export function in
`org-export-custom-protocol-maybe':

(funcall protocol path desc backend info *link-object*)

It would require another iteration with `condition-case' to deal with functions having old signature.

Earlier you considered :filter property that receives link object instead of path and desc pair. I am unsure concerning name, but I like that idea.

Then, if the :export function returns non-string, the return value is
further processed as (org-export-data *return-value* info).

Do you mean something like the following?

(defun org-man-export (link description backend)
  "Export a man page LINK with DESCRIPTION.
BACKEND is the current export backend."
  (org-element-create-link
   (format "http://man.he.net/?topic=%s&section=all"; link)
   description))

where org-element-create-link parses link target into :type, :raw-link, etc. properties.





reply via email to

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