From: Jason Dunsmore <emacs-orgmode@dunsmor.com>
To: Bernt Hansen <bernt@norang.ca>
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 10:05:41 -0500 [thread overview]
Message-ID: <8762meedru.fsf@riotblast.dunsmor.com> (raw)
In-Reply-To: <8762mh69yj.fsf@norang.ca> (Bernt Hansen's message of "Mon, 01 Aug 2011 00:18:28 -0400")
Hi Bernt,
Can you see if this patch fixes the problem?
--8<---------------cut here---------------start------------->8---
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)))
--8<---------------cut here---------------end--------------->8---
Thanks,
Jason
next prev parent reply other threads:[~2011-08-03 15:05 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 [this message]
2011-08-04 1:35 ` Bernt Hansen
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=8762meedru.fsf@riotblast.dunsmor.com \
--to=emacs-orgmode@dunsmor.com \
--cc=bernt@norang.ca \
--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).