From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: bug in org-habits Date: Tue, 03 Nov 2015 23:36:15 +0100 Message-ID: <874mh2u2w0.fsf@Rainer.invalid> References: <871tc83p01.fsf@flynn.nichework.com> <84io5j1k5h.fsf@gmail.com> <84611j19hk.fsf@gmail.com> <5638C2A1.2090801@iancu.ch> <87h9l32gfc.fsf@nicolasgoaziou.fr> <87d1vq3mh4.fsf@nicolasgoaziou.fr> <874mh23iw0.fsf@nicolasgoaziou.fr> <878u6eu5wg.fsf@Rainer.invalid> <315DDEDC-1BD9-4680-A8C8-B36821EB931C@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtkBr-0002yF-7K for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 17:36:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtkBo-0000Nb-1g for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 17:36:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:55367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtkBn-0000NU-RJ for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 17:36:27 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZtkBi-0002q0-RC for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 23:36:23 +0100 Received: from p54b4743e.dip0.t-ipconnect.de ([84.180.116.62]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Nov 2015 23:36:22 +0100 Received: from Stromeko by p54b4743e.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Nov 2015 23:36:22 +0100 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 John Wiegley writes: >>>>>> Jonathan Leech-Pepin writes: >> Wouldn't last item in entry scale without issues? Find end of headline >> (start of next or end of buffer) and search backwards. If first element from >> end is a property drawer you have it, otherwise you still know there is >> none. > > That sounds even better than what I mentioned about re-search-forward, and > O(1) time complexity as well. I don't think so. Search for end of entry can be complex in itself and you would never know if the properties you find by looking back aren't belonging to an entry one level down unless you scanned the whole span again. Also, properties can be any size and you have to search for the beginning of the drawer. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds