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