From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Unable to clock in on task Date: Tue, 27 Oct 2009 16:26:41 +0100 Message-ID: References: <3949.1256654208@gamaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2nwh-0001WW-GG for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 11:26:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2nwc-0001Ts-Er for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 11:26:50 -0400 Received: from [199.232.76.173] (port=39098 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2nwc-0001TS-5Z for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 11:26:46 -0400 Received: from ey-out-1920.google.com ([74.125.78.149]:12728) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2nwb-0007Te-Ng for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 11:26:46 -0400 Received: by ey-out-1920.google.com with SMTP id 3so443201eyh.34 for ; Tue, 27 Oct 2009 08:26:44 -0700 (PDT) In-Reply-To: <3949.1256654208@gamaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: Org Mode List Hi everyone, I believe this is not the right fix. John uses (and wrote) org-files-list to get both the agenda files and any currently open files which happen to be org files but might not be in the org-agenda-files list. The bug is in Johns code, where the function org-agenda-files should be used, rather than the variable. diff --git a/lisp/org.el b/lisp/org.el index ed36c45..d720347 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5362,7 +5362,7 @@ are at least `org-cycle-separator-lines' empty lines before the headline." "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))) + (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)) - Carsten On Oct 27, 2009, at 3:36 PM, Nick Dokos wrote: > Phil Rooke wrote: > >> Keith Lancaster writes: >> >>> I updated to 6.32 this morning and am now unable to clock in on >>> tasks. ... >> >> I too upgraded this morning and am also having problems clocking in >> (using "I" on a task in the daily agenda). My symptoms are >> different, >> Emacs doesn't crash but I do consistently get the following: >> >> Debugger entered--Lisp error: (wrong-type-argument stringp 126) >> expand-file-name(126) >> mapcar(expand-file-name "~/Documents/Org/org-agenda-files") >> org-files-list() >> org-resolve-clocks() >> byte-code.... >> org-clock-in(nil) >> org-agenda-clock-in(nil) >> call-interactively(org-agenda-clock-in nil nil) >> > > This does look like a bug: org-resolve-clock calls org-files-list > which > does not know about the "agenda files list in a file" convention. It > should probably call the function org-agenda-files instead of > org-files-list. org-files-list is only used in this one place and > should > probably be deleted. > > Try this patch: > > diff --git a/lisp/org-clock.el b/lisp/org-clock.el > index ea23a8d..2ce2f22 100644 > --- a/lisp/org-clock.el > +++ b/lisp/org-clock.el > @@ -737,7 +737,7 @@ non-dangling (i.e., currently open and valid) > clocks." > (interactive "P") > (unless org-clock-resolving-clocks > (let ((org-clock-resolving-clocks t)) > - (dolist (file (org-files-list)) > + (dolist (file (org-agenda-files)) > (let ((clocks (org-find-open-clocks file))) > (dolist (clock clocks) > (let ((dangling (or (not (org-clock-is-active)) > > Thanks, > Nick > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten