Re: [POLL] ob-C: Should we allow saving compiled src block to specified binary excecutable? (was: [RFC/PATCH] naming src/bin files in ob-C.el)

2023-08-21 Thread Ihor Radchenko
Ihor Radchenko writes: > I feel slightly reluctant about adding side effects to babel evaluation. > Not too reluctant though. > > I'd like to hear from other ob-C users, so I changed this thread into a poll. No replies. Closed. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more

[POLL] ob-C: Should we allow saving compiled src block to specified binary excecutable? (was: [RFC/PATCH] naming src/bin files in ob-C.el)

2023-05-15 Thread Ihor Radchenko
Leo Butler writes: >> I am not sure how I feel about such side effects of evaluation. >> Is there any other babel backend that is doing something similar? > > ob-java.el deals with it by using a :dir header; if non-nil, the > compiled files are placed in that directory instead of >

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-15 Thread Leo Butler
On Mon, May 15 2023, Ihor Radchenko wrote: > Leo Butler writes: > >> On the other hand, I don't see any sense in producing a link to the >> binary file. Org can't do anything with that link, so the user would >> need to write something like ":results file :file /path/to :wrap >> comment". That

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-15 Thread Ihor Radchenko
Leo Butler writes: > Ok, stopping after 1 seems reasonable when the code block is meant to > produce just the executable. But, your suggestion would mean that the > code block can *only* produce an executable file. Maybe that is ok, but > since the current semantics allow something like > >

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-14 Thread Leo Butler
On Sat, May 13 2023, Ihor Radchenko wrote: > Leo Butler writes: > >>> IMHO, it will be more consistent with other backends to use :results file >>> :file /path/to/executable >> >> No, I don't think this is the way to do it. What happens in this >> case is: >> >> 1. `org-babel-C-execute'

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-13 Thread Ihor Radchenko
Leo Butler writes: >> IMHO, it will be more consistent with other backends to use :results file >> :file /path/to/executable > > No, I don't think this is the way to do it. What happens in this > case is: > > 1. `org-babel-C-execute' creates a named source file, compiles it to the >named

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-12 Thread Leo Butler
On Fri, May 12 2023, Ihor Radchenko wrote: > Leo Butler writes: > >>> Comments? >> ... >> Replying to myself: it makes more sense to introduce a special-purpose >> header argument for this special purpose, than to use :file with a >> different meaning. Revised patch attached. > > IMHO, it will

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-12 Thread Ihor Radchenko
Leo Butler writes: >> Comments? > ... > Replying to myself: it makes more sense to introduce a special-purpose > header argument for this special purpose, than to use :file with a > different meaning. Revised patch attached. IMHO, it will be more consistent with other backends to use :results

Re: [RFC/PATCH] naming src/bin files in ob-C.el

2023-05-12 Thread Leo Butler
On Fri, May 12 2023, Leo Butler wrote: > Hello, > > I am using ob-C.el to work with a c++ library (capd::dynsys). The > current behaviour creates a temporary src and bin file in > `org-babel-temporary-directory'. There is currently no option to have > these files named and put somewhere else. >

[RFC/PATCH] naming src/bin files in ob-C.el

2023-05-12 Thread Leo Butler
Hello, I am using ob-C.el to work with a c++ library (capd::dynsys). The current behaviour creates a temporary src and bin file in `org-babel-temporary-directory'. There is currently no option to have these files named and put somewhere else. This behaviour is not quite right, in my opinion. I