-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directory that binary executed from #509
Comments
I face this issue too, which is a bug in my opinion as most if not all other babel executors all honours executing the binary in the directory specified by buffer local variable AFAIK, the current flow of source block execution is:
From 2, we can see that this project does aim to preserve local environment when executing the compiled binary with Here, the culprit is at step 4. By default, Emacs will start new process with IMO, the correct high level logic is:
For 2., I believe just modifying 1 line in Please note that there are still edge cases for this method, since I do NOT understand them completely and it should NOT affect FYR, the implementation for C, C++ and D is at |
In an org file, the src block's code should be interpreted, OR the binary compiled from it SHOULD execute with PWD as `default-directory` of the org file. Summary of changes: 1. save the original default-directory then later restores it. 2. supply `--manifest-path` option to `cargo run` to execute the target `Cargo.toml` binary compiled from the src block. For reference: Try to execute a C++, C, js (node), python block. In particular, see implementation of `org-babel-C-execute` or `org-babel-python-evaluate-external-process`. May be we can re-write like them in the future. fixes: brotzeit#509
In an org file, the src block's code should be interpreted, OR the binary compiled from it SHOULD execute with PWD as `default-directory` of the org file. Summary of changes: 1. save the original default-directory then later restores it. 2. supply `--manifest-path` option to `cargo run` to execute the target `Cargo.toml` binary compiled from the src block. For reference: Try to execute a C++, C, js (node), python block. In particular, see implementation of `org-babel-C-execute` or `org-babel-python-evaluate-external-process`. May be we can re-write like them in the future. fixes: brotzeit/rustic#509
Hi,
System Info:
Debian sid
Doomemacs
rustic version: 3.4
I am using rustic from orgmode by compiling rust code blocks. I have the following files:
And I have the following code block in the org file:
Executing this block from org file gives the no such file error. In order to investigate I run the following block:
My question is how do I change the directory that binary is executed from /tmp/babel-XXXXXX/cargoXXXXXX to where the org file is? This does not happen with other languages (I tried C, python, shell) that's why I think rustic repo is the right place ask.
Thanks, B
The text was updated successfully, but these errors were encountered: