From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [PATCH] orphaned captions and labels Date: Thu, 24 Jun 2010 21:18:56 +0200 Message-ID: <87ocf0ck7z.fsf@gmx.de> References: <87ljaa997e.wl%n.goaziou@gmail.com> <87tyosqzfv.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=47385 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORrwt-00077S-Dm for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 15:18:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORrwr-0006hA-Ip for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 15:18:55 -0400 Received: from mail.gmx.net ([213.165.64.20]:51855) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ORrwr-0006gd-7D for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 15:18:53 -0400 In-Reply-To: <87tyosqzfv.wl%dmaus@ictsoc.de> (David Maus's message of "Thu, 24 Jun 2010 16:26:28 +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: David Maus Cc: Org Mode List , Nicolas Goaziou Hi David and Nicolas, I didn't follow this thread closely, so forgive me if this is another bug then the one you tried to fix. David Maus writes: > Nicolas Goaziou wrote: >>Hello, > >>This patch corrects the following problem : > >>----------------------------------------- >>#+caption: I'm not removed from export >>#+label: also-not-removed >>| A | B | >>| 1 | 2 | >>----------------------------------------- > >>Since org-handle-comments is only removing comments, #+caption, #+label >>and friends were left in the export file. Some still are. I applied the patch, but my "#+ATTR_HTML:" lines are not removed from ASCII export if they occur on a line with leading spaces. This might be true for other backends, too. Try to export this as ASCII: => --->8-------------------------->8-------------------------->8--- * Example #+ATTR_HTML: I am removed from ASCII export | THead 1 | THead 2 | #+ATTR_HTML: I am _NOT_ removed from ASCII export | THead 1 | THead 2 | #+CAPTION: removed #+ATTR_HTML: NOT removed | THead 1 | THead 2 | #+CAPTION: removed #+ATTR_HTML: removed | THead 1 | THead 2 | <= ---8<--------------------------8<--------------------------8<--- Leading space make the difference. Somtimes. Here is the result: => --->8----------------------------->8----------------------------->8--- 1 Example ~~~~~~~~~~ THead 1 THead 2 #+ATTR_HTML: I am NOT removed from ASCII export THead 1 THead 2 #+ATTR_HTML: NOT removed THead 1 THead 2 THead 1 THead 2 <= ---8<-----------------------------8<-----------------------------8<--- Sebastian