* How do I enable exports of code only for the whole file?
@ 2023-09-13 14:24 Vladimir Nikishkin
2023-09-13 15:38 ` Fraga, Eric
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Nikishkin @ 2023-09-13 14:24 UTC (permalink / raw)
To: emacs-orgmode
Hello, everyone
I have quite a lot of src_XXX code blocks in my article.
I want to export them all as code only.
I know that I can write src_org[:exports code], but doing that for each
inline code block is a lot of (needless) work.
The manual on page [[info:org#Exporting Code Blocks][org#Exporting Code Blocks]]
is pointing to the page: [[info:org#Literal Examples][org#Literal Examples]],
but this page does not have that information either.
--
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How do I enable exports of code only for the whole file?
2023-09-13 14:24 How do I enable exports of code only for the whole file? Vladimir Nikishkin
@ 2023-09-13 15:38 ` Fraga, Eric
0 siblings, 0 replies; 3+ messages in thread
From: Fraga, Eric @ 2023-09-13 15:38 UTC (permalink / raw)
To: Vladimir Nikishkin; +Cc: emacs-orgmode@gnu.org
On Wednesday, 13 Sep 2023 at 22:24, Vladimir Nikishkin wrote:
> I know that I can write src_org[:exports code], but doing that for each
> inline code block is a lot of (needless) work.
Not really answering your question but do remember that Emacs is a
brilliant text editor and it would take a single command to modify all
src_org in your file?
But coming back to your question, could you not modify
org-babel-default-inline-header-args
to have code exported? You could define it as a file local variable to
not affect other documents.
--
: Eric S Fraga, with org release_9.6.7-635-gf9e083 in Emacs 30.0.50
^ permalink raw reply [flat|nested] 3+ messages in thread
* How do I enable exports of code only for the whole file?
@ 2023-09-14 18:49 Hanno Perrey
0 siblings, 0 replies; 3+ messages in thread
From: Hanno Perrey @ 2023-09-14 18:49 UTC (permalink / raw)
To: lockywolf; +Cc: Org-Mode Mailing List
Dear Vladimir,
while I do not have much experience with inline source blocks, at least
for regular source blocks, you can define a file-wide header argument by
adding a file property. This can be even language specific -- inside my
(literate) Emacs config, I have for example at the top of the file for
all elisp blocks:
#+PROPERTY: header-args:emacs-lisp :tangle yes :results silent :comments link
Keep in mind that you have to revert the buffer to update such
properties (I believe pressing C-c C-c with the cursor on the modified
property should also work).
Similarly, you can add ':exports code'. Looking through the manual, I
get the impression that the same should be valid for both regular and
inline code blocks -- but I have not tested this myself.
Best wishes,
Hanno
--
Hanno Perrey
https://hoowl.se
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-14 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 14:24 How do I enable exports of code only for the whole file? Vladimir Nikishkin
2023-09-13 15:38 ` Fraga, Eric
-- strict thread matches above, loose matches on Subject: below --
2023-09-14 18:49 Hanno Perrey
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).