emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [html] non-lists showing up as lists


From: Alan L Tyree
Subject: Re: [O] [html] non-lists showing up as lists
Date: Mon, 03 Jun 2013 09:05:57 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5

On 03/06/13 07:40, Nick Dokos wrote:
Alan L Tyree <address@hidden> 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:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]