From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4CopHDpKfF8fSgAA0tVLHw (envelope-from ) for ; Tue, 06 Oct 2020 10:43:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6CURGDpKfF/ySAAA1q6Kng (envelope-from ) for ; Tue, 06 Oct 2020 10:43:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3FA9B94042A for ; Tue, 6 Oct 2020 10:42:58 +0000 (UTC) Received: from localhost ([::1]:40666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPkQp-0001Lv-Q8 for larch@yhetil.org; Tue, 06 Oct 2020 06:42:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPkQM-0001Jv-N6 for emacs-orgmode@gnu.org; Tue, 06 Oct 2020 06:42:26 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:35376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPkQK-0001V7-UK; Tue, 06 Oct 2020 06:42:26 -0400 Received: by mail-pg1-x52b.google.com with SMTP id g29so7775677pgl.2; Tue, 06 Oct 2020 03:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=i3I9aRlBxppDO8HMd6Vx81w6I0G2oJRP4Ze3PNnSs+c=; b=H2i/os7tizHSzGZxI2B6EMDoHS0nzy2F6R+OY5eDxG70exGIsi1fXOzks7CLrrIedo iwoaaMScApjAY/AlX0bC2KWNZU1QnthlRWJSFtpqrqNCi7tbhP6SyYQi0DSDnD7x20Vj VMwIwVrarjKh8ulOHpPBmKffUJvyKong/SH+iMdqroJ2i65NoPjqnbrMJQZuyzMZ/26G v9xpoYWhOnGPVw+D2/xqjps6JA8xFdXXaGPRP35uaU1iNYTYWIgfpLtkfbZfyJ6wxv7B ZfUJ3vd3DAX2EbOLt+D10Gue/IKsQ9PsNXN7BBoTcCmoXu9Ql8LSG/k4IFDMw5Ap5QCP 9RrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=i3I9aRlBxppDO8HMd6Vx81w6I0G2oJRP4Ze3PNnSs+c=; b=R5/dKsh2uAP/eE4mX2mXKzp4KBsDEi2+D5Ovx3ds+NtcjkufFo59Y7mqdb371PHOEx jrbtz9VG+e16QBqGphFOWwxY45fn5+kj92N12Jib2iCwDBHvRiMSm/o0KF11JIj03SX4 9035u2adAXUl/1n9aROT3NwNbenfjGk2tjap/Q+O0Bfgtc4rbp0v3uEDsKr7xBdtT7TW sG9k3zUa8nzYrWlWjW8PXbkQMj/qdqixQbb9r8oVxSjF8oaZO2900wwvtstIyPWuYt7k OpgCe/LOOdFTCoERZOSOiH7ddx/IHwohNrBJGoMolcyDXzg5gUUZpm5WXXSVthmhpnQT QFEA== X-Gm-Message-State: AOAM530NcW5PgB4SV3/SM2v+31ZhYfw8tqBPoi15YRPUay8LaNXEPXbM P9BGhnSkHIeko0RfBqb7OCg+415VN58= X-Google-Smtp-Source: ABdhPJwijzdGU0trrSE18/gQCasTD70/aY7MAS3o7SHn/mmkafdsq/gopm2Fua+XRObt/Xbuc2zK2g== X-Received: by 2002:a62:8c88:0:b029:13e:d13d:a08b with SMTP id m130-20020a628c880000b029013ed13da08bmr3975930pfd.34.1601980941532; Tue, 06 Oct 2020 03:42:21 -0700 (PDT) Received: from gusbrs-laptop ([91.207.175.213]) by smtp.gmail.com with ESMTPSA id 84sm2520179pfx.120.2020.10.06.03.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2020 03:42:19 -0700 (PDT) References: <875zcpqxnq.fsf@gmail.com> <87a71lacw6.fsf@bzg.fr> <87a71kqojx.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Gustavo Barros To: Bastien Subject: Re: A small idea to simplify (further) time input in the date/time prompt In-reply-to: <87a71kqojx.fsf@gmail.com> Message-ID: <87sgarskje.fsf@gmail.com> Date: Tue, 06 Oct 2020 07:42:13 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=gusbrs.2016@gmail.com; helo=mail-pg1-x52b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=H2i/os7t; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 2.89 X-TUID: EWBOryteuoUS Hi All, Hi Bastien, if I may kindly bump this patch for review. Best regards, Gustavo. On Wed, 03 Jun 2020 at 10:14, Gustavo Barros wrote: > Hi Bastien, > > On Tue, Jun 02 2020, Bastien wrote: > >> Hi Gustavo, >> >> I like this idea, thanks for proposing it. We are in feature freeze >> for core features, so we have time to work on this for Org 9.5. >> > > [...] > >> Would you agree? Would you like to work on this change? > > Well, I did give it a shot. And, as it turns out, this might be > manageable within my limitations. > > A preliminary patch is attached, for comments. > > I took here the stance of following the same treatment which is given > to > am/pm times, and of using the letter "h" as sole main identifier. In > particular, standard "HH:MM" times take precedence, as is the case for > am/pm times. And duration specification with numbers only are > presumed > to be hours, which was already the case, the patch does not introduce > any changes here. The input will match for this format for "number h > 2-digit-number", where either the hour or the minutes, but not both, > can > be omitted and, if so, is presumed to be zero. 24h format is also > presumed. > > With it, some example inputs/outputs for time in the date/time prompt: > > | input | output | > |-----------+-------------| > | 9h | 09:00 | > | h45 | 00:45 | > | 21h | 21:00 | > | 9h-10h | 09:00-10:00 | > | 9h--10h30 | 09:00-10:30 | > | 18h30+h30 | 18:30-19:00 | > | 18h30+1 | 18:30-19:30 | > | 18h30+1h | 18:30-19:30 | > > And some sanity checks: > > | input | output | Observation > | > |-----------+----------------------+-------------------------------------------| > | 10:00 9h | 10:00 | by design, as for am/pm times > | > | 10am 9h | 10:00 | expected from coming after am/pm > handling | > | 10:00-11h | 10:00-11:00 | > | > | 10h-11:00 | no match | am/pm also does not match here > | > | +9h | no match | > | > | -9h | no match | > | > | h | no match | > | > | 10h+h | no match | > | > | h5 | no match | > | > | 10h70 | no match | > | > | 29h | 2020-06-04 Thu 05:00 | makes sense, same as for 29:00 > | > | 30h | no match | as per the regexp > | > > WDYT? > > Best, > Gustavo.