From: Jason Dunsmore <jason@dunsmor.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Preserve trailing blank lines
Date: Mon, 10 Jan 2011 09:58:13 -0600 [thread overview]
Message-ID: <87wrmchht6.fsf@riotblast.dunsmor.com> (raw)
In-Reply-To: 078486EA-3EAD-4E6B-B428-D0DC477DFCB3@gmail.com
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jan 5, 2011, at 2:24 AM, Jason Dunsmore wrote:
>
>> I like to leave a blank line at the end of items that have bodies,
>> but I
>> found functions like org-metaup, org-metadown, and org-refile were
>> leaving that blank line behind.
>
> These commands treat empty lines as belonging to the entry
> below the empty line - which is, I think, the right convention here.
I now understand this is a formatting convention issue. Here is an
updated patch that looks at the setting for `heading' in the variable
org-blank-before-new-entry:
diff --git a/lisp/org.el b/lisp/org.el
index 98c85d0..ee3f873 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18477,7 +18477,9 @@ Taken from `count' in cl-seq.el with all keyword
argumen
"Move backwards over whitespace, to the beginning of the first empty
line.
Returns the number of empty lines passed."
(let ((pos (point)))
- (skip-chars-backward " \t\n\r")
+ (if (cdr (assoc 'heading org-blank-before-new-entry))
+ (skip-chars-backward " \t\n\r")
+ (forward-line -1))
(beginning-of-line 2)
(goto-char (min (point) pos))
(count-lines (point) pos)))
next prev parent reply other threads:[~2011-01-10 15:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 1:24 [PATCH] Preserve trailing blank lines Jason Dunsmore
2011-01-08 18:02 ` Carsten Dominik
2011-01-10 15:58 ` Jason Dunsmore [this message]
2011-01-17 23:13 ` Bastien
2011-01-26 18:52 ` Jason Dunsmore
2011-02-07 8:17 ` Bastien
2011-02-15 16:31 ` Jason Dunsmore
2011-03-09 10:07 ` [Accepted] " Bastien Guerry
2011-03-09 10:07 ` [PATCH] " Bastien
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=87wrmchht6.fsf@riotblast.dunsmor.com \
--to=jason@dunsmor.com \
--cc=carsten.dominik@gmail.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).