md-arif-shaikh / tzc

Time Zone Converter for Emacs
GNU General Public License v3.0
18 stars 1 forks source link

Refresh *tzc-wclock* buffer #3

Closed tinglycraniumplacidly closed 2 years ago

tinglycraniumplacidly commented 2 years ago

When I invoke M-x tzc-convert-current-time-to-favourite-time-zones the *tzc-wclock* buffer appears with the times of my favorite time zones, which is great.

However if I invoke it again at a later time, the buffer remains the same (it will just popup with the old info).

Can it be refreshed instead?

Thanks!

PS. I love this package - I was thinking about attempting to write something similar about a year ago, but this is far and away better than anything I would have come up with! So thank you! (This type of functionality should be built into emacs core imo ;))

md-arif-shaikh commented 2 years ago

Hi @tinglycraniumplacidly, thanks for the nice words. I think the functionality you are looking for is already there in another function from the package. Could you try the tzc-world-clock function using M-x tzc-world-clock? It will show the same information as in M-x tzc-convert-current-time-to-favourite-time-zones but with a nicer buffer and it has three keymaps: g to revert to current time at any moment (which you are looking for), n to display times for the next hour and p for the previous hour. Here's how it looks https://github.com/md-arif-shaikh/tzc#world-clock

You can configure the way information on this buffer is displayed. I have written a small post on this here https://md-arif-shaikh.github.io/2022/01/26/improved-world-clock-with-tzc.html

There is a built-in emacs world-clock which does the same, except that it does not have the p or n keys available.

Let me know how it goes.

tinglycraniumplacidly commented 2 years ago

awesome! ty