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: Sun, 29 Mar 2015 22:48:39 +0200	[thread overview]
Message-ID: <55186527.2080302@free.fr> (raw)
In-Reply-To: <5166F4B8-A141-4968-B10E-4C25BDA72F5C@uvm.edu>

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

Does everyone agree with this change?


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	other threads:[~2015-03-29 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  2:28 Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-944-g830cf3 @ /Users/snapp/.emacs.d/vendor/org/)] Robert Snapp
2015-03-29 20:48 ` Thierry Banel [this message]
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

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:

  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=55186527.2080302@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \


* 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


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).