From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Cc: Bernt Hansen <bernt@norang.ca>
Subject: [PATCH] Always run org-insert-heading-hook when creating headlines
Date: Wed, 29 Sep 2010 23:17:57 -0400 [thread overview]
Message-ID: <1285816677-8438-1-git-send-email-bernt@norang.ca> (raw)
In-Reply-To: <30F91C5F-07A4-400F-AA94-60DEB88BD77B@gmail.com>
* 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
prev parent reply other threads:[~2010-09-30 3:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 14:15 [PATCH] Always run org-insert-heading-hook when creating headlines Bernt Hansen
2010-09-29 14:44 ` Carsten Dominik
2010-09-30 3:17 ` Bernt Hansen [this message]
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=1285816677-8438-1-git-send-email-bernt@norang.ca \
--to=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).