[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] problems with export and :cache
From: |
Nicolas Goaziou |
Subject: |
Re: [O] problems with export and :cache |
Date: |
Thu, 29 Oct 2015 17:42:55 +0100 |
Aaron Ecay <address@hidden> writes:
> 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?
Could these 2 use cases be refactored?
(mapcar #'cdr (org-babel-get-header params :var))
is not very far (but stlightly different) from
(cadr (org-babel-get-header params :colname-names))
when there is a single association in PARAMS. Otherwise, it is up to the
user to know that there can be multiple :var keys but only
one :column-names.
IOW, aren't you after `org-babel-get-header' without the OTHER argument?
Regards,
- [O] problems with export and :cache, Andreas Leha, 2015/10/28
- Re: [O] problems with export and :cache, Andreas Leha, 2015/10/29
- Re: [O] problems with export and :cache, Aaron Ecay, 2015/10/29
- Re: [O] problems with export and :cache, Nicolas Goaziou, 2015/10/29
- Re: [O] problems with export and :cache, Aaron Ecay, 2015/10/29
- Re: [O] problems with export and :cache, Thomas S . Dye, 2015/10/29
- Re: [O] problems with export and :cache, Andreas Leha, 2015/10/29