Re: Babel C-mode corrupts double-quoted strings in output

2022-09-25 Thread Ihor Radchenko
tbanelwebmin writes: > This fix in ob-C.el passes all unit tests, as well as Martin's example, and > some other examples. > > If someone get a regression, please tell me! > In a few days, I will commit. > > The fix: in ob-C.el line 185, change: >   (org-babel-read results t) > to: >   results D

Re: Babel C-mode corrupts double-quoted strings in output

2022-09-02 Thread tbanelwebmin
This fix in ob-C.el passes all unit tests, as well as Martin's example, and some other examples. If someone get a regression, please tell me! In a few days, I will commit. The fix: in ob-C.el line 185, change:   (org-babel-read results t) t

Re: Babel C-mode corrupts double-quoted strings in output

2022-09-02 Thread tbanelwebmin
This looks like a bug in ob-C.el Around line 196 we should replace   (org-babel-read results t) with   results In this way, ob-C.el will look more like ob-shell.el Let me see what are the consequences with such a fix. Thanks Marti

Re: Babel C-mode corrupts double-quoted strings in output

2022-08-31 Thread Immanuel Litzroth
I would advise you not to use org babel for compiled languages. There is just too much stuff that doesn't work well and multifile dependencies & build systems are just plain hard to get right. Debugging is annoying and getting org babel to tell you compiler where the source actually came from is im

Babel C-mode corrupts double-quoted strings in output

2022-08-31 Thread Martin Jerabek
Hi! I recently started to use Org Babel for C++ programs. One of the programs outputs several lines with double-quoted strings, similar to this: #+NAME: doublequotes_cpp #+begin_src cpp :includes :results output verbatim raw std::cout << "\"line 1\"\n"; std::cout << "\"line 2\"\n"; std::cout <<