我正在尝试使用helm设置一个函数,按照建议在"http://blog.jenkster.com/2013/10/a-tip-for-navigating-clojure-files-in-emacs.html“中导航一个beamer文件。我试过:
(defun helm-beamer-headlines ()
"Display headlines for the current Beamer file."
(interactive)
(helm-mode t)
(helm :sources '(((name . "Beamer Headlines")
(volatile)
(headline "^\\s\|^\\f")))))为了只显示以\f和\s开头的行(对应于分段和帧命令),而且当regexp与emacs regexp搜索和helm一起工作时,我将不会得到与M-x helm-beamer-headlines匹配的结果。
我试过的一个最小的文件是:
\documentclass{beamer}
\begin{document}
\section{A}
\subsection{Aa}
\frame{\frametitle{}
\begin{enumerate}
\item one
\item two
\end{enumerate}
}
\subsection{Ab}
\frame{\frametitle{}
\begin{align*}
\alpha&=\beta
\end{align*}
}
\section{B}
\subsection{Ba}
\frame{\frametitle{}
\includegraphics[width=\textwidth]{abc.png}
}
\end{document}发布于 2014-09-15 16:37:26
"^\\\\s.*\\|^\\\\f.*"或至少是"^\\\\s.*\\|^\\\\f.*"作为您的regexp。关于Lisp中的反斜杠,请参见(elisp) Syntax for Strings和(elisp) Regexp Backslash。然后,在您的光束缓冲器M-x foo TAB。结业候选人是你想要的台词。使用C-down等在它们之间导航。更多信息请参见 search。
https://stackoverflow.com/questions/25834533
复制相似问题