From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [PATCH] org-end-of-meta-data-and-drawers Date: Wed, 08 Jun 2011 17:43:19 -0700 Message-ID: <87mxhrhm1k.fsf@ericabrahamsen.net> References: <87vcwggcud.fsf@ericabrahamsen.net> <87r573hmgq.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUTLP-0006wL-Ol for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 20:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUTLO-0001El-Gd for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 20:43:31 -0400 Received: from lo.gmane.org ([80.91.229.12]:51210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUTLO-0001Eg-AW for emacs-orgmode@gnu.org; Wed, 08 Jun 2011 20:43:30 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QUTLM-0004zd-Sl for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 02:43:28 +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 02:43:28 +0200 Received: from eric by 63.226.249.211 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2011 02:43:28 +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; charset=utf-8 Content-Transfer-Encoding: 8bit Eric Abrahamsen writes: > Eric Abrahamsen writes: > >> 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. > > Dammit this is still not right, hang on a second… Okay, this should be right, sorry about that. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=orgmetadatafix.diff diff --git a/lisp/org.el b/lisp/org.el index 777850a..ee0b88c 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 re) (if (not (match-end 1)) ;; empty or planning line (forward-line 1) --=-=-=--