[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] newline at start of buffer
From: |
Dan Davison |
Subject: |
[Orgmode] newline at start of buffer |
Date: |
Fri, 02 Oct 2009 23:33:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
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
- [Orgmode] newline at start of buffer,
Dan Davison <=