At Wed, 03 Aug 2011 21:35:40 -0400, Bernt Hansen wrote: > > Jason Dunsmore writes: > > > Hi Bernt, > > > > Can you see if this patch fixes the problem? > > > > diff --git a/lisp/org.el b/lisp/org.el > > index c7b28dd..41ac8c6 100644 > > --- a/lisp/org.el > > +++ b/lisp/org.el > > @@ -19212,7 +19212,9 @@ Returns the number of empty lines passed." > > (let ((pos (point))) > > (if (cdr (assoc 'heading org-blank-before-new-entry)) > > (skip-chars-backward " \t\n\r") > > - (forward-line -1)) > > + (unless (eq (line-number-at-pos) > > + (count-lines (point-min) (point-max))) > > + (forward-line -1))) > > (beginning-of-line 2) > > (goto-char (min (point) pos)) > > (count-lines (point) pos))) > > This patch fixes it for me. Thanks!! I just pushed a simplified version of the solution: No need to count lines, just check if point is at end of buffer. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de