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

2023-10-27 Thread Max Nikulin
On 24/10/2023 17:40, Ihor Radchenko wrote: What about (1) passing link object to custom protocol, You know, I like this idea, but a function receiving link org-element object should be set to another property, so :export should continue to work. You considered :filter. I would prefer someth

Re: [PATCH] ox-ascii.el: Consistently add brackets around links (was: Re: [RFC][PATCH] Allow to export to ascii custom link types as notes)

2023-10-25 Thread Ihor Radchenko
Max Nikulin writes: >> Should be [man] () > > Side note: it should be either just "man(1)" or "man(8)" without any URL > for plain text export, but it is another story. I would not say "should". May? Yes. URL also makes sense in some scenarios (when the int

[PATCH] ox-ascii.el: Consistently add brackets around links (was: Re: [RFC][PATCH] Allow to export to ascii custom link types as notes)

2023-10-24 Thread Max Nikulin
with "http:" links: "[DESC] ()". I would drop brackets for "http:" and similar links instead ("DESC ()" or even "DESC "), but any case I prefer consistency. Ihor Radchenko to emacs-orgmode. Re: [RFC][PATCH] Allow to export to ascii custom link types

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

2023-10-24 Thread Ihor Radchenko
Max Nikulin writes: > However "cond form will work without changes" is not clear for me. > `org-export-custom-protocol-maybe' is called twice and depending on > context the result should be either "[description]" inline or > "[description] path" for note, so the code around > `org-export-cust

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

2023-10-24 Thread Max Nikulin
On 23/10/2023 19:09, Ihor Radchenko wrote: Max Nikulin writes: Then, `org-ascii-make-link-with-note' may as well receive and modify INFO plist. This way, ((org-export-custom-protocol-maybe link desc 'ascii info)) cond form will work without changes as `org-ascii-make-link-with-note` will do all

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

2023-10-23 Thread Ihor Radchenko
Max Nikulin writes: >> I am not sure what you mean by callback. > > Originally I had an idea that :export should call some function that > adds a note to info. Now I have another proposal. Instead of returning a > cons, :export function should return result of some new function, e.g. > (org-as

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

2023-10-23 Thread Max Nikulin
On 23/10/2023 16:17, Ihor Radchenko wrote: Max Nikulin writes: WRT cons vs. plist, I am mostly neutral. Slightly in favour of plist for future extensibility. I am not sure what you mean by callback. Originally I had an idea that :export should call some function that adds a note to info. Now

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

2023-10-23 Thread Ihor Radchenko
Max Nikulin writes: >>> For ascii backend :export function from `org-link-parameters' may return >>> (PATH . DESCRIPTION) `cons' instead of string. >> >> This is non-standard. We should document it somewhere in the manual. > > Currently the question is whether it is acceptable or it should be >

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

2023-10-22 Thread Max Nikulin
On 22/10/2023 16:13, Ihor Radchenko wrote: Max Nikulin writes: For ascii backend :export function from `org-link-parameters' may return (PATH . DESCRIPTION) `cons' instead of string. This is non-standard. We should document it somewhere in the manual. Currently the question is whether it is

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

2023-10-22 Thread Ihor Radchenko
Max Nikulin 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

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

2023-10-20 Thread Max Nikulin
Hi, In the following thread Ihor Radchenko. Re: Exporting elisp: and shell: links. Sat, 14 Oct 2023 08:13:35 +. https://list.orgmode.org/87wmvp1v0w.fsf@localhost it was discussed that attempts to customize export to plain text of link types such as "elisp:" and "shell:" break formatting as