Re: specify time of day for org-resolve-clocks, not number of minutes
Hi Dan, Dan Drake writes: > I like the idea of using g/G and intelligently interpreting the > user's response -- it's good UI / UX design. (Imagine asking a friend > when they "got back" -- both "20 minutes ago" and "8:35" are > unambiguous answers to the question.) Yes. > Now we need to decide how to distinguish the two. Would it work to > just examine the user input for a colon and branch based on that? You can use `read-string' and try to match either a wholenumberp (as "[0-9]\+") or a time spec (as "[0-9]\+:[0-9]\\{2\\}"). I don't think we need to trigger the calendar: relying on (concat (format-time-string "%F " last-valid) time) is good enough. No need to support am/pm notation either, as long as we advertize the need to enter HH:MM time. We shall support this for both k/K ("keep") and g/K ("got back"), don't you think so? > I'll see if I can get this working. Thanks a lot! Since this is a new feature, I'd like to polish it before Org 9.4 (which I initially planned for tomorrow, but I will adapt.) -- Bastien
Re: specify time of day for org-resolve-clocks, not number of minutes
I like the idea of using g/G and intelligently interpreting the user's response -- it's good UI / UX design. (Imagine asking a friend when they "got back" -- both "20 minutes ago" and "8:35" are unambiguous answers to the question.) Now we need to decide how to distinguish the two. Would it work to just examine the user input for a colon and branch based on that? I'll see if I can get this working. On Thu, Feb 13, 2020 at 1:16 AM Bastien wrote: > Hi Kyle and Dan, > > Kyle Meyer writes: > > > Thanks, though sadly Dan had already taken the time to follow up with a > > patch: > > > > https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00175.html > > Err, my bad, sorry Dan -- and thanks Kyle for the warning. > > (I too hastily assume 1 thread = 1 topic, I should have checked.) > > I reverted my changes and pushed Dan's commit to master. > > I took the liberty of inlining the function and making the message a > bit more explicit. Dan, let me know if that's okay. > > Interestingly, our (different and complementary) implementations may > lead to a new idea: your implementation is like the `k' option while > mine is like the `g' option (when you "got back"). I guess both can > make sense, and what the user expect is to be able to enter a number > of minutes *or* a HH:MM time spec in both `t' and `g'. > > That would also have the advantage of having less options while still > having the possibility to use HH:MM. (Also, using org-read-date here > seems a bit too much here, but maybe that's okay.) > > Dan, what do you think? Would you like to try implementing this or > can I give it a try? > > Thanks, > > -- > Bastien > -- Ceci n'est pas une .signature.
Re: specify time of day for org-resolve-clocks, not number of minutes
Hi Kyle and Dan, Kyle Meyer writes: > Thanks, though sadly Dan had already taken the time to follow up with a > patch: > > https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00175.html Err, my bad, sorry Dan -- and thanks Kyle for the warning. (I too hastily assume 1 thread = 1 topic, I should have checked.) I reverted my changes and pushed Dan's commit to master. I took the liberty of inlining the function and making the message a bit more explicit. Dan, let me know if that's okay. Interestingly, our (different and complementary) implementations may lead to a new idea: your implementation is like the `k' option while mine is like the `g' option (when you "got back"). I guess both can make sense, and what the user expect is to be able to enter a number of minutes *or* a HH:MM time spec in both `t' and `g'. That would also have the advantage of having less options while still having the possibility to use HH:MM. (Also, using org-read-date here seems a bit too much here, but maybe that's okay.) Dan, what do you think? Would you like to try implementing this or can I give it a try? Thanks, -- Bastien
Re: specify time of day for org-resolve-clocks, not number of minutes
Hi Bastien, Bastien writes: > good idea -- please test from latest master branch, you can now use > `t' and `T' as you suggested. Thanks, though sadly Dan had already taken the time to follow up with a patch: https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00175.html
Re: specify time of day for org-resolve-clocks, not number of minutes
Hi Dan, Dan Drake writes: > I posted a question on emacs.stackexchange: https:// > emacs.stackexchange.com/questions/54445/ > specify-time-of-day-for-org-resolve-clocks-not-number-of-minutes good idea -- please test from latest master branch, you can now use `t' and `T' as you suggested. -- Bastien
Re: specify time of day for org-resolve-clocks, not number of minutes
Hello, Dan Drake writes: > Instead, I want to specify a *time*, since usually that's what I remember > ("my coworker stopped to ask a question at 10:45"). I'd like a way to get > the K functionality, but instead of doing the math to figure out a number > of minutes, I want to just type in a time of day. > > Is there a way to do this already? I don't think so. > Or would this require a new clock resolution command -- perhaps "t", > for "time": it would effectively just be a wrapper around "k" that > parses the provided time, looks at the current clocked-in task, > computes the appropriate number of minutes, and then just does > whatever "k" (or "K") does. This is a good idea. It might be useful to provide a date somehow, e.g., if you want to rewind to yesterday at 11:00pm. I'm not sure what a good interface would be, though. `org-read-date' is pretty much future oriented. WDYT? Regards, -- Nicolas Goaziou
specify time of day for org-resolve-clocks, not number of minutes
Hello, I posted a question on emacs.stackexchange: https://emacs.stackexchange.com/questions/54445/specify-time-of-day-for-org-resolve-clocks-not-number-of-minutes ...about using a time of day when using org-resolve clocks, but didn't get an answer. Here's my question; perhaps this more targeted group can help: I can use org-resolve-clocks if I've been away from a task but kept the clock for the task running -- but when I do that and select K ("keeps however many minutes you request and then immediately clock out of that task."), I have to specify a number of *minutes*. Instead, I want to specify a *time*, since usually that's what I remember ("my coworker stopped to ask a question at 10:45"). I'd like a way to get the K functionality, but instead of doing the math to figure out a number of minutes, I want to just type in a time of day. Is there a way to do this already? Or would this require a new clock resolution command -- perhaps "t", for "time": it would effectively just be a wrapper around "k" that parses the provided time, looks at the current clocked-in task, computes the appropriate number of minutes, and then just does whatever "k" (or "K") does. Thanks! -- Ceci n'est pas une .signature.