0

I want some stuff to be visible in the editor, but not in the export (C-c C-e). Some stuff includes headlines. I tried this:

#+EXPORT_FILE_NAME: ~/Documents/Outbox/hide
#+OPTIONS: ^:nil
#+STARTUP: indent
#+STARTUP: hideblocks
* Foo
  :DRAWER:
  - `M-x org-insert-drawer` for stuff to be hidden.
  - Unfortunately, you can't put a subtree in it, AFAIK
  - Besides, this does get exported.
  - What is meant by hidden, then?
  :END:

#+BEGIN_HIDE
You can't hide, or can you?
#+END_HIDE

And that's what I get from C-c C-e l l:

\section{Foo}
\label{sec:org2b52cc8}
\begin{itemize}
\item `M-x org-insert-drawer` for stuff to be hidden.
\item Unfortunately, you can't put a subtree in it, AFAIK
\item Besides, this does get exported.
\item What is meant by hidden, then?
\end{itemize}

\begin{HIDE}
You can't hide, or can you?
\end{HIDE}
\end{document}

Manual:

Drawers

0

You can add a noexport tag to headlines, in order to avoid exporting them:

* This section is not going to be exported                              :noexport:
  The whole section (and all its subsections) is NOT going to be exported.

See the manual and look for EXCLUDE_TAGS.

2
  1. You can add #+OPTIONS: d:nil in the preamble to prevent your drawer to be exported (and even all drawers). You can also customize (locally, or in your .emacs) the variable org-export-with-drawers.

  2. It is unclear to me what is your #+BEGIN_HIDE environment, and what you intend to write in it. But both your drawer and "hide" environment could be simply replaced by headlines with the :noexport tag. I would definitely go for that solution in both cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.