Nicolas Goaziou <n.goaz...@gmail.com> wrote:

> > * org.el:
> >   ... 
> 
> > * org-mouse.el:
> 
> >   ...
> 
> 
> > As you can see, the second almost matches what you came up with, but
> > the condition is simpler: the code *uses* the error raised to get
> > out of the (otherwise infinite) loop, so there is no need to check
> > what org-next-item returns.
> 
> I strongly advise against using `org-next-item' in a defun. It is, in
> its actual form, meant for interactive use only.
> 
> You should have a look at `org-get-next-item' and
> `org-get-previous-item' instead. I left a note about it at line 874 in
> org-list.el (yes, I know...).
> 
> There is also `org-apply-on-list' that might be of some help.
> 

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.

Thanks,
Nick

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to