# Change overlaid text of an outline header?

Q: how do I add a new outline header regexp but change the overlaid text?

I often write presentations with Beamer in LaTeX. As such, there are a lot of frame (ie, "slide") environments:

\begin{frame}
\frametitle{My frame}
% ...
% ...
\end{frame}


To make navigation easier, I've added the frame environment to TeX-outline-extra so that Emacs will treat frames as headers and allow me to hide and show them:

(add-to-list 'TeX-outline-extra '("\\\\begin{frame}" 5)) % at paragraph level


Now, when the headers are closed, I have the following:

\begin{frame}...
\begin{frame}...
\begin{frame}...
\begin{frame}...


That's a big help, but I'd like to have a visual cue about what each frame contains (such as the frametitle). How could I get the following:

\begin{frame} (My frame)...
\begin{frame} (Another frame)...
\begin{frame} (A different frame)...
\begin{frame} (Yet another frame)...

• In recent versions of beamer the frame title can be given as an env parameter: \begin{frame}{My frame}. – JeanPierre Nov 23 '15 at 16:19
• @JeanPierre: you're quite right, I never realized that. Although it doesn't answer the original abstract question I asked, it does resolve the specific problem I needed to address. If you post your comment as an answer, I'll accept it (after modifying the question scope accordingly). – Dan Nov 23 '15 at 16:40

Unfortunately I cannot comment to the question..

Using JeanPierre's approach of creating frames and its titles, that is \begin{frame}{some title}, the solution is adding the following to .emacs or run it when needed..

(setq TeX-outline-extra '(("\\\\begin{frame}[{\[].+" 5)))


This is also the answer to the question that I posted here