emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Errors get suppressed by org-babel-execute-src-block
Date: Thu, 11 Feb 2016 12:08:36 -0500	[thread overview]
Message-ID: <87bn7nrx7v.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: 87pow4pb5b.fsf@gmail.com

Aaron Ecay <aaronecay@gmail.com> 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

  parent reply	other threads:[~2016-02-11 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 19:02 Errors get suppressed by org-babel-execute-src-block Gary Oberbrunner
2016-02-10 20:23 ` Aaron Ecay
2016-02-10 22:57   ` Nicolas Goaziou
2016-02-12 17:22     ` Aaron Ecay
2016-02-11 17:08   ` Nick Dokos [this message]
2016-02-12 17:31     ` Aaron Ecay
2016-02-12 17:59       ` Nick Dokos
2016-02-14 16:07         ` Aaron Ecay
2016-02-20 13:01           ` Nicolas Goaziou
2016-02-20 13:33             ` Nick Dokos
2016-02-22 16:05               ` Aaron Ecay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bn7nrx7v.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).