Re: Worg build status?

2024-03-22 Thread Bastien Guerry
Ihor Radchenko  writes:

> This is still a problem. Likely on Sourcehut side.

Yes, I haven't received an answer from sr.ht yet, too bad.

> For now, only Bastien can trigger the builds.

In the meantime, I've set up a cron job to publish Worg every 12
hours, this is not entirely satisfactory, just a bit better.

-- 
 Bastien Guerry



Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-22 Thread Michael
I have a small patch for `org-preview-latex-process-alist' 
making
the default setting for LaTeX source block evaluation be 
running

latex three times (instead of the current one). It is sometimes
necessary to run latex more than once to produce the final
document, a phenomenom described in the docstring for
`org-latex-pdf-process' which itself runs latex three times by
default. This patch just brings the former variable into parity
with the latter.


Thanks for the patch!
May you please describe a use case when it is necessary to run 
latex

multiple times for previews?


Sure: it's required whenever you have LaTeX that refers to
other document elements whose positions are only known after
they've been typeset. This often comes up with bibliographies; to
quote the docstring for `org-latex-pdf-process': "The reason why
this is a list is that it usually takes several runs of
‘pdflatex’, maybe mixed with a call to ‘bibtex’."

I personally encountered it when using the tikzmark library from
the tikzpicture package to draw  annotations on a table (LaTeX
needed to be run once to typeset the table & only then did it
"know" where the arrows needed to be drawn).

Oh-- and it's not just previews (sorry if I gave that
impression)-- it's also required for "evaluating" LaTeX source
blocks.


CCing Timothy and Kathik - I see that
https://code.tecosaur.net/tec/org-mode/src/branch/dev/lisp/org-latex-preview.el#L102
still uses a single compiler invocation.



--
Michael 



[PATCH][DOC]: Add footnote on how to enable described functionality

2024-03-22 Thread Nick Dokos
I previously submitted a bug on what I thought was a code bug, but which
turned out to be (partly) a mistake on my part and was canceled:

   
https://list.orgmode.org/878r2b4dpy.fsf@localhost/T/#m48b7ea939117f241069fafbcf3726587837f3e70

But there is still a doc bug: since the default value of
`org-html-head-include-scripts' was changed to `nil' in Org 9.5, the
functionality described in the `Literal Examples' section of the manual
is no longer enabled by default. The attached patch adds a footnote to
describe how to enable that functionality. Thanks to user @JeanPierre on
Emacs SE for the original question and the push for the doc patch:

   
https://emacs.stackexchange.com/questions/80783/org-mode-export-to-html-onmouseover-highlighting-of-referenced-code-lines

>From 127d9628b9b1e8be54cdc715ab4e6bdcc012d716 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Fri, 22 Mar 2024 09:08:22 -0400
Subject: [PATCH] org-manual: Add footnote on how to enable described
 functionality.

* doc/manual.org (Literal Examples): The functionality of having
`ref:' links remote-highlighted in HTML is disabled by default (since
version 9.5). Add a footnote to explain how to enable it.

Link: https://emacs.stackexchange.com/questions/80783/org-mode-export-to-html-onmouseover-highlighting-of-referenced-code-lines
---
 doc/org-manual.org | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 211208c424c8..c4f62644f8db 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -11623,9 +11623,12 @@ to determine the starting line number.
 
 In literal examples, Org interprets strings like =(ref:name)= as
 labels, and use them as targets for special hyperlinks like
-=[[(name)]]=---i.e., the reference name enclosed in single parenthesis.
-In HTML, hovering the mouse over such a link remote-highlights the
-corresponding code line, which is kind of cool.
+=[[(name)]]=---i.e., the reference name enclosed in single
+parentheses.  In HTML, hovering the mouse over such a link
+remote-highlights the corresponding code line[fn:: This requires some
+Javascript which is /not/ automatically included in the HTML output:
+you have to customize the variable =org-html-head-include-scripts= to
+~t~ to have it included (it is ~nil~ by default).], which is kind of cool.
 
 You can also add a =-r= switch which /removes/ the labels from the
 source code[fn:: Adding =-k= to =-n -r= /keeps/ the labels in the
-- 
2.43.0


-- 
Nick




Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-22 Thread Ihor Radchenko
Michael  writes:

> I have a small patch for `org-preview-latex-process-alist' making
> the default setting for LaTeX source block evaluation be running
> latex three times (instead of the current one). It is sometimes
> necessary to run latex more than once to produce the final
> document, a phenomenom described in the docstring for
> `org-latex-pdf-process' which itself runs latex three times by
> default. This patch just brings the former variable into parity
> with the latter.

Thanks for the patch!
May you please describe a use case when it is necessary to run latex
multiple times for previews?

CCing Timothy and Kathik - I see that
https://code.tecosaur.net/tec/org-mode/src/branch/dev/lisp/org-latex-preview.el#L102
still uses a single compiler invocation.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Parser error: Invalid search bound (wrong side of point) [9.6.15 (release_9.6.15 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2024-03-22 Thread Ihor Radchenko
"Thomas Sanders (Moody's)"  writes:

> Sorry: I'm not sure what I was doing when a warning appeared with a
> request for me to make a bug-report. I think it might have happened on
> auto-save when I was working in a different Emacs frame from the one
> displaying the relevant Org mode buffer.
>
> The warning was:
>
> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
> threadnotes.org::1723. Resetting.
>  The error was: (error "Invalid search bound (wrong side of point)")
> ...
> Emacs  : GNU Emacs 29.2 (build 1, aarch64-apple-darwin21.6.0, NS 
> appkit-2113.60 Version 12.6.6 (Build 21G646))
>  of 2024-01-18
> Package: Org mode version 9.6.15 (release_9.6.15 @ 
> /Applications/Emacs.app/Contents/Resources/lisp/org/)

Thanks for reporting!
If you can, may you test if the same thing keep happening if you use the
latest development version of Org mode (main branch)?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Stray divs in HTML export [9.6.15 (release_9.6.15 @ /home/jm/.local/share/emacs/30.0.50/lisp/org/)]

2024-03-22 Thread Ihor Radchenko
john muhl  writes:

> The closing s inside HTML comment blocks appear outside the
> comment which makes the exported HTML invalid. For example:
>
>   #+title: Stray div demo
>
>   Hello.
>
>   #+html: 
>
>   Goodbye.

Your example is using direct HTML formatting.
It is user responsibility that direct HTML is valid and plays well with
the rest of the document.

Org provides the power to insert arbitrary HTML into the output, but
this power comes with responsibility to ensure correctness.

Not a bug.
Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] `org-html-head-include-scripts' default value should be `t' but it's nil instead [9.7-pre (release_9.6.20-1267-gb0c3c9 @ /home/nick/src/emacs/org/org-mode/lisp/)]

2024-03-22 Thread Ihor Radchenko
Nick Dokos  writes:

>> The default value is nil.
>
> You are right...

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [DISCUSSION] "quick-help" popup for org-columns (column view)

2024-03-22 Thread JD Smith


> On Feb 8, 2024, at 6:01 PM, Stefan Kangas  wrote:
> 
> Adam Porter  writes:
> 
>> Since transient.el is part of Emacs now, these kinds of menus should
>> probably be implemented with it.
> 
> IIUC, this is not a menu, but a reminder of key bindings that are usable
> in that context.  Other keybindings here are self-inserting keys, which
> are equally useful, and they wouldn't be available in a transient.

Also recall we had a discussion in bug#68236 
 about 
expanding quick-help to include mode-local personalized binding shortcuts (with 
org as a particular target of interest).  



[PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-22 Thread Michael

Hello,

I have a small patch for `org-preview-latex-process-alist' making
the default setting for LaTeX source block evaluation be running
latex three times (instead of the current one). It is sometimes
necessary to run latex more than once to produce the final
document, a phenomenom described in the docstring for
`org-latex-pdf-process' which itself runs latex three times by
default. This patch just brings the former variable into parity
with the latter.

>From 7b297f61ee6dfb74e64c9b2a706982638a69e7f0 Mon Sep 17 00:00:00 2001
From: Michael Herstine 
Date: Thu, 21 Mar 2024 15:50:27 -0700
Subject: [PATCH] lisp/org.el (org-preview-latex-process-alist): Run latex
 multiple times

* lisp/org.el (org-preview-latex-process-alist): Run latex three
times by default

It is sometimes necessary to run latex more than once against a
given .tex file; something ably explained in the docstring for
`org-latex-pdf-process', which exports LaTeX by running latex
three times (by default). This patch brings
`org-preview-latex-process-alist' into parity with that variable,
running latex three times by default when previewing LaTeX.
---
 lisp/org.el | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index caddf22a1..73b6a1e0a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3300,7 +3300,9 @@ All available processes and theirs documents can be found in
  :image-input-type "dvi"
  :image-output-type "png"
  :image-size-adjust (1.0 . 1.0)
- :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f"
+  "latex -interaction nonstopmode -output-directory %o %f"
+  "latex -interaction nonstopmode -output-directory %o %f")
  :image-converter ("dvipng -D %D -T tight -o %O %f")
  :transparent-image-converter
  ("dvipng -D %D -T tight -bg Transparent -o %O %f"))
@@ -3311,7 +3313,9 @@ All available processes and theirs documents can be found in
  :image-input-type "dvi"
  :image-output-type "svg"
  :image-size-adjust (1.7 . 1.5)
- :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f"
+  "latex -interaction nonstopmode -output-directory %o %f"
+  "latex -interaction nonstopmode -output-directory %o %f")
  :image-converter ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))
 (imagemagick
  :programs ("latex" "convert")
@@ -3320,7 +3324,9 @@ All available processes and theirs documents can be found in
  :image-input-type "pdf"
  :image-output-type "png"
  :image-size-adjust (1.0 . 1.0)
- :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
+ :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f"
+  "pdflatex -interaction nonstopmode -output-directory %o %f"
+  "pdflatex -interaction nonstopmode -output-directory %o %f")
  :image-converter
  ("convert -density %D -trim -antialias %f -quality 100 %O")))
   "Definitions of external processes for LaTeX previewing.
-- 
2.44.0



--
Michael 


[BUG] Stray divs in HTML export [9.6.15 (release_9.6.15 @ /home/jm/.local/share/emacs/30.0.50/lisp/org/)]

2024-03-22 Thread john muhl
The closing s inside HTML comment blocks appear outside the
comment which makes the exported HTML invalid. For example:

  #+title: Stray div demo

  Hello.

  #+html: 

  Goodbye.

Produces this HTML (cleaned up to make it easier to read, see
attached for original files):

  Hello.
  
  Goodbye.
  
  
  


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, 
cairo version 1.18.0)
 of 2024-03-08
Package: Org mode version 9.6.15 (release_9.6.15 @ 
/home/jm/.local/share/emacs/30.0.50/lisp/org/)



org-html-export-bug.org
Description: Lotus Organizer

Table of Contents


1. Heading

1.1. Subheading






Hello.





Goodbye.






org-persist asking for temp-file encoding every time

2024-03-22 Thread Brian Elmegaard

Hi

I am experiencing a small issue with an org-file.
Every time I close it I am prompted with:
Select coding system (default utf-8):
when org-mode is saving a *Temp file*.

In the *Messages* buffer it says:
org-persist: Writing to 
"c:/Users/user/AppData/Roaming/.emacs.d/org-persist/18/673ac1-50b0-4f3c-9cab-58f496875f4f" 
took 56.90 sec.


Can this somehow be avoided?

Best regards,
Brian




[BUG] Parser error: Invalid search bound (wrong side of point) [9.6.15 (release_9.6.15 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2024-03-22 Thread Thomas Sanders (Moody's)
Sorry: I'm not sure what I was doing when a warning appeared with a
request for me to make a bug-report. I think it might have happened on
auto-save when I was working in a different Emacs frame from the one
displaying the relevant Org mode buffer.

The warning was:

⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
threadnotes.org::1723. Resetting.
 The error was: (error "Invalid search bound (wrong side of point)")
 Backtrace:
"  backtrace-to-string(nil)
  org-element-at-point()
  org-return(nil nil 1)
  funcall-interactively(org-return nil nil 1)
  call-interactively(org-return nil nil)
  command-execute(org-return)
"
 Please report this to Org mode mailing list (M-x org-submit-bug-report).


Emacs  : GNU Emacs 29.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 
Version 12.6.6 (Build 21G646))
 of 2024-01-18
Package: Org mode version 9.6.15 (release_9.6.15 @ 
/Applications/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines 
org-cycle-optimize-window-after-visibility-change
  org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-fold-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-fold-core-isearch-open-function 'org-fold--isearch-reveal
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete 
org-attach-complete-link) ("id" :follow org-id-open)
   ("eww" :follow org-eww-open :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link 
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export 
:store org-info-store-link :insert-description
org-info-description-as-command)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export 
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("doi" :follow 
org-link-doi-open :export org-link-doi-export) ("file+sys")
   ("file+emacs") ("shell" :follow org-link--open-shell)
   ("news" :follow #[514 "\301\300\302Q\"\207" ["news" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("mailto" :follow #[514 "\301\300\302Q\"\207" 
["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("https" :follow #[514 "\301\300\302Q\"\207" ["https" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("http" :follow #[514 "\301\300\302Q\"\207" ["http" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("help" :follow org-link--open-help :store 
org-link--store-help) ("file" :complete org-link-complete-file)