From: Nicolas Goaziou <n.goaziou@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Iterate over list with `org-next-item'
Date: Tue, 07 Sep 2010 22:14:50 +0200 [thread overview]
Message-ID: <87zkvtjop1.wl%n.goaziou@gmail.com> (raw)
In-Reply-To: <10431.1283889511@alphaville.usa.hp.com>
>>>>> Nick Dokos writes:
> OK, thanks for the pointer: makes sense. I hadn't pulled your
> reimplementation till just now. Of course, these functions didn't
> exist before, so there was no choice - but maybe the few places
> where org-next-item is used need to be examined and brought up to
> snuff, using your new functions? Even if not strictly necessary,
> then at least as examples of good practice for others to follow.
You are right: this should be done. Speed issues may happen otherwise.
I'll look into it on Sunday.
As an example,
--8<---------------cut here---------------start------------->8---
(defun org-skip-over-state-notes ()
"Skip past the list of State notes in an entry."
(if (looking-at "\n[ \t]*- State") (forward-char 1))
(while (looking-at "[ \t]*- State")
(condition-case nil
(org-next-item)
(error (org-end-of-item)))))
--8<---------------cut here---------------end--------------->8---
would become
--8<---------------cut here---------------start------------->8---
(defun org-skip-over-state-notes ()
"Skip past the list of State notes in an entry."
(if (looking-at "\n[ \t]*- State") (forward-char 1))
(if (looking-at "[ \t]*- State") (goto-char (org-list-bottom-point))))
--8<---------------cut here---------------end--------------->8---
prev parent reply other threads:[~2010-09-07 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 0:47 Iterate over list with `org-next-item' Zachary Young
2010-09-03 2:28 ` Nick Dokos
2010-09-07 19:33 ` Nicolas Goaziou
2010-09-07 19:58 ` Nick Dokos
2010-09-07 20:14 ` Nicolas Goaziou [this message]
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=87zkvtjop1.wl%n.goaziou@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--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.