-
Notifications
You must be signed in to change notification settings - Fork 0
tasks don't properly update when chronometrist.sexp is changed outside emacs #3
Comments
As a work-around, is there any way to reset the state of chronometrist, without needing to restart emacs? Just closing all the buffers doesn't seem to do the job. |
Thanks for the report. I was able to replicate it a few days ago, and am working on a fix. The workaround at the moment might be to |
That doesn't quite work - I'm not sure why. It may need |
@wu-lee whew, debugging this one has been exhausting. I think I've managed to fix it in the dev branch, would you like to test it by installing it from source? |
Just installed... I notice editing a task name in chronometrist.sexp doesn't seem to show up in the [edit] Just to elaborate: I'm using commit 8be5eb1 by adding the elisp directory of a git checkout to |
Thanks for testing the development version. Are you able to replicate the issue with the file being replaced? I've actually done a lot of testing by modifying task names, of late, and it worked for me...what was your exact change? Was it to the last expression, or something else? Also, note that if you rename the file while Emacs is running, the file notify watch will be invalidated and changes to the file won't be noticed, at least until one kills the Chronometrist buffer (optionally creating the file again, if you want to use an existing file) and runs |
In this case, immediately after starting emacs and chronometrist, I just opened I'll see if I can find out more. Thanks for your work on this. |
Re: task list not being updated, there was a situation I apparently overlooked. Should be fixed on the latest commit to the dev branch. Waiting to hear whether the file replacement behaviour is any better than before 😀 |
I did a git pull (to commit 018fcdd) and restarted emacs - initially it didn't work because there was a malformed time string (my mistake, but the error is quite opaque unless you know how to get and inspect a stack trace) I don't seem to be able to get the Also, adding new events to Avoiding the symlink to Closing all chronometrist buffers and re-opening doesn't seem to help. Possibly this could be an emacs version problem? I realise I should have stated my version up front:
... however, looking at the git commit history, I see you added a function |
I've made a TODO item for a function to check the contents of the file. (PRs welcome! 😀) I'm quite puzzled how you're getting those, because I rely on that functionality every day 🤔 Did you test that with I tried Also, do you by any chance byte compile things? You probably want to remove any .elc files for Chronometrist, for the purpose of debugging. |
The chronometrist code is not byte compiled when I run it from the git checkout. I did try running with -q just now, but because of the missing dependencies it failed, and I have not yet ventured to find a way to load them without the melpa packaging system. I have tried to debug the code but find it tricky, emacs debug/edebug isn't very familiar and the various 3rd party anaphoric/threading libraries even less so... Could I ask what the intended behaviour of the |
You'll probably have to run something like There's a commented The g key is having an existential crisis of sorts after the v0.6 release. 😅 I guess I could bind it to some kind of force-refresh command, if necessary. As a nuclear option, you can see if downgrading to pre-v0.6 makes life better for you 🤔 |
How to reproduce:
chronometrist.sexp
file*Chronometrist*
buffer and hitg
What I'd expect is for the tasks to update to the content of the new sexp file. They don't - the existing task list remains, and none of the tasks in the sexp file are listed, even after adding new tasks.
If I add a new task with the name of an unlisted but existing task from the new file, it appears in the list, but the time from previous entries doesn't seem to be included.
Old tasks with no entries in the file never disappear. (I'd expect them to be removed if they are no longer present)
And sometimes, I seem to be unable to add new tasks - they don't go into the list. However, this is hard to reproduce reliably, I don't know what triggers it. I have seen it several times, however.
I should also mention:
chronometrist.sexp
file between machines, so sometimes this means the file updates outside the context of emacsThe text was updated successfully, but these errors were encountered: