[PATCH] Fix `org-babel-detangle' handling of false positives

2020-01-29 Thread Kevin Foley
This patch fixes the way `org-babel-detangle' handles false positive matches for links. Without the patch it tries to use match data that may not be present in a false positive. I've also included a regression test. This is my first contribution to Org Mode or Emacs and my first patch by mailing

Re: [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock

2020-01-29 Thread Nicolas Goaziou
Hello, Dan Drake writes: > Thank you, Nicolas, for the review of my first patch. I've updated my code > and have the new patch attached. Thank you! > I didn't inline the "time to minutes to keep function"; yes, that function > is very short, but the function name makes the intent/purpose of th

Re: debugging why a latex preview fails

2020-01-29 Thread Fraga, Eric
On Wednesday, 29 Jan 2020 at 08:39, Alan Schmitt wrote: > I'm trying to add some diagrams in a note, and I want to use latex > preview for that. Unfortunately the result is not what I expect: I do > see an image, but there seem to be errors in the latex processing. How > can I see what latex is pro

Re: debugging why a latex preview fails

2020-01-29 Thread Fabrice Popineau
Le mer. 29 janv. 2020 à 10:51, Fraga, Eric a écrit : > On Wednesday, 29 Jan 2020 at 08:39, Alan Schmitt wrote: > > I'm trying to add some diagrams in a note, and I want to use latex > > preview for that. Unfortunately the result is not what I expect: I do > > see an image, but there seem to be er

Re: debugging why a latex preview fails

2020-01-29 Thread Fraga, Eric
On Wednesday, 29 Jan 2020 at 11:20, Fabrice Popineau wrote: > First of all: look into the *Org PDF LaTeX Output* buffer to see why Thank you. But maybe you meant *Org Preview LaTeX Output* instead? In any case, thanks for the pointer: I hadn't realized that this buffer was created. Although it'

Re: debugging why a latex preview fails

2020-01-29 Thread Fabrice Popineau
Le mer. 29 janv. 2020 à 12:02, Fraga, Eric a écrit : > On Wednesday, 29 Jan 2020 at 11:20, Fabrice Popineau wrote: > > First of all: look into the *Org PDF LaTeX Output* buffer to see why > Yes sorry ! Some ltximg director is created in the same directory as the Org file you are editing. Unfort

Re: debugging why a latex preview fails

2020-01-29 Thread Alan Schmitt
Hello Fabrice and Eric, Thanks a lot for your suggestions. I ended up edebugging 'org-create-formula-image' to have a look at the created tex file (that is indeed cleaned up after the generation). The file was fine, but dvipng failed on it (with errors like "raw PostScriptdvipng warning: PostScrip

Re: [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock

2020-01-29 Thread Bastien
Hi Dan and Nicolas, Nicolas Goaziou writes: > TINYCHANGE is only about the number of non-trivial lines of code in > your patch (15 or so). I would not say "non-trivial lines" of code. The change should be less *than 15 lines or so* to be accepted. I may be wrong, but this is how I read this:

Folding whitespace at the end of a tree

2020-01-29 Thread Kjell
Hello, sometimes I'd like my trees to be displayed with a blank line at the end of a subtree to improve visability. So it should look like this when unfolded once: * Headline 1 ** Subheadline 1.1 ** Subheadline 1.2 * Headline 2 However with org-cycle-seperator-lines at its default value of

Re: debugging why a latex preview fails

2020-01-29 Thread Nick Dokos
Alan Schmitt writes: > Hello Fabrice and Eric, > > Thanks a lot for your suggestions. I ended up edebugging > 'org-create-formula-image' to have a look at the created tex file (that > is indeed cleaned up after the generation). The file was fine, but > dvipng failed on it (with errors like "raw P

LaTeX export failure

2020-01-29 Thread Thomas S. Dye
Happy New Year! Returning to a writing project after a few months absence, I'm no longer able to export the writing project subtree. Here is what I find in *Messages*: Wrote /home/dk/Projects/historical-inference/r14c.org executing Shell code block... Wrote /tmp/babel-j0SOWm/ob-input-aS23

Re: LaTeX export failure

2020-01-29 Thread John Hendy
On Wed, Jan 29, 2020 at 2:32 PM Thomas S. Dye wrote: > > Happy New Year! > > Returning to a writing project after a few months absence, I'm no > longer able to export the writing project subtree. Here is what I > find in *Messages*: > > Wrote /home/dk/Projects/historical-inference/r14c.org >

Re: LaTeX export failure

2020-01-29 Thread Thomas S. Dye
Thanks John, IIRC, this isn't the first time you've recommended that I divide and conquer :) Here is the offending bit, which worked fine last November but fails today: #+caption: Compare figure\nbsp{}[[fig:mqs3_op]]. All the best, Tom John Hendy writes: On Wed, Jan 29, 2020 at 2:32 PM T

Re: [PATCH] Fix several issues with python session value blocks

2020-01-29 Thread Kyle Meyer
Hi Jack, Thanks again for the patch. Testing it out a bit, your ast-based approach seems to work nicely. Jack Kamm writes: > Subject: [PATCH] ob-python: Fix several issues with :session :results value > > * lisp/ob-python.el (org-babel-python-evaluate-session): Fix a few > related issues with

[QUESTION] A decision about matching ob-sql.el's :engine header argument match sql-mode product name

2020-01-29 Thread stardiviner
I'm writing a patch which try to set ~sql-product~ when editing sql src block. Here is the code: #+begin_src emacs-lisp (defun org-babel-edit-prep:sql (info) "Set `sql-product' in Org edit buffer. Set `sql-product' in Org edit buffer according to the corresponding :engine source block header

Re: LaTeX export failure

2020-01-29 Thread Fraga, Eric
On Wednesday, 29 Jan 2020 at 15:22, Thomas S. Dye wrote: > Here is the offending bit, which worked fine last November but > fails today: > > #+caption: Compare figure\nbsp{}[[fig:mqs3_op]]. This works fine for me. Sorry; that probably doesn't help you much... :-( -- Eric S Fraga via Emacs 28.

Re: debugging why a latex preview fails

2020-01-29 Thread Fraga, Eric
On Wednesday, 29 Jan 2020 at 14:11, Nick Dokos wrote: [...] > It would be nice to have the ability to inhibit the cleanup more > easily: it would make preview almost as easy to debug as export. I agree. Debugging babel is easier as the temporary files are left around so you can manually run com

Re: [QUESTION] A decision about matching ob-sql.el's :engine header argument match sql-mode product name

2020-01-29 Thread Tim Cross
My vote would be to modify ob-sql and change the hard coded values into a custom variable. Then users can add/remove/modify engine names to suit their requirements. The default should probably match the product names supported by sql.el (you could even have multiple entries mapping to the same pr