emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to solve "Warning (emacs): Please update the LaTeX src-block-backend to listings"
@ 2023-08-23 16:24 Guillaume MULLER
  2023-08-24  7:39 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume MULLER @ 2023-08-23 16:24 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 1248 bytes --]

Hi,

I'm trying to create a code block with some latex code to be interpreted inside. I only knew lstlistings until now. Page https://orgmode.org/manual/Source-blocks-in-LaTeX-export.html lists Engraved and Minted as possible backend. https://list.orgmode.org/87wnf1z1w8.fsf@gmail.com/T/ also lists verbatim.

So from what I understand, of the message "Warning (emacs): Please update the LaTeX src-block-backend to listings", is that the default backend is not lstlistings and that there is a variable somewhere that should be set to lstlistings.

However I cannot find any documentation on what variable and where to set it. Is the variable indeed called "src-block-backend". Is it set in global Emacs config? Locally in the org file?

I tried to eval (setq src-block-backend 'listings) and (setq org-latex-listings t) . But error is still there.


Any idea?

-- 
Guillaume MULLER
Associate Professor, PhD
Fayol Institue - ISI Department
🚪 #426
☎ 04 77 42 02 71
🕸 https://www.mines-stetienne.fr
🧍= Physical Address =
   Espace Fauriel
   29 Rue Pierre et Dominique Ponchardier
   42100 Saint-Étienne
📬 = Postal Address =
   École des Mines de Saint-Étienne
   158 cours Fauriel
   42100 Saint-Étienne

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 673 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to solve "Warning (emacs): Please update the LaTeX src-block-backend to listings"
  2023-08-23 16:24 How to solve "Warning (emacs): Please update the LaTeX src-block-backend to listings" Guillaume MULLER
@ 2023-08-24  7:39 ` Ihor Radchenko
       [not found]   ` <ae98244b-f8ff-d138-279d-5e0743966a1a@emse.fr>
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-08-24  7:39 UTC (permalink / raw)
  To: Guillaume MULLER; +Cc: emacs-orgmode@gnu.org

Guillaume MULLER <guillaume.muller@emse.fr> writes:

> I'm trying to create a code block with some latex code to be interpreted inside. I only knew lstlistings until now. Page https://orgmode.org/manual/Source-blocks-in-LaTeX-export.html lists Engraved and Minted as possible backend. https://list.orgmode.org/87wnf1z1w8.fsf@gmail.com/T/ also lists verbatim.
>
> So from what I understand, of the message "Warning (emacs): Please update the LaTeX src-block-backend to listings", is that the default backend is not lstlistings and that there is a variable somewhere that should be set to lstlistings.

Yes. `org-latex-src-block-backend'.
I now updated the warning to be more explicit.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=85c94ecfc

-- 
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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to solve "Warning (emacs): Please update the LaTeX src-block-backend to listings"
       [not found]   ` <ae98244b-f8ff-d138-279d-5e0743966a1a@emse.fr>
@ 2023-08-24  9:23     ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-08-24  9:23 UTC (permalink / raw)
  To: Guillaume MULLER

Guillaume MULLER <guillaume.muller@emse.fr> writes:

> - Would be great to be able to set this parameter per org buffer/file, e.g. with a #+ (#+OPTIONS?) command. Indeed, using the defaults is OK most of the time for most of the users. I only need this trick when I want to force lstlistings, and I only need to force lstlistings when I want to insert a LaTeX inside a src block (it might be possible with other backends, but I don't know how to do it with the other backends, and I can look for documentations as I don't know which is the default backend)

The default backend is verbatim.
You can already set the backend on per-file basis using file-local
variables or #+BIND keywords.

We might add a dedicated Org keyword like #+LATEX_SRC_BLOCK_BACKEND though.

> - It would be great to add this "trick" (on how to change the backend) in the Docs (e.g. the page I cited in my previous email)

> - In the docs, it would also be great to tell what is the default backend (as I thought it was lstlisting and it is clearly not + the message I cited made me think it has changed recently)

Already done in on the development branch. orgmode.org will update the
manual after the next minor release.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a144b2355

> - Finally, when the error is raised, (Doom)Emacs goes definitively berzerck: every time I try to save the/any buffer with C-x C-s "save-buffer", it asks for the name to save to and for a confirmation for overwriting the selected file when I select the same filename as the one that was initially opened. So there might be something that is not restored correctly after the error is rasied?

What do you mean by error? What you described is a warning, not an
error. And it should have 0 effect except displaying a buffer with that warning.

-- 
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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-09  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 16:24 How to solve "Warning (emacs): Please update the LaTeX src-block-backend to listings" Guillaume MULLER
2023-08-24  7:39 ` Ihor Radchenko
     [not found]   ` <ae98244b-f8ff-d138-279d-5e0743966a1a@emse.fr>
2023-08-24  9:23     ` Ihor Radchenko

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).