From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [PATCH] comments exporting Date: Tue, 15 Jun 2010 08:48:43 -0700 Message-ID: <87aaqwi9es.fsf@gmail.com> References: <87ljaitszr.wl%n.goaziou@gmail.com> <87d3vtwmdg.fsf@gmail.com> <87mxuxiixc.fsf@gmail.com> <87iq5ltm2g.wl%n.goaziou@gmail.com> <87d3vt47oq.fsf@gmail.com> <87hbl4tpmi.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=37473 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOYZV-0005p6-2T for emacs-orgmode@gnu.org; Tue, 15 Jun 2010 12:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOYNf-00088A-6K for emacs-orgmode@gnu.org; Tue, 15 Jun 2010 11:48:52 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:41208) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOYNe-00087v-TF for emacs-orgmode@gnu.org; Tue, 15 Jun 2010 11:48:51 -0400 Received: by pxi1 with SMTP id 1so7597333pxi.0 for ; Tue, 15 Jun 2010 08:48:49 -0700 (PDT) In-Reply-To: <87hbl4tpmi.wl%n.goaziou@gmail.com> (Nicolas Goaziou's message of "Tue, 15 Jun 2010 15:03:01 +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: emacs-orgmode@gnu.org Hi Nicolas, Thanks for the thoughtful response. Nicolas Goaziou writes: > Hello, >>>>>> Eric Schulte writes: > >> Not to look a gift patch in the mouth, but while this patch fixes the >> above issue it looks like it introduces a new problem. > > If you want a quick hack, just remove the space I introduced in the > comment regexp. But, imho, it isn't a real solution as #+source is > definitely not a comment and should not be caught by the regexp > comments. > yes, I suppose so. When our #+source and #+results statements always started on column zero they were being cleaned up later in the export cycle so this wasn't a problem. > > I don't know yet what org-babel is really doing with the #+source > and #+results lines, but if they are no longer needed for exportation, > there should be a function to clean them before exporting. > Agreed, I'll take a look at this org-babel pre-processing later today and add in functionality to clean up #+source: and #+results: lines. > > In addition, there is another problem. In the example below, the > second item actually starts a brand new list upon exporting. > This problem I can't reproduce. > > ** comments not commented > # $some stuff > # some more stuff$ -- I should be a comment line > > 1) a source block inside of an =enumerate= > #+source: plotxy > #+begin_src emacs-lisp :exports results > (message "I think so") > #+end_src > > can cause problems > > 2) another line > after Org-babel pre-processing the above is converted to the following for me --8<---------------cut here---------------start------------->8--- # $some stuff # some more stuff$ -- I should be a comment line 1) a source block inside of an =enumerate= #+source: plotxy #+results: plotxy : I think so can cause problems 2) another line --8<---------------cut here---------------end--------------->8--- which exports to latex as expected. Hopefully after I've made the above changes this list interruption will cease, if not then I'll need to find an example I can reproduce. > > > If I had to take a guess, I'd say that org-babel messes with > indentation and org-latex, being very sensitive about indentation when > it comes to lists, gets disoriented. > > So, is the result replacing the source code in the same > column as the #+begin_src ? > yup, it's the same column, the only possible culprit I can see is two empty lines (notice those are not indented but are truly empty) between the #+source and #+results lines. > > So I think something has to be fixed in org-babel. > > I will look at it tomorrow, > > Regards, Thanks, as always, for your help -- Eric