From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: problems with export and :cache Date: Thu, 29 Oct 2015 15:14:23 +0000 Message-ID: <87io5pyaeo.fsf@gmail.com> References: <87vb9pyf0l.fsf@gmail.com> <871tcdpxeq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrouO-0000Oq-FK for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 11:14:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrouL-0004er-OZ for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 11:14:32 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:36694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrouL-0004eY-I3 for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 11:14:29 -0400 Received: by wmec75 with SMTP id c75so26597702wme.1 for ; Thu, 29 Oct 2015 08:14:28 -0700 (PDT) In-Reply-To: <871tcdpxeq.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou , Andreas Leha Cc: emacs-orgmode@gnu.org Hi Nicolas, 2015ko urriak 29an, Nicolas Goaziou-ek idatzi zuen: >=20 > Hello, >=20 > Aaron Ecay writes: >=20 >> The simple patch attached to this message fixes a bug that my testing >> indicated was responsible for erroneous re-evaluations at least some >> of the time. >=20 > Thank you. A minor comment follows. >=20 >> (cons :result-type (cond ((member "output" result-params) 'output) >> ((member "value" result-params) 'value) >> (t 'value)))) >> - (org-babel-get-header params :var 'other)))) >> + (loop for item in params >> + unless (memq (car item) '(:colname-names >> + :rowname-names >> + :result-params >> + :result-type >> + :var)) >> + collect item)))) >=20 > Using `loop' here is, IMO, over-doing it. You can use instead, e.g., >=20 > (org-remove-if > (lambda (item) > (memq (car item) > '(:colname-names :rowname-names :result-params :result-type :v= ar))) > params) OK. I=E2=80=99ll push this to maint later today. >=20 > Another option is to extend `org-babel-get-header' to accept a list of > keys instead of a single key. I=E2=80=99d like to remove this function, actually. I hate the org functio= ns that do X most of the time, but the opposite of X when you pass them an optional argument (in this case the third arg =E2=80=98other=E2=80=99). = Almost all (a couple dozen in total) of the calls to o-b-get-header are in the context (mapcar #'cdr (org-babel-get-header params :var)). I=E2=80=99d like to introduce a function org-babel--get-var-values to cover these cases, and replace the remaining 2 calls in the codebase (which both extract :column-names) with assq (since :column-names should appear maximally once, unlike :var). The sole use of the evil 'other arg is refactored away by my patch. Thoughts? --=20 Aaron Ecay