From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [PATCH] org-end-of-meta-data-and-drawers Date: Thu, 30 Jun 2011 20:46:36 -0400 Message-ID: <87ei2alteb.fsf@ericabrahamsen.net> References: <87vcwggcud.fsf@ericabrahamsen.net> <87k4c3z4sd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcRsm-0002MS-PS for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 20:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcRsl-0004Eq-H6 for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 20:46:56 -0400 Received: from lo.gmane.org ([80.91.229.12]:47494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcRsl-0004Ef-C6 for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 20:46:55 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QcRsh-0004YM-83 for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 02:46:51 +0200 Received: from c-68-54-81-168.hsd1.md.comcast.net ([68.54.81.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jul 2011 02:46:51 +0200 Received: from eric by c-68-54-81-168.hsd1.md.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jul 2011 02:46:51 +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 On Thu, Jun 30 2011, Bastien wrote: > Hi Eric, > > 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. > > you're right there was something weird in this function. > > I just simplified it, inspired by your patch. Thanks > for this! Thanks, but this introduces new problems for me -- the regexp matches on every line, so it trucks along past both drawers and regular text to the next heading, and stops there. I think the test for the drawer end is necessary, which probably means the regexp grouping is also necessary… E PS My own use case (another version of org word count) didn't rely on a return value from the function, but it strikes me that, all else being equal, a return value of point could be more useful than nothing…