From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Drake Subject: specify time of day for org-resolve-clocks, not number of minutes Date: Fri, 3 Jan 2020 09:05:26 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000072b52d059b3da486" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43213) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inOWE-0001XV-0T for emacs-orgmode@gnu.org; Fri, 03 Jan 2020 10:05:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inOWC-00021h-Lu for emacs-orgmode@gnu.org; Fri, 03 Jan 2020 10:05:41 -0500 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:39437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inOWC-0001rw-Cz for emacs-orgmode@gnu.org; Fri, 03 Jan 2020 10:05:40 -0500 Received: by mail-io1-xd34.google.com with SMTP id c16so11742166ioh.6 for ; Fri, 03 Jan 2020 07:05:39 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --00000000000072b52d059b3da486 Content-Type: text/plain; charset="UTF-8" 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. --00000000000072b52d059b3da486 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,


...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 tas= k."), I have to specify a number of *minutes*.

Instead, I want = to specify a *time*, since usually that's what I remember ("my cow= orker 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 o= f 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 resolutio= n command -- perhaps "t", for "time": it would effectiv= ely just be a wrapper around "k" that parses the provided time, l= ooks at the current clocked-in task, computes the appropriate number of min= utes, and then just does whatever "k" (or "K") does.

Thanks!

--
Ceci n'est pas = une .signature.
--00000000000072b52d059b3da486-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Tue, 07 Jan 2020 09:17:44 +0100 Message-ID: <87k163sms7.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58732) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iok3i-0000Tk-6b for emacs-orgmode@gnu.org; Tue, 07 Jan 2020 03:17:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iok3g-00055c-O5 for emacs-orgmode@gnu.org; Tue, 07 Jan 2020 03:17:49 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:35765) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iok3g-00053e-Gf for emacs-orgmode@gnu.org; Tue, 07 Jan 2020 03:17:48 -0500 In-Reply-To: (Dan Drake's message of "Fri, 3 Jan 2020 09:05:26 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Dan Drake Cc: emacs-orgmode@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Thu, 13 Feb 2020 01:31:29 +0100 Message-ID: <87wo8r5nvi.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38197) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j22Pp-00087x-CF for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 19:31:38 -0500 In-Reply-To: (Dan Drake's message of "Fri, 3 Jan 2020 09:05:26 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Dan Drake Cc: emacs-orgmode@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Thu, 13 Feb 2020 01:40:36 +0000 Message-ID: <877e0ri7sb.fsf@kyleam.com> References: <87wo8r5nvi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j23Uj-0002kC-MT for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 20:40:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j23Uh-0003P8-2f for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 20:40:43 -0500 In-Reply-To: <87wo8r5nvi.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien , Dan Drake Cc: emacs-orgmode@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Thu, 13 Feb 2020 08:16:18 +0100 Message-ID: <87imkbez3x.fsf@bzg.fr> References: <87wo8r5nvi.fsf@gnu.org> <877e0ri7sb.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:54443) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j28jk-00051Z-HX for emacs-orgmode@gnu.org; Thu, 13 Feb 2020 02:16:37 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Kyle Meyer Cc: Dan Drake , emacs-orgmode@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Drake Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Thu, 13 Feb 2020 08:02:23 -0600 Message-ID: References: <87wo8r5nvi.fsf@gnu.org> <877e0ri7sb.fsf@kyleam.com> <87imkbez3x.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000075241a059e758aff" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52938) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2F4l-00057F-No for emacs-orgmode@gnu.org; Thu, 13 Feb 2020 09:02:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2F4k-0008Mh-DZ for emacs-orgmode@gnu.org; Thu, 13 Feb 2020 09:02:43 -0500 In-Reply-To: <87imkbez3x.fsf@bzg.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode@gnu.org --00000000000075241a059e758aff Content-Type: text/plain; charset="UTF-8" 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. --00000000000075241a059e758aff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I like the idea of using g/G and intelligently interp= reting the user's response -- it's good UI / UX design. (Imagine as= king a friend when they "got back" -- both "20 minutes ago&q= uot; and "8:35" are unambiguous answers to the question.)

Now we need to decide how to distinguish the two. Would i= t 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 <bzg@gnu.org> wrote= :
Hi Kyle and Da= n,

Kyle Meyer <kyle@ky= leam.com> writes:

> Thanks, though sadly Dan had already taken the time to follow up with = a
> patch:
>
>=C2=A0 =C2=A0https://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 =3D 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.=C2=A0 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").=C2=A0 I gu= ess 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.=C2=A0 (Also, using org-read-date here<= br> seems a bit too much here, but maybe that's okay.)

Dan, what do you think?=C2=A0 Would you like to try implementing this or can I give it a try?

Thanks,

--
=C2=A0Bastien


--
Ceci n'est pas une .signature.
--00000000000075241a059e758aff-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: specify time of day for org-resolve-clocks, not number of minutes Date: Thu, 13 Feb 2020 15:53:53 +0100 Message-ID: <87blq2bkse.fsf@gnu.org> References: <87wo8r5nvi.fsf@gnu.org> <877e0ri7sb.fsf@kyleam.com> <87imkbez3x.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34059) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2FsK-0002VD-JO for emacs-orgmode@gnu.org; Thu, 13 Feb 2020 09:53:57 -0500 In-Reply-To: (Dan Drake's message of "Thu, 13 Feb 2020 08:02:23 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Dan Drake Cc: emacs-orgmode@gnu.org 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