From mboxrd@z Thu Jan 1 00:00:00 1970 From: James TD Smith Subject: Re: Patch for resolving "away time" when clocked in Date: Tue, 20 Oct 2009 12:57:27 +0100 Message-ID: <20091020115727.GP72276@yog-sothoth.mohorovi.cc> References: <27E1810B-0447-46B3-9AF4-BA14ACECA00A@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0DLK-0007qi-Gl for emacs-orgmode@gnu.org; Tue, 20 Oct 2009 07:57:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0DLG-0007q2-SG for emacs-orgmode@gnu.org; Tue, 20 Oct 2009 07:57:34 -0400 Received: from [199.232.76.173] (port=56753 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0DLG-0007pz-NN for emacs-orgmode@gnu.org; Tue, 20 Oct 2009 07:57:30 -0400 Received: from 81-86-40-42.dsl.pipex.com ([81.86.40.42]:64110 helo=yog-sothoth.mohorovi.cc) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0DLG-0006Se-48 for emacs-orgmode@gnu.org; Tue, 20 Oct 2009 07:57:30 -0400 Content-Disposition: inline In-Reply-To: <27E1810B-0447-46B3-9AF4-BA14ACECA00A@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Wiegley Cc: Org-mode Mode Hi John, On 2009-10-16 03:03:19(-0400), John Wiegley wrote: > Looking for anyone who uses Org's time clocking facilities and is > willing to test this with me. I've been using it for a couple of days > now. The functionality is based on the way the commercial app > OfficeTime handles idleness. I've been using org with this patch for a couple of days and I've found a problem. I have several remember templates for handling phone calls, which clock in automatically. org-clock-resolve fails when the remember buffer is open, I think because the rememeber buffer somehow got into the result of org-files-list. I've changed org-files-list in my org install to --8<---------------cut here---------------start------------->8--- (defun org-files-list () "Return `org-agenda-files' list, plus all open org-mode files. This is useful for operations that need to scan all of a user's open and agenda-wise Org files." (let ((files (mapcar 'expand-file-name org-agenda-files))) (dolist (buf (buffer-list)) (with-current-buffer buf (if (and (eq major-mode 'org-mode) (buffer-file-name) (not (equal (buffer-name) "*Remember*"))) (let ((file (expand-file-name (buffer-file-name)))) (unless (member file files) (push file files)))))) files)) --8<---------------cut here---------------end--------------->8--- which seems to have fixed the problem. -- |---|