# How to prevent stuff from being exported

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

You can add a noexport tag to headlines, in order to avoid exporting them:
* This section is not going to be exported                              :noexport:

See the manual and look for EXCLUDE_TAGS.
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.