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: Sun, 29 Mar 2015 22:48:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi Robert

Those #includes were a proposal I did long ago.
The purpose was to make short scripts even shorter with default
#includes that everybody uses.

Your use-case is worth considering.
If this cause trouble, it is easy to remove the includes.

To keep existing scripts working, an :includes parameter would be
required, like this:

#+BEGIN_SRC C++ :includes <string.h> <stdio.h><stdlib.h>
  // C++ script
#+END_SRC

Does everyone agree with this change?

Regards
Thierry

Le 25/03/2015 03:28, Robert Snapp a écrit :
> I must admit I am not a fan of the proposed changes to ob-C.el which seem to 
> insert
>
>   #include <string.h>
>   #include <stdio.h>
>   #include <stdlib.h>
>
> during a tangle operation, without option. Currently, I am using C mode to 
> tangle source written in GLSL (OpenGL shading language), which is 
> syntactically similar to C. However the inclusion of the three includes 
> triggers an error when the tangled GLSL files are compiled by OpenGL. I would 
> appreciate if you either required users to specify each included header file 
> in the #+src_begin line, or provide an option to suppress the three include 
> statements described above. Alternatively, one could tangle GLSL files with 
> the extensions (.glsl, .vert, and .frag) like C files without inserting any 
> unrequested "#include" statements.
>
> Thank you for your consideration.
> Robert Snapp
>
>




reply via email to

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