From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb) Date: Sun, 14 Apr 2013 18:25:19 -0600 Message-ID: <87obdgip9y.fsf@gmail.com> References: <87mwt1dmw7.fsf@gmail.com> <87zjx07w2l.fsf@gmail.com> <87bo9gpudv.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URXki-0007sA-NT for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 20:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URXkg-0002DE-Bu for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 20:58:36 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org Mode Mailing List , Nicolas Goaziou Bastien writes: > Nicolas Goaziou writes: > >> I'm not sure a new variable is needed here. After all, that's what >> filters are for. > > Filters are for advanced Emacs users, not normal Emacs users. > > A "normal" Emacs users is someone who knows how to set an option > but who doesn't know how to write a function. > > This is always a trade-off: if something is badly needed by users, > let's have an option. If something is needed only for a few users, > let's encourage someone to share her/his filter(s)*. > > I don't really have an opinion here: my impression is that the > filter is correct in this case. > Yea, a filter seems appropriate here to me as well. I hadn't thought of this option when proposing the patch. > > * Btw, maybe we should consider gathering filters in some unique > place, so that users can search and find them easily? Either a > new directory in Worg or a new repository on the server? This > is powerful enough to deserve a separate place IMO. Here's my fancyvrb filter for when such a place is created. (defun org-latex-filter-fancyvrb (text backend info) "Convert begin/end{verbatim} to begin/end{Verbatim}. Allows use of the fancyvrb latex package." (when (or (org-export-derived-backend-p backend 'beamer) (org-export-derived-backend-p backend 'latex)) (replace-regexp-in-string "\\\\\\(begin\\|end\\){verbatim}" "\\\\\\1{Verbatim}" text))) (add-to-list 'org-export-filter-final-output-functions 'org-latex-filter-fancyvrb) Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte