From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: How to trigger the clockcheck in an agenda view. Date: Tue, 25 Nov 2014 18:02:28 +0100 Message-ID: <5474B624.80002@online.de> References: <51E688F4.8090601@online.de> <51F617EF.4010600@online.de> <86siyx4uqm.fsf@somewhere.org> <51F8BBF6.2020803@online.de> <8661vjhnqy.fsf@somewhere.org> <546DE3DA.3040107@online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtJVo-0002Vq-HP for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 12:02:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtJVi-00004x-97 for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 12:02:48 -0500 Received: from plane.gmane.org ([80.91.229.3]:49451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtJVh-0008VI-Q2 for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 12:02:41 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XtJVg-0004KP-Q9 for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 18:02:40 +0100 Received: from 212.34.176.74 ([212.34.176.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Nov 2014 18:02:40 +0100 Received: from rainer.stengele by 212.34.176.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Nov 2014 18:02:40 +0100 In-Reply-To: <546DE3DA.3040107@online.de> 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 Cc: emacs-orgmode Am 20.11.2014 um 13:51 schrieb Rainer Stengele: > Am 27.09.2013 um 15:00 schrieb Carsten Dominik: >> >> On 10.9.2013, at 17:07, Nicolas Girard wrote: >> >>> 2013/8/5 Sebastien Vauban : >>>> >>>> Except the above, I definitely don't understand why it wouldn't work for you. >>>> Can you reproduce the problem with a minimal Emacs config file (adding the >>>> require of `org' and `org-agenda' before)? >>>> >>> >>> I think I understand why Rainer has a problem. >>> >>> According to the docstring from `org-agenda-custom-commands', there >>> are two acceptable syntaxes for defining a command: >>> - the "simple" one : (key desc type match settings files) >>> - and the "complex" or "composite" one : (key desc (cmd1 cmd2 ...) >>> general-settings-for-whole-set files). >>> >>> Now, the following code defines two commands, who are functionally >>> identical, but syntactically different. The first one uses the "simple" >>> syntax, and the second one, the "complex" syntax. >>> >>> If you evaluate the code and trigger the agenda, you'll see that the >>> first command *doesn't* work as expected, while the second works. >>> >>> (I just borrowed your scissors to delimit my code, hope you don't mind ;-) ) >>> >>> --8<---------------cut here---------------start------------->8--- >>> (setq org-agenda-custom-commands nil) >>> (setq org-agenda-custom-commands >>> (append >>> org-agenda-custom-commands '( >>> ("G" "Good: Clock Review" >>> ((agenda "" >>> ((org-agenda-show-log 'clockcheck) >>> (org-agenda-clockreport-mode t))))) >>> ("B" "Bad: Clock Review" >>> agenda "" >>> ((org-agenda-show-log 'clockcheck) >>> (org-agenda-clockreport-mode t)))))) >>> --8<---------------cut here---------------end--------------->8--- >> >> There are a couple of subtle issues here. >> >> First of all, do not bind org-agenda-clockreport-mode or org-agenda-show-log in this way, these are internal variables and meant for a mode that is toggled interactively. Use org-agenda-start-with-clockreport-mode and org-agenda-start-with-log-mode instead. These are the values chosen when a new agenda buffer is created, and at that time its value is copied into internal variables. >> >> Second, because this happens when the agenda buffer is created, these need to be in the global list of variables, not the local ones for the agenda list, when you use a list of commands. So the example below will work in both cases: >> >> (setq org-agenda-custom-commands >> (append >> org-agenda-custom-commands '( >> ("H" "Good: Clock Review" >> ((agenda "")) >> ((org-agenda-start-with-log-mode 'clockcheck) >> (org-agenda-start-with-clockreport-mode t))) >> ("C" "Bad: Clock Review" >> agenda "" >> ((org-agenda-start-with-log-mode 'clockcheck) >> (org-agenda-start-with-clockreport-mode t)))))) >> >> >> >> Hope this helps. >> >> - Carsten >> > Hello Carsten, > > thank you for that. clockcheck is working. But as soon as I get the clockcheck view the scheduled items to disappear in my agenda view. > I only can get scheduled items or all items in clockchecked view, not both features. > Any idea? > Thanks! > - Rainer > > Hi again! Any hint is much appreciated, even a "does not work right now" would be welcome although disappointing. Thank you. Regards, Rainer