From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: More clocktable breakage Date: Thu, 27 Apr 2017 19:56:56 +0200 Message-ID: <87shkt4tuf.fsf@Rainer.invalid> References: <877f39nr05.fsf@Rainer.invalid> <87d1d0p2qx.fsf@nicolasgoaziou.fr> <87tw5bumck.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3nfA-0000qG-6n for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 13:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3nf7-0005PS-5m for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 13:57:08 -0400 Received: from [195.159.176.226] (port=34511 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3nf6-0005PJ-Us for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 13:57:05 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d3nex-0001mh-T9 for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 19:56:55 +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" To: emacs-orgmode@gnu.org Achim Gratz writes: > Nicolas Goaziou writes: >> At the moment, I cannot reproduce it. I tried M-up in the following >> document: >> >> #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>" :tend "<2006-08-10 Thu 12:00>" >> #+END: clocktable > > The breakage happens in this clause in org-at-timestamp-p: > > (match > (let ((boundaries (org-in-regexp tsr))) > (save-match-data > (cond ((null boundaries) nil) > ((org-at-planning-p)) > ((org-at-property-p)) > ;; CLOCK lines only contain inactive time-stamps. > ((and inactive-ok (org-at-clock-log-p))) > (t > (eq 'timestamp > (save-excursion > (when (= pos (cdr boundaries)) (forward-char -1)) > (org-element-type (org-element-context)))))))))) > > After matching the timestamp in the header argument correctly, the code > falls through to the default cond, where (org-element-type > (org-element-context)) returns 'dynamic-block, which isn't a 'timestamp. > The successful match gets discarded and the timestamp doesn't get > recognized. An empty clause for (org-at-block-p) would fix it, but I'm > not sure that is the right thing to do. I haven't looked at > org-element-context to see whether it might misinterpret something. I did look at org-element-context and the code in org-at-timstamp-p makes even less sense to me now. The only time org-element-context returns 'timestamp is when it is on a planning line, but org-at-timstamp-p has already left the cond in that case in the second clause. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada