From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb) Date: Sun, 14 Apr 2013 21:26:26 +0200 Message-ID: <87zjx07w2l.fsf@gmail.com> References: <87mwt1dmw7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URSZM-0002OC-3G for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 15:26:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URSZL-0001mf-3z for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 15:26:32 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:40743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URSZK-0001ky-Tr for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 15:26:31 -0400 Received: by mail-ee0-f44.google.com with SMTP id c41so1901516eek.17 for ; Sun, 14 Apr 2013 12:26:30 -0700 (PDT) In-Reply-To: <87mwt1dmw7.fsf@gmail.com> (Eric Schulte's message of "Sun, 14 Apr 2013 11:48:08 -0600") 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: Eric Schulte Cc: Org Mode Mailing List Eric Schulte writes: > Please see the attached patch, I'd love for this to be applied. You can use a filter function that will replace default "verbatim" with whatever you want: #+begin_src emacs-lisp (defun my-latex-custom-verbatim (element backend info) (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string "\\`\\\\begin{\\(verbatim\\)}" "Verbatim" (replace-regexp-in-string "\\\\end{\\(verbatim\\)}\n*\\'" "Verbatim" element nil nil 1) nil nil 1))) (add-to-list 'org-export-filter-example-block-functions 'my-latex-custom-verbatim) (add-to-list 'org-export-filter-fixed-width-functions 'my-latex-custom-verbatim) (add-to-list 'org-export-filter-quote-section-functions 'my-latex-custom-verbatim) (add-to-list 'org-export-filter-src-block-functions 'my-latex-custom-verbatim) (add-to-list 'org-export-filter-table-functions 'my-latex-custom-verbatim) #+end_src I'm not sure a new variable is needed here. After all, that's what filters are for. Regards, -- Nicolas Goaziou