emacs-orgmode
[Top][All Lists]
Advanced

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

Re: About 'inline special blocks'


From: Ihor Radchenko
Subject: Re: About 'inline special blocks'
Date: Wed, 25 May 2022 15:22:09 +0800

Max Nikulin <manikulin@gmail.com> writes:

> On 24/05/2022 09:51, Timothy wrote:
>> 
>> To me, this is another reason for comment and #+attr_X lines not to break
>> paragraphs, as then we can just re-use #+attr_X lines.
>
> I like the idea that comments and attribute lines should not be 
> paragraph separators. I expect, it should alleviate the issue that LaTeX 
> and Org paragraphs may significantly differ. Do somebody has examples 
> when such change will cause negative effects (besides broken 
> compatibility, of course)?

I will raise a compatibility issue, but it is bad enough to not think
about other things.
AFAIU, the proposed change will break whole export system? How would you
represent the AST of

First line
# comment
Second line

?

Currently, the above is parsed as 

(org-data
    (section
        (paragraph "First line\n")
        (comment (... :value "comment" ))
        (paragraph "Second line\n"))))

Should we consider a comment as inline object? I suspect that such
change will cause unpredictable breakages all around Org and third-party
packages.

> I had an idea to implement proof-of-concept for inline attributes using 
> a special link type and a parse tree filter that transfers attributes to 
> the next object. Unfortunately time related bugs in Emacs appeared to be 
> rather time consuming.
>
> ---- >8 ----
> #+macro: nofollow [[attr:(:html (:rel "nofollow noopener"))]]
>
> An {{{nofollow}}[[attr:(:html (:title "be 
> careful!"))]][[http://unsafe.com][unsafe link]].
> ---- 8< ----
>
> Such implementation would allow to test if it convenient enough and 
> whether special blocks are really necessary.

I am not sure if I like this idea. It seems fine, but I afraid that it
will complicate parser at some point. We may want to assign such inline
properties to the following object, which is already a pain for
affiliated keywords.

Best,
Ihor




reply via email to

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