emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: 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	[thread overview]
Message-ID: <551DB505.4060701@free.fr> (raw)
In-Reply-To: <87ego46cgs.fsf@alphaville.usersys.redhat.com>

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	other threads:[~2015-04-02 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  2:28 Robert Snapp
2015-03-29 20:48 ` Thierry Banel
2015-03-30 14:39   ` Nick Dokos
2015-03-30 19:53     ` Thierry Banel
2015-03-31 10:07       ` Nicolas Goaziou
2015-03-31 19:52         ` Thierry Banel
2015-03-31 22:14           ` Nick Dokos
2015-04-02 21:30             ` Thierry Banel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551DB505.4060701@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).