Hi Nicolas, 2015ko urriak 29an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Aaron Ecay <aarone...@gmail.com> writes: > >> 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. > > Thank you. A minor comment follows. > >> (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)))) > > Using `loop' here is, IMO, over-doing it. You can use instead, e.g., > > (org-remove-if > (lambda (item) > (memq (car item) > '(:colname-names :rowname-names :result-params :result-type :var))) > params)
OK. I’ll push this to maint later today. > > Another option is to extend `org-babel-get-header' to accept a list of > keys instead of a single key. I’d like to remove this function, actually. I hate the org functions 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 ‘other’). 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’d 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? -- Aaron Ecay