Re: Bug: code block not evaluated during export when placed in SETUPFILE [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
Le 02/04/2023 à 15:58, Ihor Radchenko a écrit : Ihor Radchenko writes: #+SETUPFILE is only parsed for export settings. It is not actually included. I admit that the wording may be confusing. To actually include the document, use #+INCLUDE. I tried to clarify the manual section in the attached patch. Applied, onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=15e70240e Fixed. Thank's for the work. -- Bruno BEAUFILS Trésorier de la Societé Informatique de France
Re: Bug: code block not evaluated during export when placed in SETUPFILE [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Sat, Feb 18, 2023 at 10:32:38AM +, Ihor Radchenko wrote: > I tried to clarify the manual section in the attached patch. Thank's for your work. -- Bruno BEAUFILS Trésorier de la Societé Informatique de France signature.asc Description: PGP signature
Bug: code block not evaluated during export when placed in SETUPFILE [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
In the org manual the following lines can be read about #+SETUPFILE: (emphaze is mine): » Org also parses and loads the document during normal exporting process. » Org parses the contents of this document **as if it was included** in the » buffer. It can be **another Org file**. However, when I consider the two following files, code block in setup.org is not evaluated at all when exporting, whereas when #+SETUPFILE: is replaced by #+INCLUDE: it is. --- main.org -- #+setupfile: setup.org Something --- setup.org - #+begin_src emacs-lisp :exports results :result silent (message "DEBUG") #+end_src Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian Package: Org mode version 9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/) -- Bruno BEAUFILS Trésorier de la Societé Informatique de France signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Fri, Feb 17, 2023 at 01:30:37PM +, Ihor Radchenko wrote: > Even if we used exit code, what would it achieve? Knowing if the compilation went well (0 as exit status) or not (anything different than 0). > You can do it in batch as well. See `org-sbe'. I did not know this macro. Thank's to pointing me to it. -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Fri, Feb 17, 2023 at 10:55:34AM +, Ihor Radchenko wrote: > > How so? > > latexmk -interaction=nonstopmode Still do not get the problem. I though that the exit code of the underlying process was used but after having try to understand some of the ox-latel.el I discover that it seems to be done another way (analysing the output if I am right). > You can either set a file-local variable, set a directory-local I did not have the idea of directory-local, thank's for it. > variable, or, like John Kitchin often does, put the following src block > on the top of your file and use it for exporting: > > #+begin_src emacs-lisp :exports none > (let () (org-latex-export-to-pdf)) > #+end_src I want to be able to use my file interactively as well as in batch mode, I thus think that this proposition is not really a good solution even if I find it elegant. Thank's again for your nice help. -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Thu, Feb 16, 2023 at 07:47:19PM +0100, Hanno Perrey wrote: > This is just an (semi-)educated guess as I do not have Emacs in > front of me right now, but I would expect the org-latex-compile > would only be called when actually compiling the LaTeX code that is > to say producing the PDF. As long as you only export to a TeX file, > no log files are being generated and thus no clean up is necessary. Of course you must be right. I may be dumb or tired ;-) -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Thu, Feb 16, 2023 at 01:20:36PM +0100, Hanno wrote: > which likely change after the export. It might be just my ingrained > routines speaking All replies I received let me discover that this is clearly a question of habits and routines for some of us :-) > Fair enough. Just out of curiosity: Have you tried setting > org-latex-logfiles-extensions adding "tex" to it as suggested > earlier and does that work for you? Yes I tried it and it work perfectly when creating PDF. I thought that when creating latex file it should also remove the produced latex which could be a majour problem. In fact it does not, which I do not understand why when looking at the code of org-latex-compile. I am surely missing something. -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Wed, Feb 15, 2023 at 08:37:51PM +, Ihor Radchenko wrote: > The problem with LaTeX export is that it is not always possible to know > if the process truly finished without errors or not. How so? > I guess we might make this a user options, if more people are > interested. I personnaly think that this should be a nice option. > Meanwhile, you can tweak org-latex-logfiles-extensions adding "tex". I tried that but I do not want it to be a global value : in some case I still want the latex file to be the output (I do specific latex export in that case) for instance when things goes wrong. Maybe I should try to find a way to set this variable only when I export to PDF. I will look at hooks but if you know the one I should use that could be nice. -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Thu, Feb 16, 2023 at 06:54:16AM +0100, Hanno Perrey wrote: > I see the export to PDF as a shortcut only and appreciate having the > .tex file besides it. As the TeX file is the most reliable way to > regenerate the exact PDF again later again (even on other peoples' > machines without Emacs installed) I like to keep it in many cases > "for the record". You just still can export the original source file and convert it to latex if needed. > I would personally opt for keeping the current default, that is keeping the > TeX file. I would opt for letting that choice to the user (through the settings of a buffer settings). -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Wed, Feb 15, 2023 at 09:52:52PM +0100, alain.coch...@unistra.fr wrote: > Sometimes I select a part of the .tex and send it to someone who does > not use Org mode, for inclusion into his own tex file. One can also > think about doing things that are not (yet) possible with Org mode (or > that one does not know how to do). OK but you still can do this by just export the file to LaTeX (buffer or file) when needed. -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
On Wed, Feb 15, 2023 at 09:34:21AM -1000, Thomas S. Dye wrote: > I often use the .tex file to track down compilation issues. I don't want > Org to delete it. I get your point. In that case the file must not be removed when the compilation failed. In all other (more numerous) cases (when everything went well) what is the point to have this file in addition to the source and the output? -- Bruno BEAUFILS signature.asc Description: PGP signature
Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)]
When using the org-latex-export-to-pdf on any foo.org file I get the foo.pdf file produced the right way but I also get the foo.tex file. I think that the whole point of exporting to pdf is only to get the pdf file, avoiding the need to keep the latex one. I guess that one of org-latex-compile or org-latex-export-to-pdf function should remove the source LaTeX file if the compile went well. Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian Package: Org mode version 9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/) -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test
On Mon, Nov 23, 2020 at 01:12:45PM +, Eric S Fraga wrote: > Don't be too hard on yourself! :-) :-) Any way this nice clean solution works well for almost all my cases but one: when I include image I want them to be in pdf format in LaTeX export and in original svg source when exporting in HTML. I tried different way without any success without my old eval-fueled =if-backend= MACRO, which I used that way {{{svg(myimage)}}} (extension being added correctly depending of the backend). Any idea how to achieve this? -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test
On Mon, Nov 23, 2020 at 10:19:16AM +, Eric S Fraga wrote: > Maybe define your macro like this: > > #+macro: hfill @@latex:\hfill@@ Very good idea indeed. I blame myself not having it in the first place. Thank's a lot! -- Bruno BEAUFILS signature.asc Description: PGP signature
Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test
On Sun, Nov 22, 2020 at 12:18:07AM +1100, Tim Cross wrote: > Hmm, I just use backend specific blocks for this purpose. e.g. > > #+begin_export latex > \hfil{} > #+end_export Yes but it is what I try to avoid in order to let the file as simple and readable as possible. > IMO the org #+MACRO is really just a text substitution mechanism (like > C), not a 'real' macro (like elisp has) and as is the case with C, you > really need to keep them pretty simple. Once you start using them to > evaluate code, it isn't hard to find yourself in a mine field. I agree but as the possibility was offered I used it ;-) The only trouble is that this eval feature changed in a hard way between 9.1 and 9.2. -- Bruno BEAUFILS signature.asc Description: PGP signature
looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test
I have a *lot* of org files with a macro =if-backend= which enables me to decide what to export depending on the backend : #+begin_src org #+macro: if-backend (eval (if (org-export-derived-backend-p org-export-current-backend '$1) "$2")) #+end_src For instance, I use it to include =\hfill= in LaTeX family export engines but not in others (html for instance) : #+begin_src org #+macro: hfill {{{if-backend(latex, \\hfill{} )}}} #+end_src I generally use emacs 26.3 as distributed by Debian bullseyes (which offer org-mode version 9.1.9). On another box I need to work with a more recent org-mode, precisely 9.4. In that environment, due to an incompatible change introduced by [[https://orgmode.org/Changes_old.html#outline-container-org003add6][release 9.2]] the same macro has to be written in a different way : #+begin_src org #+macro: if-backend (eval (if (org-export-derived-backend-p org-export-current-backend (intern $1)) $2)) #+end_src And thus I need to change also the macro using it, for instance the =hfill= macro has to be written that way : #+begin_src org #+macro: hfill {{{if-backend(latex, \hfill{} )}}} #+end_src For now I need to work on the same files in these two different environment. Do anyone have an idea on how to be able whether to define the =if-backend= in a way that it can work in both org versions or if there is a way to define these macro in different ways depending on org version? I would like to let the definitions in org files and not in emacs init files. -- Bruno BEAUFILS signature.asc Description: PGP signature
org-tempo question
Does anyone have any idea where I can look to understand that? -- Bruno BEAUFILS --- Begin Message --- Let us imagine this simple org file : #+NAME: first #+begin_src org - an item - subitem #+end_src If the cursor is at the last line and I want to insert an org block, let's say an example, using org-tempo feature, I can type =>. Any help would appreciated. I use GNU Emacs 26.3 from Debian GNU bullseye (testing) and what I think is the last org-mode version from ELPA. #+begin_src Org mode version 9.3.7 (9.3.7-55-gba2405-elpa @ /home/bruno/.emacs.d/elpa/org-20200907/) #+end_src -- Bruno BEAUFILS signature.asc Description: PGP signature --- End Message --- signature.asc Description: PGP signature
org-tempo insertion incoherence (lack of indentation) or misunderstanding
Let us imagine this simple org file : #+NAME: first #+begin_src org - an item - subitem #+end_src If the cursor is at the last line and I want to insert an org block, let's say an example, using org-tempo feature, I can type =>. Any help would appreciated. I use GNU Emacs 26.3 from Debian GNU bullseye (testing) and what I think is the last org-mode version from ELPA. #+begin_src Org mode version 9.3.7 (9.3.7-55-gba2405-elpa @ /home/bruno/.emacs.d/elpa/org-20200907/) #+end_src -- Bruno BEAUFILS signature.asc Description: PGP signature
[O] Bug: Infinite loop using macros [9.0.3 (9.0.3-dist @ /usr/share/emacs24/site-lisp/org-mode/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. This simple file makes Emacs loops and freeze when trying to export it. #+MACRO: test {{{test}}} {{{test}}} I can concieve that no simple solution could be find. In pandoc a recursion limit will be implemented (see https://github.com/jgm/pandoc/issues/3401). At least, maybe a warning about such a behavior should be added to the manual. Emacs : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.7) of 2017-01-22 on trouble, modified by Debian Package: Org mode version 9.0.3 (9.0.3-dist @ /usr/share/emacs24/site-lisp/org-mode/) -- Bruno BEAUFILS signature.asc Description: PGP signature