rpdillon / todotxt.el

A todo.txt client for Emacs
55 stars 18 forks source link

Does not handle external changes well #1

Closed licquia closed 11 years ago

licquia commented 11 years ago

If you use the Emacs mode exclusively, or always kill the todotxt buffer when done, this seems to work OK. But if you leave the todotxt buffer open, and modify todo.txt in some external tool, things tend to go wrong.

On most occasions, you get the usual "buffer edited on disk" warning. If you revert to the disk version, you get kicked out of todotxt mode at the same time, and the buffer goes into regular Text mode. Just now, I tried killing the todotxt buffer and making some changes; when I went back into todotxt mode, it deleted all but 5 of my tasks for some reason. (The ~ file was fortunately still there.)

It might be nice to check the buffer status before starting anything that would modify the buffer, and doing the reload itself if needed.

Ubuntu 12.04, with shipped Emacs. Using the feature/dates branch.

licquia commented 11 years ago

FWIW, I've discovered that setting auto-revert-mode seems to fully fix this problem.

rpdillon commented 11 years ago

Thanks for bringing this up, I'll take a look shortly and follow up.

rpdillon commented 11 years ago

I've put an update in the feature/auto-revert branch (I've merged feature/dates as well, so you won't lose that if you switch).

licquia commented 11 years ago

Switched branches; will let you know if I have any trouble.

rpdillon commented 11 years ago

Things appear to be working fairly well so far, closing.