From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)] Date: Wed, 30 Jun 2010 15:49:27 -0700 Message-ID: <87vd90rv9k.fsf@gmail.com> References: <878w5w2w5y.fsf@thinkpad.tsdh.de> <87fx04qp9x.fsf@mundaneum.com> <871vbouu7f.fsf@gmail.com> <87iq50griq.wl%n.goaziou@gmail.com> <8739w4tdo9.fsf@gmail.com> <87hbkkgnzb.wl%n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=35442 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OU660-0002MV-GP for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 18:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OU65z-0002rI-8p for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 18:49:32 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:55370) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OU65z-0002rC-1T for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 18:49:31 -0400 Received: by pxi17 with SMTP id 17so1346228pxi.0 for ; Wed, 30 Jun 2010 15:49:29 -0700 (PDT) In-Reply-To: <87hbkkgnzb.wl%n.goaziou@gmail.com> (Nicolas Goaziou's message of "Thu, 01 Jul 2010 00:22:16 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: =?utf-8?Q?S=C3=A9bastien?= Vauban , emacs-orgmode@gnu.org Hi Nicolas, Nicolas Goaziou writes: > I don't know about #+BEGIN_changemargin (but as far as I understand, > it's coming from org-exp-blocks and should be handled during > preprocess-hook, so it is beyond the scope of this patch). > > There is some design choice involved here. Until recently, there was a > catch-all function called org-export-handle-comments that was called > at the end of the export process and removed any line starting with > a #. It was certainly useful, but made things hard to debug : had > the #+ATTR_LaTeX line been misinterpreted or just silently deleted ? > > At the moment, org-export-handle-comments only handles... comments. > But everything that is not comments has to be taken care of somewhere > else. For example, org-export-attach-captions-and-attributes > deletes #+CAPTIONS and #+ATTR_backend in the process, and > org-export-select-backend-specific-text deletes #+backend > and #+ATTR_backend not used (that's what my patch do, actually). > Thanks for the explanation, I found it very useful. > > If you want to apply my patch (v. 2), we have to define a function to > remove #+TBLFM and #+TBLNAME lines because there is none at the > moment. It could be org-export-special-table-lines but it doesn't look > like it's the purpose of that function. > > Otherwise, you can just ignore the patch and bring back the full power > to org-export-handle-comments. > > I personally prefer avoiding do-it-all functions. But I'm not a > maintainer. > I've applied your patch. I agree that a catchall cleanup function at the end of the export process is not solution. Especially when it makes some perfectly valid constructs (e.g. nested blocks) impossible to export. I'll add a function for clearing out tblname and tblfm lines, and insert it at the appropriate place in the export process. Many thanks -- Eric > > Regards, > > -- Nicolas