From: Dan Davison <davison@stats.ox.ac.uk>
To: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: newline at start of buffer
Date: Fri, 02 Oct 2009 23:33:24 -0400 [thread overview]
Message-ID: <87hbuhp2wr.fsf@stats.ox.ac.uk> (raw)
In a completely empty buffer, org-insert-heading inserts a newline
before the first heading. However, if there is (e.g.) a single space
character in the buffer (after point), the heading goes on the first
line. I admit it's trivial, but that doesn't seem right -- there
presumably isn't a reason for the newline in the first case and not in
the second, right? (My preference would be no automatic blank line.)
Dan
diff --git a/lisp/org.el b/lisp/org.el
index 73ef6c5..4883a2f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5754,7 +5754,7 @@ current headline. If point is not at the beginning, do not split the line,
but create the new headline after the current line."
(interactive "P")
(if (= (buffer-size) 0)
- (insert "\n* ")
+ (insert "* ")
(when (or force-heading (not (org-insert-item)))
(let* ((empty-line-p nil)
(head (save-excursion
next reply other threads:[~2009-10-03 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-03 3:33 Dan Davison [this message]
2009-10-03 7:24 ` newline at start of buffer Carsten Dominik
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbuhp2wr.fsf@stats.ox.ac.uk \
--to=davison@stats.ox.ac.uk \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.