From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan L Tyree Subject: Re: [html] non-lists showing up as lists Date: Mon, 03 Jun 2013 09:05:57 +1000 Message-ID: <51ABCFD5.7040208@gmail.com> References: <874ndj13u5.fsf@gmail.com> <51A90A6A.5090105@gmail.com> <87a9na1gi9.fsf@gmail.com> <87d2s58w0g.fsf@breezy.my.home> <87ppw5vtb2.fsf@gmail.com> <87fvx0clbx.fsf@breezy.my.home> <87r4gkjio7.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjHKu-00074S-F1 for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 19:05:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjHKp-0008Jb-3x for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 19:05:16 -0400 Received: from mail-pb0-x231.google.com ([2607:f8b0:400e:c01::231]:47989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjHKo-0008JR-SS for emacs-orgmode@gnu.org; Sun, 02 Jun 2013 19:05:11 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so680744pbb.22 for ; Sun, 02 Jun 2013 16:05:09 -0700 (PDT) Received: from [192.168.1.1] (202.63.32.163.static.rev.eftel.com. [202.63.32.163]) by mx.google.com with ESMTPSA id gh9sm56303754pbc.37.2013.06.02.16.05.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Jun 2013 16:05:08 -0700 (PDT) In-Reply-To: <87r4gkjio7.fsf@pierrot.dokosmarshall.org> 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: emacs-orgmode@gnu.org On 03/06/13 07:40, Nick Dokos wrote: > Alan L Tyree writes: > >> So: my problem is that somehow the '137.' got at the head of a line. I >> have no idea how that happened. I inserted references in this document >> using reftex, so I suppose that is one source to investigate. >> >> The other source is, no doubt, cut and paste. >> >> In a 60+ page document, I had four or five of these, so it is a very >> annoying problem. >> >> In view of this, should I explore further about the source of these or >> try out the patch you sent? >> > > If the problematic lines existed in the file that you pasted into an org > file, then there is nothing that org can do of course. The thing to do > is to check the file *before* you "import" it into org. Here's a simple > awk script to catch the two cases of plain and numbered lists: > > --8<---------------cut here---------------start------------->8--- > #! /usr/bin/gawk -f > > /^ *- / {printf("Line %d: plain list element: %s\n", NR, $0);} > /^ *[0-9]+\. / {printf("Line %d: numbered list element: %s\n", NR, $0);} > --8<---------------cut here---------------end--------------->8--- > > Catching more cases and integrating the script into your workflow (and > fixing any bugs) is left as an exercise. > Indeed, an exercise which I have already done in the form of a lisp function to catch the nasty little numbers at the beginning of lines. For the earlier exporter, I used this to insert non-printing spaces, export, then remove non-printing space. Far from elegant :-). I still like the suggestion that there should be an option so that lists cannot begin at the beginning of a line. Like Samuel earlier in this thread, I always indent lists. Thanks for you consideration of all this, Nicolas. I need to identify where the offending lines are coming from. Cheers, Alan -- Alan L Tyree http://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:172385@iptel.org