[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Feature Request) have org-edit-special work inside non-environment
From: |
TEC |
Subject: |
Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \] |
Date: |
Mon, 25 May 2020 09:33:51 +0800 |
User-agent: |
mu4e 1.4.6; emacs 26.3 |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Timothy <address@hidden> writes:
>
>> Well that didn’t quite work as intended. Here’s a take two.
>
> This doesn’t look bad. Thank you.
> In the commit message, you need to list functions being modified. See
> other commits messages for some examples.
I’ll patch my patch :P
>> + ((eq type ’latex-fragment)
>> + (let ((beg (org-element-property :begin datum))
>> + (end (org-element-property :end datum)))
>> + (list beg end (buffer-substring-no-properties beg end))))
>
> These are not correct buffer positions. BEG and END should be between
> “\(" and "\)” (or “\(" and "\)”, or…). See, in the same function, how
> inline source blocks are handled.
I thought that too initially. The think is you actually want them in the LaTeX
buffer so they get treated as mathematics instead of text.
>> + (org-src–edit-element
>> + context
>> + (org-src–construct-edit-buffer-name (buffer-name) “LaTeX fragment”)
>> + (org-src-get-lang-mode “latex”)
>> + t)
>> + t))
>
> You also need to put read-only property on fragment markers, and remove
> any blank line as the final step. See `org-edit-footnote-reference’.
I’ll take a look :)
>> (pcase (org-element-type context)
>> (`footnote-reference (org-edit-footnote-reference))
>> (`inline-src-block (org-edit-inline-src-code))
>> + (`latex-fragment (org-edit-latex-fragment))
>
> This line is perfect ;)
I must have had great inspiration for it ;-)
Regards,
Timothy.
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], (continued)
Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Bastien, 2020/05/23
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], tecosaur, 2020/05/23
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/24
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/24
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Timothy, 2020/05/24
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/24
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \],
TEC <=
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], TEC, 2020/05/25
- Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \], Nicolas Goaziou, 2020/05/25