Sébastien Miquel <sebastien.miq...@posteo.eu> writes:

>> 1. When `org-src-preserve-indentation' is in effect, remove the common
>>     `org-src-preserve-indentation' + #+begin indentation from the body.
>
> You've mixed up =org-src-preserve-indentation= and
> =org-edit-src-content-indentation= so I may misunderstand.

You are right. I was referring to the value of
`org-edit-src-content-indentation' when talking about the indentation
offset.

> ...But I guess
> what you propose amounts to
> ...

You are right.

>>> I was not aware of how we treated inline src blocks, but I don't think
>>> so. LaTeX fragments, in particular $$…$$ fragments, can have
>>> significant (for the user) newlines.
>>
>> May you provide an example?
>> AFAIK, LaTeX usually treats newlines as whitespace, same with " ".
>
> When I say significant, I don't mean for compilation. When editing an
> array of equations for example, one might want to keep one equation
> per line in the buffer.

Then, may latex-fragment-specific logic be moved to
`org-edit-latex-fragment'? It already provides WRITE-BACK in
the `org-src--edit-element' call. We may as well take care about
clearing up indentation of the first line and other things there.

Side note: It looks like `org-edit-special' docstring does not mention
all the cases it considers. In particular, latex fragments are not
mentioned.

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