[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH] Always run org-insert-heading-hook when creating headl
From: |
Bernt Hansen |
Subject: |
[Orgmode] [PATCH] Always run org-insert-heading-hook when creating headlines |
Date: |
Wed, 29 Sep 2010 23:17:57 -0400 |
* lisp/org.el (org-insert-heading): Run org-insert-heading-hook when creating
the first heading in a file
The org-insert-heading-hook was skipped when creating the first
heading in a new org file.
---
Carsten,
You're correct -- I completely missed the list details on this one. Here's an
updated
patch.
Thanks for spotting this.
Regards,
Bernt
lisp/org.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 75ee798..32c6c4a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6673,7 +6673,9 @@ This is important for non-interactive uses of the
command."
(and (not (save-excursion (and (ignore-errors (org-back-to-heading
invisible-ok))
(org-on-heading-p))))
(not (org-in-item-p))))
- (insert "\n* ")
+ (progn
+ (insert "\n* ")
+ (run-hooks 'org-insert-heading-hook))
(when (or force-heading (not (org-insert-item)))
(let* ((empty-line-p nil)
(head (save-excursion
--
1.7.3