https://github.com/cxa/ob-c-stdin
Support the standard input header argument `:stdin <element-name>` for Org Babel code blocks in C/C++/D
https://github.com/cxa/ob-c-stdin
Last synced: 4 months ago
JSON representation
Support the standard input header argument `:stdin <element-name>` for Org Babel code blocks in C/C++/D
- Host: GitHub
- URL: https://github.com/cxa/ob-c-stdin
- Owner: cxa
- Created: 2023-10-29T13:20:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-29T13:25:08.000Z (over 2 years ago)
- Last Synced: 2025-06-17T01:43:05.243Z (12 months ago)
- Language: Emacs Lisp
- Size: 1000 Bytes
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ob-C-stdin
Support the standard input header argument `:stdin ` for Org Babel code blocks in C/C++/D, e.g.:
```org
#+name: who
world
#+begin_src C :stdin who :results output
#include
int main(int argc, char *argv[]) {
printf("hello, ");
char c;
while ((c=getchar()) != EOF) putchar(c);
return 0;
}
#+end_src
#+RESULTS:
: hello, world
```
## Install
Add `ob-C-stdin.el` to your `load-path`, or use a package manager like `use-package` w/ `quelpa`:
```elisp
(use-package ob-C-stdin
:quelpa (ob-C-stdin :fetcher github :repo "cxa/ob-C-stdin"))
```