[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.g
From: |
David Maus |
Subject: |
Re: [O] Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.gc363)] |
Date: |
Thu, 04 Aug 2011 16:07:06 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Wed, 03 Aug 2011 21:35:40 -0400,
Bernt Hansen wrote:
>
> Jason Dunsmore <address@hidden> 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.... address@hidden
Email..... address@hidden
pgpE_FTkwzLbe.pgp
Description: PGP signature