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: Nick Dokos
Subject: Re: [O] [html] non-lists showing up as lists
Date: Sun, 02 Jun 2013 17:40:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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.

-- 
Nick




reply via email to

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