On Thu, Jun 30 2011, Bastien wrote: > Hi Eric, > > Eric Abrahamsen <e...@ericabrahamsen.net> 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…