Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Phil Rooke
Keith Lancaster klancaster1...@acm.org writes:

 I updated to 6.32 this morning and am now unable to clock in on
 tasks. At first, there was an issue with an org file having a dangling
 clock- 
 in. When I attempted to log in to a task, it alerted me to the
 dangling task. No matter how I answered (cancel, etc), Emacs crashed.
 I then fixed the dangling clock in question and tried again. Now,
 emacs crashed immediately without displaying a menu. I am guessing
 that the issue is still related to a dangling clock-in, but cannot be
 sure. Is there a way to disable the clock-checking feature? I'm on
 emacs 23 cocoa on Snow Leopard.

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)

Currently running:

79bcdbe73667be7ad811c1f2facd419cbef90426
Author: Carsten Dominik carsten.domi...@gmail.com
Date:   Tue Oct 27 09:29:49 2009 +0100

Mac OS X 10.5.8
GNU Emacs 23.50.1

Rgds

Phil


___
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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Nick Dokos
Phil Rooke p...@yax.org.uk wrote:

 Keith Lancaster klancaster1...@acm.org 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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Keith Lancaster
That did it! The patch fixes the problem - it now handles all the  
dangling clocks and then clocks in correctly. Thanks!


Keith

On Oct 27, 2009, at 9:36 AM, Nick Dokos wrote:


Phil Rooke p...@yax.org.uk wrote:


Keith Lancaster klancaster1...@acm.org 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



Keith Lancaster
klancaster1...@acm.org




___
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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Phil Rooke
Nick Dokos nicholas.do...@hp.com writes:

 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))

That works for me.  Thanks a lot.

Phil


___
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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Carsten Dominik

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 p...@yax.org.uk wrote:


Keith Lancaster klancaster1...@acm.org 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





___
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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Phil Rooke
Nick Dokos nicholas.do...@hp.com writes:

 Even better, using org-submit-bug-report would have shown us that the
 agenda file list in a file convention was being used - as you can
 imagine, that's not the setting I use, so when I tried clocking in
 yesterday, things worked without a problem for me.

Back in the days of v3.x/4.x when I originally wrote the org reference
card I would pride myself on knowing pretty much everything the mode
offered...nowadays, sadly, lots of bits pass me by.  I didn't even know
of the bug report function :(

Still I do now, thanks and I will use it in future.

 Moralizingly-but-I-hope-not-overbearingly-so yours,

Not at all, it was a fair point.

Regards,

Phil




___
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


Re: [Orgmode] Unable to clock in on task

2009-10-27 Thread Keith Lancaster

Oops. Meant to copy list.

On Oct 27, 2009, at 10:27 AM, Keith Lancaster wrote:

Would have if I could have! (I used to run a QA dept, so I knew how  
bad my Its blowing up message was :-).


The symptom on my machine was the Mac equivalent of a GPF - Emacs  
disappeared and the I'm sending this to Apple message popped up.  
How do you get Emacs to run in a mode that will allow a backtrace in  
this kind of case?


Keith

On Oct 27, 2009, at 10:06 AM, Nick Dokos wrote:


Keith Lancaster klancaster1...@acm.org wrote:

Let me point out that the difference between Keith's original  
report and

Phil's report is that Phil included the backtrace - given that, the
patch was easy. So, Keith, you know what to do next time :-)

Even better, using org-submit-bug-report would have shown us that the
agenda file list in a file convention was being used - as you can
imagine, that's not the setting I use, so when I tried clocking in
yesterday, things worked without a problem for me.

Moralizingly-but-I-hope-not-overbearingly-so yours,
Nick



Keith Lancaster
klancaster1...@acm.org




Keith Lancaster
klancaster1...@mac.com



___
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


[Orgmode] Unable to clock in on task

2009-10-26 Thread Keith Lancaster
I updated to 6.32 this morning and am now unable to clock in on tasks.  
At first, there was an issue with an org file having a dangling clock- 
in. When I attempted to log in to a task, it alerted me to the  
dangling task. No matter how I answered (cancel, etc), Emacs crashed.  
I then fixed the dangling clock in question and tried again. Now,  
emacs crashed immediately without displaying a menu. I am guessing  
that the issue is still related to a dangling clock-in, but cannot be  
sure. Is there a way to disable the clock-checking feature? I'm on  
emacs 23 cocoa on Snow Leopard.


Thanks,
Keith Lancaster
klancaster1...@acm.org




___
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


Re: [Orgmode] Unable to clock in on task

2009-10-26 Thread Nick Dokos
Keith Lancaster klancaster1...@acm.org wrote:

 I updated to 6.32 this morning and am now unable to clock in on
 tasks. At first, there was an issue with an org file having a dangling
 clock- 
 in. When I attempted to log in to a task, it alerted me to the
 dangling task. No matter how I answered (cancel, etc), Emacs crashed.
 I then fixed the dangling clock in question and tried again. Now,
 emacs crashed immediately without displaying a menu. I am guessing
 that the issue is still related to a dangling clock-in, but cannot be
 sure. Is there a way to disable the clock-checking feature? I'm on
 emacs 23 cocoa on Snow Leopard.
 

The culprit must be the emacs 23 cocoa on Snow Leopard part.
It works fine (in the sense that it does not lead to emacs crashes) on
Linux:

   Org-mode version 6.32 (release_6.32.8.g9077)
   GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-10-13 
on gamaville.dokosmarshall.org

I don't clock much (maybe one of these years, when I find the time...
the usual excuse of the procrastinator :-), so I'm not sure how things
are supposed to work. I tried to clock in a task from the agenda (using
I), I get a dangling clock message, I select cancel and everything is
fine.  I then clock out and the clock gets updated appropriately. I then
clock in again and get another dangling clock warning (with ~12 mins
on it).  After doing it a few times on a couple of different items, I
don't get the dangling messages any more either. I guess all the clocks I had
started way back when, when I was playing with clocks, and had not closed,
were found, dealt with, and now I'm all set - maybe.

If anything is really wrong, I'm sure we'll get an earful when Bernt
(aka the king of clocking) upgrades !-)

As for turning things off, the following two (excerpted from org-clock.el)
might help (untested):

,
| ...
| (defcustom org-clock-idle-time nil
|   When non-nil, resolve open clocks if the user is idle more than X minutes.
|   :group 'org-clock
|   :type '(choice
| (const :tag Never nil)
| (integer :tag After N minutes)))
| 
| (defcustom org-clock-auto-clock-resolution 'when-no-clock-is-running
|   When to automatically resolve open clocks found in Org buffers.
|   :group 'org-clock
|   :type '(choice
| (const :tag Never nil)
| (const :tag Always t)
| (const :tag When no clock is running when-no-clock-is-running)))
| ...
`

HTH,
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