From: Bernt Hansen <bernt@norang.ca>
To: Jason Dunsmore <emacs-orgmode@deathroller.dunsmor.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.gc363)]
Date: Wed, 03 Aug 2011 21:35:40 -0400 [thread overview]
Message-ID: <87y5zarmab.fsf@norang.ca> (raw)
In-Reply-To: <8762meedru.fsf@riotblast.dunsmor.com> (Jason Dunsmore's message of "Wed, 03 Aug 2011 10:05:41 -0500")
Jason Dunsmore <emacs-orgmode@deathroller.dunsmor.com> 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!!
Regards,
Bernt
next prev parent reply other threads:[~2011-08-04 1:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 4:18 Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.gc363)] Bernt Hansen
2011-08-03 15:05 ` Jason Dunsmore
2011-08-04 1:35 ` Bernt Hansen [this message]
2011-08-04 14:07 ` David Maus
2011-08-04 14:35 ` Jason Dunsmore
2011-08-04 15:46 ` David Maus
2011-08-04 23:07 ` Bernt Hansen
2011-08-16 13:17 ` Bastien
2011-08-16 16:19 ` Bastien
2011-08-16 17:18 ` Achim Gratz
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5zarmab.fsf@norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@deathroller.dunsmor.com \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).