From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: [PATCH] org-end-of-meta-data-and-drawers Date: Wed, 08 Jun 2011 15:47:22 -0700 Message-ID: <87vcwggcud.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QURXE-00051J-Kn for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 18:47:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QURXD-0001aG-0h for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 18:47:36 -0400 Received: from lo.gmane.org ([80.91.229.12]:52561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QURXC-0001Zz-K7 for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 18:47:34 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QURXB-0000qP-CH for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 00:47:33 +0200 Received: from 63.226.249.211 ([63.226.249.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2011 00:47:33 +0200 Received: from eric by 63.226.249.211 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2011 00:47:33 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Currently, this function goes to a lot of trouble to concatenate a complicated regexp to find metadata and drawers, and then doesn't use it. As it stands, if you put point in a headline that has a property drawer and then call =(org-end-of-meta-data-and-drawers)=, point moves to the *beginning* of the property drawer -- obviously not what you want. Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=orgmetadatafix.diff diff --git a/lisp/org.el b/lisp/org.el index 777850a..e7f9f89 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19992,7 +19992,7 @@ clocking lines, and drawers." "\\|" "\\([ \t]*\\(" org-keyword-time-regexp "\\)\\)"))) (forward-line 1) - (while (looking-at (concat "[ \t]*\\(" org-keyword-time-regexp "\\)")) + (while (looking-at (concat "[ \t]*\\(" re "\\)")) (if (not (match-end 1)) ;; empty or planning line (forward-line 1) --=-=-=--