emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Timothy <orgmode@tec.tecosaur.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system
Date: Wed, 15 Mar 2023 09:34:36 +0000	[thread overview]
Message-ID: <871qlqs6hf.fsf@localhost> (raw)
In-Reply-To: <87cz5buxgr.fsf@tec.tecosaur.net>

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

Timothy <orgmode@tec.tecosaur.net> writes:

>> 3. It took 20+ seconds (!!!) to generate previews in a single section in
>>    my large notes.org. Profile attached - org-latex-preview parses the
>>    whole 20Mb buffer to generate the preamble. Why?
>
> Because of the use of buffer info in generating the preamble, which calls
> `org-export--annotate-info'. I’m currently considering introducing a variable to
> allow for the use of buffer-specific info to be toggled.

What if `org-export--annotate-info' could be made async?

>> 5. Why triangles? Something resembling “waiting” would be more
>>    meaningful.
>
> It has to be a small icon, so that basically means simple geometric shapes only.
> There’s also the “grey text” indicator, and “no indicator” option.

What about

(define-fringe-bitmap
    'sand-clock
    [#b11111111
     #b10000001
     #b01000010
     #b01000010
     #b01101110
     #b00111100
     #b00011000
     #b00100100
     #b01000010
     #b01011010
     #b11111111
     #b11111111])


[-- Attachment #2: sand-clock.png --]
[-- Type: image/png, Size: 10549 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1561 bytes --]



>> 6. What will happen if I add/remove #+LATEX_HEADER in the buffer? in
>>    subtree properties? Are in-buffer latex settings supposed to affect
>>    anything? I tried to add #+LATEX_HEADER on top of the file, but the
>>    preview do not appear to be re-generated.
>
> Currently you need to set `org-latex-preview--preamble-content' to nil, which
> currently can be done by doing `C-c C-c' on the header / otherwise running
> `org-restart'.

It would be better to provide a command.
C-c C-c is too dramatic - it will reset much more than just preview
cache. (Like org-element-cache).

Or better add a new prefix arg to org-latex-preview that will force
re-generation.

Further, as discussed in the DM, we may need to consider that equation
preview may depend on latex export settings:

1. preview might be generic, utilizing "average" common latex preamble
2. preview might try to conform to latex export settings according to
   full document export
3. preview might use a different latex preamble when the current subtree
   will not actually be exported - like in commented subtrees. In
   particular, it matters for equation numbering
4. preview might try to generate preamble according to subtree export
   settings - some Org workflows involve multiple documents in one Org
   file, exported separately via subtree export.
   
-- 
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	other threads:[~2023-03-15  9:33 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 12:23 [Pre-PATCH] Overhaul of the LaTeX preview system Timothy
2023-03-13 12:26 ` Ihor Radchenko
2023-03-14 16:04   ` Timothy
2023-03-15  9:34     ` Ihor Radchenko [this message]
2023-03-15 17:28       ` Rudolf Adamkovič
2023-03-13 12:30 ` Ihor Radchenko
2023-03-13 12:32   ` Ihor Radchenko
2023-03-14 14:46     ` Timothy
2023-03-13 12:36 ` Ihor Radchenko
2023-03-14 16:10   ` Timothy
2023-03-15  9:38     ` Ihor Radchenko
2023-03-13 12:37 ` Ihor Radchenko
2023-03-14 16:13   ` Timothy
2023-03-25 15:29 ` Tony Zorman
2023-05-02 12:15 ` K. Chousos
2023-05-03 10:07 ` K. Chousos
2023-05-05 17:57   ` Karthik Chikmagalur
2023-05-05 18:48     ` Konstantinos Chousos
2023-05-05 18:53     ` Konstantinos Chousos
2023-05-05 20:05       ` Karthik Chikmagalur
2023-05-05 21:06         ` Konstantinos Chousos
2023-05-05 22:58           ` Karthik Chikmagalur
2023-05-06  9:19             ` Konstantinos Chousos
2023-05-06  9:30               ` Ihor Radchenko
2023-05-06 10:08               ` Konstantinos Chousos
2023-05-08 20:04               ` Karthik Chikmagalur
2023-05-08 20:40                 ` Konstantinos Chousos
2023-05-09 11:34                 ` Ihor Radchenko
2023-05-09 12:03                   ` Timothy
2023-05-09 12:10                     ` Ruijie Yu via General discussions about Org-mode.
2023-05-09 12:12                     ` Ihor Radchenko
2023-05-09 12:10                       ` Timothy
2023-05-09 12:49                   ` Max Nikulin
2023-05-09 12:57                     ` Ihor Radchenko
2023-05-10 10:07 ` Jun Inoue
2023-05-10 10:21   ` Timothy
2023-05-10 13:09     ` Jun Inoue
2023-05-26  9:50 ` Rudolf Adamkovič
2023-05-28 17:31   ` Timothy
2023-06-03  9:00     ` Rudolf Adamkovič
2023-08-21  8:59 ` Visuwesh
2023-08-21 16:40   ` Karthik Chikmagalur
2023-08-21 17:19     ` Visuwesh
2023-08-21 21:40       ` Karthik Chikmagalur
2023-08-22  2:57         ` Visuwesh
2023-08-29  6:01 ` Roshan Shariff
2023-08-29  6:01 ` [PATCH 1/1] Fix background color when line-wrapping latex previews Roshan Shariff
2023-08-29 17:14   ` [PATCH v2] Fix background color of " Roshan Shariff
2024-01-07  7:25     ` Timothy
2024-01-07  9:50       ` Roshan Shariff
2024-01-08 10:24         ` Timothy
2024-01-09 20:12           ` Roshan Shariff
2024-01-07  7:28 ` [Pre-PATCH] Overhaul of the LaTeX preview system Timothy
2024-01-20  5:53 ` Matt Huszagh
2024-01-20  6:02 ` Matt Huszagh
2024-01-20  7:13   ` Matt Huszagh
2024-01-21 17:08     ` Timothy
  -- strict thread matches above, loose matches on Subject: below --
2023-06-04 23:29 Rudolf Adamkovič
2023-06-05  5:27 ` Pedro Andres Aranda Gutierrez
2023-08-07  8:12 WANG Yicheng
2023-08-08  8:30 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qlqs6hf.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).