From: Olaf Dietsche <olaf+list.orgmode@olafdietsche.de>
To: nicholas.dokos@hp.com
Cc: Markus Heller <hellerm2@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: : Search for missing :END:
Date: Tue, 22 Nov 2011 09:46:33 +0100 [thread overview]
Message-ID: <87d3ckczo6.fsf@rat.lan> (raw)
In-Reply-To: <6557.1321911502@alphaville.americas.hpqcorp.net> (Nick Dokos's message of "Mon, 21 Nov 2011 16:38:22 -0500")
Nick Dokos <nicholas.dokos@hp.com> writes:
[snip]
> But assuming that you are getting some error from org, you don't know
> where the problem is and you are trying to find it, it will be simpler
> to just use egrep:
>
> grep -E -n ':PROPERTIES:|:END:' foo.org
>
> will filter out the relevant lines, so all you have to do is scan the
> output by eye and spot any irregularity (consecutive :PROPERTIES: or
> consecutive :END: lines). Even if you have hundreds of them, that's
> *easy* for humans to do.[fn:2]
>
> Or, if you prefer, you can write trivial validation programs to operate
> on the output, e.g.:
>
> grep -E -n ':PROPERTIES:|:END:' foo.org | tee foo.out | grep PROP | wc -l
> grep END foo.out | wc -l
>
> (the counts 'd better be the same).
Since you might have other drawers as well (LOGBOOK, CLOCK), the counts
need not be the same.
Regards, Olaf
NB: At least GNU grep knows how to search for multiple regexps:
$ grep -e :PROPERTIES: -e :END: foo.org
So, no need for egrep here.
next prev parent reply other threads:[~2011-11-22 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 18:48 [OT]: Search for missing :END: Markus Heller
2011-11-21 21:38 ` Nick Dokos
2011-11-21 23:27 ` Markus Heller
2011-11-21 23:51 ` Andrew Stribblehill
2011-11-21 23:54 ` Nick Dokos
2011-11-21 23:59 ` Jonathan Leech-Pepin
2011-11-22 0:14 ` Markus Heller
2011-11-21 23:58 ` Nick Dokos
2011-11-22 8:46 ` Olaf Dietsche [this message]
2011-11-22 14:37 ` : " Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d3ckczo6.fsf@rat.lan \
--to=olaf+list.orgmode@olafdietsche.de \
--cc=emacs-orgmode@gnu.org \
--cc=hellerm2@gmail.com \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.