From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel 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 Message-ID: <551DB505.4060701@free.fr> References: <5166F4B8-A141-4968-B10E-4C25BDA72F5C@uvm.edu> <55186527.2080302@free.fr> <87wq1y35yn.fsf@alphaville.usersys.redhat.com> <5519A9D2.8020502@free.fr> <87mw2tzdhr.fsf@nicolasgoaziou.fr> <551AFB1A.9020504@free.fr> <87ego46cgs.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdmhQ-00075P-US for emacs-orgmode@gnu.org; Thu, 02 Apr 2015 17:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdmhL-0008Fh-V5 for emacs-orgmode@gnu.org; Thu, 02 Apr 2015 17:30:52 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:52313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdmhL-0008FU-OA for emacs-orgmode@gnu.org; Thu, 02 Apr 2015 17:30:47 -0400 Received: from [IPv6:2a01:e35:2e21:def0:c96e:d335:a9ef:c38a] (unknown [IPv6:2a01:e35:2e21:def0:c96e:d335:a9ef:c38a]) by smtp5-g21.free.fr (Postfix) with ESMTP id 28F97D4804B for ; Thu, 2 Apr 2015 23:28:51 +0200 (CEST) In-Reply-To: <87ego46cgs.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Le 01/04/2015 00:14, Nick Dokos a =C3=A9crit : > > 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 2) org-babel-default-header-args:C++ '(:includes "") 3) org-babel-default-header-args '(:includes "") 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.=20 Definitely more than a quick and small change.