[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Feature Request) have org-edit-special work inside non-environment
From: |
Timothy |
Subject: |
Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \] |
Date: |
Tue, 19 May 2020 21:32:19 +0800 |
Nicolas Goaziou <address@hidden> writes:
> LaTeX fragments are at a lower level than plain "elements", so
> `org-element-at-point' does not see them.
I see. Might you be willing to do & show me the modifications needed to
use the `latex-fragment case?
>> Can I really get away without modifying anything more than
>> org-edit-special and writing org-edit-latex-fragment ?
> Yes, you (we) can!
Fantastic!
In other news, I have sent off am email to address@hidden, so hopefully
you'll be able to accept >15 loc patches from me in the (near?) future :)
> Timothy <address@hidden> writes:
>
>>> It sounds like you took the opposite route. I suggested to first
>>> write a function, `org-edit-latex-fragment'.
>> I wanted to see how it would fit in first ¯\_(ツ)_/¯
>
> Sure. That's a good way to learn stuff. In this case, it's not the
> easiest one, though.
>
>>> Once done, you can insert it in `org-edit-special', but it boils
>>> down to adding a line there, right below (`inline-src-block ...):
>
>> For that to work though, i.e. adding something of the form
>> (latex-fragment ...) I'd want a `latex-fragment type to be returned
>> from org-element-at-point wouldn't I?
>
> This is already done a few lines above in `org-edit-special', when
> `org-element-context' is called.
>
> LaTeX fragments are at a lower level than plain "elements", so
> `org-element-at-point' does not see them.
>
>> At the moment running (org-element-at-point) inside \( … \) yields
>> paragraph.
>
> See above.
>
>> Can I really get away without modifying anything more than
>> org-edit-special and writing org-edit-latex-fragment ?
>
> Yes, you (we) can!
>
- (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/18
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \],
Timothy <=
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/19
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Bastien, 2020/05/23