all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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
* 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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.