Re: visual-line-mode don't play well with org-latex-preview
On Wednesday, 8 March 2023 20:14:53 CET Bruno Barbier wrote: > > Hi Chris, > > chris writes: > > > On Thursday, 2 March 2023 20:00:14 CET Bruno Barbier wrote: > >> The behavior looks the same using only text-mode (without using org). > >> You should probably report this as an Emacs bug (see M-x > >> report-emacs-bug). > > > > What command for latex preview in text mode? (I'll probably figure that > > out.) > > > > org-latex-preview. Why ? :-) > > > > Yes, I should definitely report that bug. > > In case it helps you to report the bug, here is the minimal way I found > to reproduce it (no latex, no org): > > #+begin_src elisp >(let ((b (generate-new-buffer "=bug"))) > (with-current-buffer b >(dotimes (_ 110) (insert "Hello ")) >(insert-image (svg-image (let ((s (svg-create 250 9))) >(svg-line s 0 0 250 9 :stroke-color > "green") >s))) >(org-mode) >(visual-line-mode 1) >(pop-to-buffer b))) > #+end_src Amazing, Chris > > Bruno >
Re: visual-line-mode don't play well with org-latex-preview
Hi Chris, chris writes: > On Thursday, 2 March 2023 20:00:14 CET Bruno Barbier wrote: >> The behavior looks the same using only text-mode (without using org). >> You should probably report this as an Emacs bug (see M-x >> report-emacs-bug). > > What command for latex preview in text mode? (I'll probably figure that out.) > org-latex-preview. Why ? :-) > Yes, I should definitely report that bug. In case it helps you to report the bug, here is the minimal way I found to reproduce it (no latex, no org): #+begin_src elisp (let ((b (generate-new-buffer "=bug"))) (with-current-buffer b (dotimes (_ 110) (insert "Hello ")) (insert-image (svg-image (let ((s (svg-create 250 9))) (svg-line s 0 0 250 9 :stroke-color "green") s))) (org-mode) (visual-line-mode 1) (pop-to-buffer b))) #+end_src Bruno
Re: visual-line-mode don't play well with org-latex-preview
On Thursday, 2 March 2023 20:00:14 CET Bruno Barbier wrote: > > Hi Chris, > > chris writes: > > > Hi all, > > > > ``` > > hello hello hello hello hello hello hello hello hello hello hello hello > > hello > > hello hello \(\text {hello hello hello hello hello hello hello hello}\) > > ``` > > > > If you put the above text in a org file, and activate `visual-line-mode` > > and > > `org-latex-preview`, depending on the length of the initial part of the > > text, > > the generated png/svg image from latex expression can be displayed in full, > > partially hidden or totally hidden. > > > > I'm observing the same behavior. > > The preview is not always fully visible. But, after adding some text > (at least one space after the preview), Emacs wraps as needed, so that > the preview remains visible. That is a very nice workaround. > Emacs is just not wrapping correctly in > that edge case, where there is nothing at all after the latex preview. > > The behavior looks the same using only text-mode (without using org). > You should probably report this as an Emacs bug (see M-x > report-emacs-bug). What command for latex preview in text mode? (I'll probably figure that out.) Yes, I should definitely report that bug. Thanks a lot, Chris > > Bruno >
Re: visual-line-mode don't play well with org-latex-preview
Hi Chris, chris writes: > Hi all, > > ``` > hello hello hello hello hello hello hello hello hello hello hello hello hello > hello hello \(\text {hello hello hello hello hello hello hello hello}\) > ``` > > If you put the above text in a org file, and activate `visual-line-mode` and > `org-latex-preview`, depending on the length of the initial part of the text, > the generated png/svg image from latex expression can be displayed in full, > partially hidden or totally hidden. > I'm observing the same behavior. The preview is not always fully visible. But, after adding some text (at least one space after the preview), Emacs wraps as needed, so that the preview remains visible. Emacs is just not wrapping correctly in that edge case, where there is nothing at all after the latex preview. The behavior looks the same using only text-mode (without using org). You should probably report this as an Emacs bug (see M-x report-emacs-bug). Bruno
visual-line-mode don't play well with org-latex-preview
Hi all, ``` hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello \(\text {hello hello hello hello hello hello hello hello}\) ``` If you put the above text in a org file, and activate `visual-line-mode` and `org-latex-preview`, depending on the length of the initial part of the text, the generated png/svg image from latex expression can be displayed in full, partially hidden or totally hidden. That certainly hinder readability. I've search the web to see if someone else did stumbled on that but haven't found anything yet. Sure enough there isn't an obvious fix that would deal with every cases, like when the image is longer that the width of the window of the max column of `visual-column-mode`. At least there are different cases to consider. Best, Chris