From: James TD Smith <ahktenzero@mohorovi.cc>
To: emacs-orgmode@gnu.org
Subject: [PATCH 2/2] Make drawer skipping for note insertion more sensible.
Date: Thu, 16 Oct 2008 15:51:19 +0100 [thread overview]
Message-ID: <1224168679-56353-2-git-send-email-ahktenzero@mohorovi.cc> (raw)
In-Reply-To: <1224168679-56353-1-git-send-email-ahktenzero@mohorovi.cc>
---
lisp/ChangeLog | 3 +++
lisp/org.el | 12 +++++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 42622b0..33eca1a 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -8,6 +8,9 @@
(org-clock-in): Use org-indent-line-function to indent clock lines.
(org-clock-find-position): Fix indentation of empty clock drawers.
+ * org.el (org-add-log-setup): Only skip drawers if the are
+ immediately after the scheduling keywords.
+
2008-10-16 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-add-log-setup): Respect
diff --git a/lisp/org.el b/lisp/org.el
index 2eb70dd..413ac6c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8392,15 +8392,17 @@ EXTRA is additional text that will be inserted into the notes buffer."
(org-back-to-heading t)
(narrow-to-region (point) (save-excursion
(outline-next-heading) (point)))
- (when org-log-state-notes-insert-after-drawers
- (while (re-search-forward
- (concat "\\(" org-drawer-regexp
- "\\|" org-property-end-re "\\)")
- (point-max) t) (forward-line)))
(looking-at (concat outline-regexp "\\( *\\)[^\r\n]*"
"\\(\n[^\r\n]*?" org-keyword-time-not-clock-regexp
"[^\r\n]*\\)?"))
(goto-char (match-end 0))
+ (when (and org-log-state-notes-insert-after-drawers
+ (save-excursion (forward-line) (looking-at org-drawer-regexp)))
+ (progn (forward-line)
+ (while (looking-at org-drawer-regexp)
+ (goto-char (match-end 0))
+ (re-search-forward org-property-end-re (point-max) t)
+ (forward-line))))
(unless org-log-states-order-reversed
(and (= (char-after) ?\n) (forward-char 1))
(org-skip-over-state-notes)
--
1.6.0.2
next prev parent reply other threads:[~2008-10-16 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 14:51 [PATCH 1/2] Allow org-clock-in-switch-to-state to be a function James TD Smith
2008-10-16 14:51 ` James TD Smith [this message]
2008-10-16 17:16 ` [PATCH 2/2] Make drawer skipping for note insertion more sensible Carsten Dominik
2008-10-16 17:16 ` [PATCH 1/2] Allow org-clock-in-switch-to-state to be a function 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
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=1224168679-56353-2-git-send-email-ahktenzero@mohorovi.cc \
--to=ahktenzero@mohorovi.cc \
--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).