From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] ob-core.el: fix confirm before eval when using a function Date: Mon, 01 Jul 2013 22:26:05 +0200 Message-ID: <87d2r2do2q.fsf@Rainer.invalid> References: <1372705039-19522-1-git-send-email-rhansen@bbn.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]:37950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utkfz-0008EU-05 for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 16:26:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utkfx-0004nK-Ma for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 16:26:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:37793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utkfx-0004my-H9 for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 16:26:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Utkfv-0002re-Hc for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 22:26:15 +0200 Received: from pd9eb3bf3.dip0.t-ipconnect.de ([217.235.59.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jul 2013 22:26:15 +0200 Received: from Stromeko by pd9eb3bf3.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jul 2013 22:26:15 +0200 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 Richard Hansen writes: > When `org-confirm-babel-evaluate' is a function, this construct: > > (or (when (functionp org-confirm-babel-evaluate) > (funcall org-confirm-babel-evaluate lang block-body)) > org-confirm-babel-evaluate) > > will always be true -- if the function evaluates to nil, the `or' will > evaluate to the value of `org-confirm-babel-evaluate', which is > non-nil. Indeed, thanks for catching it. This had actually been fixed before in exactly the same way, then replaced by a cond form and then replaced again (wrongly) with an or form… I should have looked at the history of that code more closely. Fixed in maint and master. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables