From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Errors get suppressed by org-babel-execute-src-block Date: Thu, 11 Feb 2016 12:08:36 -0500 Message-ID: <87bn7nrx7v.fsf@alphaville.usersys.redhat.com> References: <87pow4pb5b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTujf-0002I9-Mp for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 12:08:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTujc-0002rR-Fu for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 12:08:55 -0500 Received: from plane.gmane.org ([80.91.229.3]:58757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTujc-0002rL-8P for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 12:08:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aTujZ-00076y-Bq for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 18:08:49 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2016 18:08:49 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2016 18:08:49 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Aaron Ecay 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