emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brandon Guttersohn <brandon@guttersohn.org>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>, Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Possible fix for :includes header argument in org-babel C source blocks
Date: Mon, 1 Jun 2020 19:02:08 -0500	[thread overview]
Message-ID: <305f20cb-66e7-cc8e-3baa-c383913eb533@guttersohn.org> (raw)
In-Reply-To: <87pnaiwngc.fsf@gmail.com>



> Note that IIUC, for non-system includes to work, either
> 
> - the filenames must be absolute, or
> - the compiler must be given -I arguments through org-babel-C-compiler.
> 
> This variable can be set (e.g. to "gcc -I .") with file or
> directory-local variables.  Should we promote this method in NEWS?  A
> downside is that the user will be warned about the variable's value
> being potentially unsafe, and we can't really avoid that unless we throw
> a blanket :safe #'stringp on this defcustom.
> 

Yeah, when I used it, I just used an absolute path. It's not entirely 
intuitive.

Would it be reasonable to automatically add the value of 
(file-name-directory buffer-file-name) to GCC's search path when (1) 
non-system imports are used and (2) buffer-file-name is non-nil? If we 
do, then any header in the same directory as the *.org file should "just 
work".

Seems like it would be safe, and I'm happy to try putting that together 
if there's interest.


  reply	other threads:[~2020-06-02  0:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <21b0cd85-d678-2fe6-3c22-e41abc6cf242@guttersohn.org>
     [not found] ` <87wo51jo5w.fsf@gnu.org>
2020-05-27 22:20   ` Possible fix for :includes header argument in org-babel C source blocks Kévin Le Gouguec
2020-05-28  2:30     ` Kyle Meyer
2020-05-28  8:25       ` Kévin Le Gouguec
2020-05-28 10:09         ` Kévin Le Gouguec
2020-05-29  2:47           ` Kyle Meyer
2020-05-29 12:41             ` Failing tests (was: Possible fix for :includes header argument in org-babel C source blocks) Kévin Le Gouguec
2020-05-31  4:59               ` Kyle Meyer
2020-06-01 14:48                 ` Failing tests Kévin Le Gouguec
2020-06-01 14:56                   ` Kévin Le Gouguec
2020-06-03  4:20                   ` Kyle Meyer
2020-06-01 13:54               ` Bastien
2020-05-29  3:37           ` Possible fix for :includes header argument in org-babel C source blocks Brandon Guttersohn
2020-05-29  9:57             ` Kévin Le Gouguec
2020-05-30 17:29               ` Brandon Guttersohn
2020-06-01 13:55                 ` Bastien
2020-06-01 20:17                   ` Kévin Le Gouguec
2020-06-02  0:02                     ` Brandon Guttersohn [this message]
2020-05-29  2:45         ` Kyle Meyer

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=305f20cb-66e7-cc8e-3baa-c383913eb533@guttersohn.org \
    --to=brandon@guttersohn.org \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=kevin.legouguec@gmail.com \
    /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).