From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH 2/2] Make drawer skipping for note insertion more sensible. Date: Thu, 16 Oct 2008 19:16:18 +0200 Message-ID: References: <1224168679-56353-1-git-send-email-ahktenzero@mohorovi.cc> <1224168679-56353-2-git-send-email-ahktenzero@mohorovi.cc> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============1300824753==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqWSX-0001jP-01 for emacs-orgmode@gnu.org; Thu, 16 Oct 2008 13:16:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqWSW-0001iy-5N for emacs-orgmode@gnu.org; Thu, 16 Oct 2008 13:16:24 -0400 Received: from [199.232.76.173] (port=51555 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqWSV-0001is-UT for emacs-orgmode@gnu.org; Thu, 16 Oct 2008 13:16:23 -0400 Received: from nf-out-0910.google.com ([64.233.182.186]:19016) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KqWSV-0003GN-F0 for emacs-orgmode@gnu.org; Thu, 16 Oct 2008 13:16:23 -0400 Received: by nf-out-0910.google.com with SMTP id c7so56517nfi.26 for ; Thu, 16 Oct 2008 10:16:22 -0700 (PDT) In-Reply-To: <1224168679-56353-2-git-send-email-ahktenzero@mohorovi.cc> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: James TD Smith Cc: emacs-orgmode@gnu.org --===============1300824753== Content-Type: multipart/alternative; boundary=Apple-Mail-6-1057042268 --Apple-Mail-6-1057042268 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Applied, thanks. - Carsten On Oct 16, 2008, at 4:51 PM, James TD Smith wrote: > --- > 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 > > * 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 > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-6-1057042268 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Applied, = thanks.

- Carsten

On Oct 16, = 2008, at 4:51 PM, James TD Smith wrote:

---
= 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 (=3D (char-after) = ?\n) (forward-char 1))
=  (org-skip-over-state-notes)
-- =
1.6.0.2



_______________________________________________=
Emacs-orgmode mailing list
Remember: use `Reply All' to send = replies to the list.
Emacs-orgmode@gnu.org
http://= lists.gnu.org/mailman/listinfo/emacs-orgmode
<= br>
= --Apple-Mail-6-1057042268-- --===============1300824753== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1300824753==--