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: Nick Dokos
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: Tue, 31 Mar 2015 18:14:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Thierry Banel <address@hidden> writes:

> Le 31/03/2015 12:07, Nicolas Goaziou a écrit :
>>
>>> IMO, it would be better than the current situation, but I wonder if
>>> it makes sense to have a global default setting containing the
>>> three files, but one which the user can customize; any :includes
>>> parameters would augment the default.
>>>
>>> That would satisfy the OP's requirements, but would also allow for
>>> a shorter #+BEGIN_SRC line.
>> I think this suggestion makes sense. While you're at it, would you mind
>> implementing it?
>>
>>
>
> Well, actually the global default setting feature may already be available
>   1) through properties in drawers
>   2) through the org-babel-default-header-args global variable
>
> * Property in drawer
>   :PROPERTIES:
>   :includes: <stdio.h> <myheader.h>
>   :END:
> Any C++ babel block below this tree will inherit the <stdio.h> and
> <myheader.h>#includes
>
> * The org-babel-default-header-argsvariable
> This variable holds global defaults. For C++ do something like that:
> (add-to-list 'org-babel-default-header-args '(:includes  "<stdio.h>"
> "<myheader.h>"))
> Any babel C++ block anywhere will inherit from the global variable.
>
> Nick, are those the kinds of settings you were thinking about?

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.

> The "augment" feature may be missing though:
> local :includes overwrite global ones.

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.

Nick






reply via email to

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