From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#71572: [PATCH] seconds-to-string-approximate Date: Thu, 4 Jul 2024 13:23:09 -0400 Message-ID: <88073600-0BF6-4EA1-9EE4-9455FDF20EAC@gmail.com> References: <86r0cpicwt.fsf@gnu.org> <86msmxafog.fsf@gnu.org> <1FFF1E0D-A0E0-4EB9-AC97-AEB0BFADFBBC@gmail.com> <87plrt9kss.fsf@localhost> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_ABF01B31-9B8B-4AFD-929D-EEBD0DB95AF9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , 71572@debbugs.gnu.org, Eli Zaretskii , jonas@bernoul.li, Paul Eggert To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 04 19:25:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sPQCl-0007WP-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jul 2024 19:25:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPQCc-0008AZ-SL; Thu, 04 Jul 2024 13:25:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPQCa-0008AH-CU for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 13:25:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPQCa-0001nQ-44 for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 13:25:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sPQCb-0008BX-If for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2024 13:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jul 2024 17:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71572 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71572-submit@debbugs.gnu.org id=B71572.172011387231410 (code B ref 71572); Thu, 04 Jul 2024 17:25:01 +0000 Original-Received: (at 71572) by debbugs.gnu.org; 4 Jul 2024 17:24:32 +0000 Original-Received: from localhost ([127.0.0.1]:42900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPQC8-0008AY-DC for submit@debbugs.gnu.org; Thu, 04 Jul 2024 13:24:32 -0400 Original-Received: from mail-qk1-f182.google.com ([209.85.222.182]:47440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPQC5-0008AG-IB for 71572@debbugs.gnu.org; Thu, 04 Jul 2024 13:24:30 -0400 Original-Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-79c06c08149so56456185a.3 for <71572@debbugs.gnu.org>; Thu, 04 Jul 2024 10:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720113801; x=1720718601; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=Z7l9nlKQ2qViTS8FNXne7BF8fAyMEkTEnRoQbzk950M=; b=iXKSA+sZtyS+is4M+ZRzFypz2iRVEnYayF/PcweQMNchy/TgMkHr3O5loKJEI8nO9P 3bcYKUY6iCk2SqEsXHHZ765y6Oot24LYLfeQpj504vwvgONtfpueBDoxVSJNvcOSbVWb xf0Kwl5Sw1J0Rs2dTVUPLJxRw6Wtx61Nu+J6m0w8Fccib2Q8mnQuVuopmaq0QAeAXMsH aoUWFEPn/UXONVQKwHwsFwSsTIXlt/o4YSzMbQOkWNIlQt4wp2Bx+fINC5jzrll4bDeV Oy028g5BDslC6Z4iL4Szx0tkxf6KORQGY/TqYpTNpETxOHXCsyFrFnEFDmBWGz5xIrBW oknQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720113801; x=1720718601; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z7l9nlKQ2qViTS8FNXne7BF8fAyMEkTEnRoQbzk950M=; b=QcDyQVD3xtrVwS6N57+tL8II/vjIFzrr4uZgLJvC6aTYfebzkK8RcdY44CHoiBMql/ JfsB5wU4AChnpXHsnAzOyozXonMQczKvUkpNBrrVIunu/XVN66QgoJH2Zmn6Muv2FOLj XLVwN/dWBImzt0HwJhg2Aw7lYTMt/Ih7TaEkcPFF5G02OV+ahHo3q3jAY3SLZX+1K3V/ UiA/Qz22O6gt3wEq70PUJz1XJAJWE3WmN+A5m6ZG5SNanoGMFzY22SePXAY1SQCeVvEZ 7qOa1BRG/j2W0wFmjqbHpROTj1yiVlTAeuwJqGoMOKyrBZjKj1WfGlPfW4l9RAQr8sdY 0KyQ== X-Forwarded-Encrypted: i=1; AJvYcCXmKplP8OTczJpqfiGrlN6Pw0TLmtCugN3NvWw4KqLSGa9nOuqwbKxPBKSqt3JcDlgN0mCO1EtwR9qurz513SVGOa6geAk= X-Gm-Message-State: AOJu0YwCTjm+aXW+87zdbNwjq0HhVKSVMSN/Sa/TL7uzsMFSWkU5reBN /IPModaiBBOSOwEnUzElwlHbEpd7HwC9E7Ez0MxrfOTuWBM4QfAG X-Google-Smtp-Source: AGHT+IEasKLmvNzJo3PVnIfaQP/3OzxsUWkDyRFFczAxl+oKv/G05+IQwP/J5qZC5HFpZt/xZqYscg== X-Received: by 2002:a05:620a:2492:b0:79d:535f:b799 with SMTP id af79cd13be357-79eee27403fmr294205085a.50.1720113801250; Thu, 04 Jul 2024 10:23:21 -0700 (PDT) Original-Received: from smtpclient.apple (cm-24-53-187-34.buckeyecom.net. [24.53.187.34]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4465149842csm61422071cf.61.2024.07.04.10.23.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2024 10:23:20 -0700 (PDT) In-Reply-To: <87plrt9kss.fsf@localhost> X-Mailer: Apple Mail (2.3774.600.62) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288382 Archived-At: --Apple-Mail=_ABF01B31-9B8B-4AFD-929D-EEBD0DB95AF9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 4, 2024, at 12:36=E2=80=AFPM, Ihor Radchenko = wrote: >=20 > Have you seen `org-duration-from-minutes'? > In Org mode, we have a rather complex (but flexible) system to = customize > the duration format: I had not seen that function, thanks for pointing it out. Looks useful = and rather flexible. Would you be able to re-use the example code I = posted earlier to show how it formats various ages with typical = configuration? For activities (which is the package where the conversation about this = need started), you can have ages from seconds to many years, so you need = something that accommodates that dynamic range well. magit--age was the = inspiration, and we're in fact just reusing Jonas' configuration = variable.= --Apple-Mail=_ABF01B31-9B8B-4AFD-929D-EEBD0DB95AF9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jul 4, 2024, at 12:36=E2=80=AFPM, Ihor Radchenko = <yantar92@posteo.net> wrote:

Have = you seen `org-duration-from-minutes'?
In Org = mode, we have a rather complex (but flexible) system to = customize
the duration = format:

I had not seen that = function, thanks for pointing it out.  Looks useful and rather = flexible.  Would you be able to re-use the example code I posted = earlier to show how it formats various ages with typical = configuration?

For activities (which is the = package where the conversation about this need started), you can have = ages from seconds to many years, so you need something that accommodates = that dynamic range well.  magit--age was the inspiration, and we're = in fact just reusing Jonas' configuration variable.
= --Apple-Mail=_ABF01B31-9B8B-4AFD-929D-EEBD0DB95AF9--