-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(wrong-number-of-arguments (1 . 1) 2) in org-clock-sum when trying to run #5
Comments
Can you produce the entire stack trace? Run |
This is the output.
Does that help? |
It gets to the stage where its created the buffer to display the org-clock-budget report, but does not populate it, which is why I feel that there is some error in my clock budget timesheets which is causing the problem. Plus the rather strange syntax of (1 . 1) 2), as if somewhere in my timesheets 1+1 does not equal 2! Does that make sense? |
The above is not the whole stack trace, it should have at least 20 lines. It shows me how the code is called in sequence so that I can debug the chain. The syntax Can you use This is what I get
As you can see on the second line it accepts 4 arguments. |
org-clock-sum is an autoloaded compiled Lisp function in ‘org-clock.el’. (org-clock-sum &optional TSTART TEND HEADLINE-FILTER PROPNAME) Sum the times for each subtree. |
Hm, then the problem is somewhere else. Unfortunately I can't repro this and without the stack trace it's quite difficult to figure out. Can you check what the value of the variable |
What happens if you have two time-clock entries, exactly the same date and times in a different project? could that cause my problem? i can't check it at this end because everything seem to be okay, When I generate a clocksum for each of my projects that is tracked with org-clock-budget there doesn't seem to be any discrepancies thrown up. I started using 'org-super-agenda' on 24/7/2107 so maybe this is what's causing my problem? That is the only program that I know that may affect org-clock-budget, and my updated org-plus-contrib from 14/08/2017. |
It shouldn't matter, each entry is summed separately. The error here is that something somewhere changed the API and we are trying to send in data which it can't handle. If @alphapapa Do you have any ideas here? Any help is appreciated :) |
I've commented org-super-agenda out and removed it with a paradox. but the problem still remains, so its not org-super-agenda. I'm calling org-clock-budget from my easy menu with this line
and this is its setting in my conf file
I have no entries for org-clock-budget in my custom.el, and my org-clock-budget.el is stored as
and is dated 21-08-2016. Just for your info which might help in diagnosing the problem. |
Two questions:
Three suggestions:
|
Provisional answers 2 -
|
No errors reported with bug-hunter on my init.el, so I ran bug-hunter-file on org-clock-budget.el, and this is what it says -
|
Then it seems you need to install the |
dash was loaded as a dependency, I've now explicitly loaded it as (require 'dash) and restarted emacs but the problem still remains. dash is version 20170810. Perhaps there is something changed in dash that affects org-clock-budget? or in org-clock? Or some Frankenstein-like error thrown up with the combination of both of them? But I'm getting the same bug-hunter problem as already shown. |
I recommend deleting all copies of |
i can't delete dash, its a dependency of ereader, xml+, wrap-region, tile, string-edit, spaceline, smartparens, skeletor, and even more. I gave up at that point! I then tried physically removing it from elpa and then started paradox again, which showed dash as being deleted but i wasn't able to reinstall it or delete it through paradox, so I'm stuck now! I've reinstalled all those I've marked earlier and it should hopefully be okay if I was to restart emacs. So I don't know what the solution is now. |
looking at dash I wonder if pull request #222 is causing the problem that I've found in org-clock-budget, as that seems to have triggered the update of 20170810? |
Sorry, I wasn't clear:
I don't see how magnars/dash.el#222 could have caused any problems, since all it does is add new functions to dash. I suspect that if you reinstall the relevant packages from scratch, after deleting all traces of them from the |
As bug-hunter-file run on org-clock-budget shows that its finding a problem at line #29 which is |
|
done Although I do notice one difference, I removed |
You can also try to use |
Ok, I think we're back to needing the full backtrace. What you gave earlier was just:
It should be several lines long. |
I'm sorry, but I've reached the limits of my comfort zone, I don't feel happy or confident to attempt to use |
You should be able to produce the full backtrace by setting |
When I run
|
What buffer are you copying that from? There should be a |
After eviscerating my config file, I've finally been able to produce a backtrace, so here it is -
Does this help? |
Yes, very much. We can see that the function
now only takes one argument instead of two. So that is the problem right there. I think that you are loading an old version of the |
But org-plus-contrib was only upgraded on the 20170821, so surely when I restart emacs it should be loading that version? And
So what's happening then? Is there a regression in their org-clock file then? |
As I said, sometimes stale |
@alphapapa I've deleted and reinstalled org-plus-contribs like you showed earlier, and its still showing up the original error when I try to use org-clock-budget. @Fuco1 I'm getting this backtrace now -
|
Did you restart Emacs after reinstalling it? |
Yes. |
Ok, run (defun org-time-string-to-time (s &optional zone)
"Convert timestamp string S into internal time.
The optional ZONE is omitted or nil for Emacs local time, t for
Universal Time, ‘wall’ for system wall clock time, or a string as
in the TZ environment variable."
(apply #'encode-time (org-parse-time-string s nil zone))) Well, when I say "should," I mean, if everything were working correctly. That function was changed to the two-argument version on July 7th in this commit, so your function is from before it:
|
By the way, since you have |
Because I found that org-plus-contrib was continually asking for org I use a dummy package of org with the date of |
You said that your org-plus-contrib was upgraded on 20170821, which is after the function was changed to the two-argument version, so it shouldn't be possible for org.el to still contain the one-argument version. Something is wrong with your packages. You didn't give the full path to |
|
Okay, this is strange: I downloaded org-20180821.tar from the Org ELPA and opened org.el, and it does have the single-argument version. Then I looked in org-clock.el from that package, and it makes calls to that function with two arguments. Something is wrong in the package itself. I wonder if you are the first to notice... |
So I'm not going mad then by my org-clock-budget refusing to work? That is a very great relief, thanks. :) |
No, you're not going mad at all. My apologies for doubting you; I have had so many similar problems that were caused by old .elc files that I thought surely that was causing this. I'm trying to figure out why the old version of org-clock.el is being included in the package, because this bug was fixed on August 5th. |
Well, I'm stumped: I check org.el from the current git master branch, and it has the updated function that takes 1 or 2 arguments, and that change was made here:
And that introduced a bug that was fixed in org-clock.el here:
And that was merged to master here:
Then I check org.el from the org-20170821.tar and it has the old function that only takes 1 argument. How is the old org.el file ending up in the new tar? I guess you should post this on the mailing list so one of the maintainers can look into it. Unless I'm also going mad, something's not right here. |
I'm curious, so I will go ahead and post it to the mailing list. |
@alphapapa thanks for investigating! I'm so flustered right now I wouldn't be able to do the detective work. |
Achim Gratz responded on the mailing list:
I don't know how the build process works, but IIUC, the tarballs are built from the maint branch, and the regression was on master, and the regression fix was applied to maint, which broke maint. So hopefully that can be fixed soon. |
I have just updated my emacs packages which have included 'org-plus-contrib-20170828' but my original problem still remains. I have closed emacs and then restarted it but its made no difference. Arrrgghhh! |
I think you will need to get an older version instead. I run |
I was hoping one of the Org maintainers would respond to that thread on the mailing list, but I see that none have. :( |
And I've now got org-clock-budget working again. I updated my org-mode cloning in my git directory, and then set my emacs config to be read from there, and its all working nicely. So thanks folks, I'm a happy bunny again. |
Are you running |
master |
Yes, that explains it, as the fix was erroneously applied to |
By the way, I just noticed this in a message from Nicolas Goaziou; it might be part of the problem:
|
I've got org-clock-budget working in org version 9.1! Using the stock install doesn't allow org-clock-budget to work, however, if you include this -
it works! However, there is one caveat - it doesn't allow you to just use hours (which I think is org-clock-budget's default), instead it uses like this '1d 10:34', or '20d 20:00'. I don't know if org-clock-budget could be tweaked to get back to the original hours, which I much prefer, or is there some other way in which we can get org-clock-budget displaying back in hours please? I have no idea what jiggery-pokery is going on under the bonnet, but hey-ho, its works! |
I've changed my workflow in the last year or so and haven't used this much but I'm thinking getting back to my old way of doing things. I will have a look but can't promise as to when. |
I'm getting an error report when I try to run org-clock-budget which says
Nothing has changed in my setup, and I'm guessing that its related to something with the actual time clocking. Can you give me any guidance as to what is wrong please?
The text was updated successfully, but these errors were encountered: