emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-9


From: Thierry Banel
Subject: Re: [O] Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-944-g830cf3 @ /Users/snapp/.emacs.d/vendor/org/)]
Date: Thu, 02 Apr 2015 23:30:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 01/04/2015 00:14, Nick Dokos a écrit :
>
> I was thinking of an ob-C.el customizable variable that is set by
> default to some useful list of includes, not file-settable things.
> But I'm probably the last person you should ask about what is useful
> here. Real users should speak up.
>
> I think augmentation might be nice, but if people are willing to live
> with replacement, I'm not going to argue. And if augmentation carries
> the day, there always is the vexing question of what to do when you
> really *want* replacement, not augmentation.
>

The situation is as follow.
Values for :includes are searched in several locations, in this order:
  1) #+BEGIN_SRC C++ :includes <one.h>
  2) org-babel-default-header-args:C++ '(:includes  "<two.h>")
  3) org-babel-default-header-args '(:includes  "<three.h>")
The search stops as soon as a value is found.
Thus we have a "replacement" logic rather than an "augmentation" one.

This works for :includes, but also for :defines, and every possible
parameter.  It also works for C, D, elisp, and any language.  It is a
generic feature of Babel.  To play with it, type C-c C-v I in the source
block.

The variables are declared in this way:
  (defvar org-babel-default-header-args:fortran)
Maybe they could be changed to:
  (defcustom org-babel-default-header-args:fortran)
to enable customization through Emacs customization facility...

Changing from a "replacement" behavior to an "augmentation" one involves
changing it for all languages at the same time, because it is
implemented in the core of Babel.  Moreover, it would require to know
which parameters hold single values, and which ones hold lists. 
Definitely more than a quick and small change.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]