From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Nobis Subject: Re: How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" Date: Sun, 15 Jan 2012 16:33:02 +0100 Message-ID: References: <20120106002125.GA32086@shi.workgroup> <8762gp3aqz.fsf@norang.ca> <20120112214110.GB29496@shi.workgroup> <4047.1326406324@alphaville1> <5046.1326408982@alphaville1> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmS52-0007II-6M for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 10:33:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmS50-0005oK-Rk for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 10:33:12 -0500 Received: from basilikum.nobis-admin.de ([89.238.71.130]:58931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmS50-0005nv-N4 for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 10:33:10 -0500 In-Reply-To: <5046.1326408982@alphaville1> (Nick Dokos's message of "Thu, 12 Jan 2012 17:56:22 -0500") 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: nicholas.dokos@hp.com Cc: emacs-orgmode Nick Dokos writes: > The code that sets the level seems suspect to me: > (let* ((headline-forced > (get-text-property (point) > :org-clock-force-headline-inclusion)) > (headline-included > (or (null headline-filter) > (save-excursion > (save-match-data (funcall headline-filter)))))) > (setq level (- (match-end 1) (match-beginning 1))) > What do match-beginning/match-end return if headline-filter is nil? > The save-match-data is not done, so we get the results of whatever > random search was done last before this code executed. Hmmm... the above snippet is from org-clock-sum, right? That means it is part of (while (re-search-backward re nil t) ...) and that's the search match-beginning/match-end are referring to. -- Until the next mail..., Stefan.