[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpi
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel? |
Date: |
Fri, 22 Dec 2023 12:20:41 +0000 |
Leo Butler <Leo.Butler@umanitoba.ca> writes:
>> What will happen if we have something like :results value or :results
>> output instead of :results file link?
>
> Originally, I felt that only ":results file" makes sense. I have adopted
> your suggestion, though, and added test cases so that the compiler
> stderr output is caught.
Thanks! This makes sense, but now the default behaviour (when no :results
type is specified) is unexpected.
When you have something like
#+begin_src C :compile-only t :file foo :includes "stdio.h"
printf("This is test");
#+end_src
, executing should yield file link, even though it is not explicitly
specified.
And when you have compilation error,
#+begin_src C :compile-only t :file foo :includes "stdio.h"
printf("This is test")
#+end_src
the result may be empty - buffer displayed by `org-babel-eval' is
probably enough.
Basically, Org babel promises DWIM behavior when :results type is not
explicitly stated.
P.S. In my testing, I wrote
#+begin_src C :compile-only t :file foo :includes "stdio.h"
(printf "This is test")
#+end_src
and was staring at the compilation error for a good minute, trying to
understand what the hell did I do wrongly 🤦.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- How to use mpirun with C or C++ Org-babel?, Edgar Lux, 2023/12/07
- Re: How to use mpirun with C or C++ Org-babel?, tbanelwebmin, 2023/12/08
- Re: How to use mpirun with C or C++ Org-babel?, Leo Butler, 2023/12/08
- Re: How to use mpirun with C or C++ Org-babel?, Ihor Radchenko, 2023/12/08
- Re: How to use mpirun with C or C++ Org-babel?, Leo Butler, 2023/12/13
- Re: How to use mpirun with C or C++ Org-babel?, Ihor Radchenko, 2023/12/14
- [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?, Leo Butler, 2023/12/19
- Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?,
Ihor Radchenko <=
- Re: How to use mpirun with C or C++ Org-babel?, Leo Butler, 2023/12/20