emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Errors get suppressed by org-babel-execute-src-block


From: Nick Dokos
Subject: Re: [O] Errors get suppressed by org-babel-execute-src-block
Date: Thu, 11 Feb 2016 12:08:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Aaron Ecay <address@hidden> writes:

> Hi Gary,
>
> 2016ko otsailak 8an, Gary Oberbrunner-ek idatzi zuen:
>> 
>> org-babel-execute-src-block has a big unwind-protect that basically eats
>> all errors inside it. I don't think it used to do that. 
>
> The unwind-protect exists since 2010, so you’re probably mistaken about
> that (depending on your frame of reference for “used to”...)
>
> That said, the code in question seems very questionable to me.  First
> of all, the unwind-protect should not be needed at all, due to the use
> of (f)let (IOW, if the unwind-protect was ever needed, it was to paper
> over a bug in emacs which should no longer exist).  Secondly, in 2012
> commit 57104f9f changed an “org-flet” to a “let” in this function,
> which is incorrect (since elisp is a lisp-2).  So the whole thing has
> been effectively a no-op since then.
>
> I’d like to install the attached patch to master, if there are no
> objections.  That should resolve your concern as well as cleaning up the
> dead code.
>

Not sure if there are tests for remote babel execution, but if not,
please make sure to test that (with :dir set to some directory on a
different machine). Michael Albinus had done some work to get that
working a few years ago: he did not want to learn the ins and outs of
org-mode, so he did the minimal amount possible to square babel with
tramp: he did not touch the cruft and there is a lot of cruft in that
code, but I worry that some of what he did might go away with your patch
(to be clear: I have not looked at the patch in any detail, and I have
not gone back to see whether it overlaps with what Michael did). In
particular, Loris Bennett had some simple tests that were failing before
Michael fixed things up, so you might want to look at the two threads:

http://thread.gmane.org/gmane.emacs.orgmode/60102

and

http://thread.gmane.org/gmane.emacs.orgmode/63586

{Warning: they are long and as I said, maybe not even relevant]

BTW, I tried to test, but applying the patch to current master
(8eff64cffee8627578edc33de485201ae579fafe) fails:

,----
| $ git apply --verbose ~/src/org/babel/0001-ob-core-remove-cruft.patch 
| Checking patch lisp/ob-core.el...
| error: while searching for:
|     nil))
| 
| ;; dynamically scoped for tramp
| (defvar org-babel-call-process-region-original nil)
| (defvar org-babel-library-of-babel)
| (defvar org-edit-src-content-indentation)
| (defvar org-src-lang-modes)
| 
| (declare-function outline-show-all "outline" ())
| (declare-function org-get-indentation "org" (&optional line))
| 
| error: patch failed: lisp/ob-core.el:36
| error: lisp/ob-core.el: patch does not apply
`----

--
Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]