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 MKcrL403vF+VSwAA0tVLHw (envelope-from ) for ; Mon, 23 Nov 2020 22:28:29 +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 EGgCK403vF+IJAAA1q6Kng (envelope-from ) for ; Mon, 23 Nov 2020 22:28:29 +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 439EA9403CA for ; Mon, 23 Nov 2020 22:28:29 +0000 (UTC) Received: from localhost ([::1]:33542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khKJw-0007Dh-89 for larch@yhetil.org; Mon, 23 Nov 2020 17:28:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khKIl-0007CP-A8 for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 17:27:16 -0500 Received: from pb-smtp1.pobox.com ([64.147.108.70]:51778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khKIj-0003Bs-9o for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 17:27:14 -0500 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 7ADA28D7BE; Mon, 23 Nov 2020 17:27:12 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=UB1A8nm4Y5WD6RDLTq/b+WSxyRA=; b=mAjelZ f5nOgwbrlWBNtCYRyInncqvP8RAnjh08CAOT9X78ldH948wATX2hK2ihA0sa7elL TDdEPBCClXl9IAQVIcENqMMaFQVufFzLiJ8w5YP6yYav/dyuv+HBT8SyuDtfc6Dx bBR4NTFN1lnpHJq/k+CC6lexU6Fxrk6yGzDf4= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 7300E8D7BD; Mon, 23 Nov 2020 17:27:12 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=cjCfpGLk5pSYEGHrMeud/qaJAIwuVbZ5HD945hcS8+I=; b=Ub3eyBxCLEMnG+x/9DTvX9LIrgErxZRUMG53+djVwmild4onJAxidvNKJxdQhCDSM/FDQdeREe1gKnk8q8r0+kwEh8vp48lNyJojiHQcQnlt2yF6CyIA4i6GWSt/8Mhxd/eduryWVmswIq5VfZDmJIqwIg/+U1Cw4a2SgZ9Phjs= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id DF6E88D7BC; Mon, 23 Nov 2020 17:27:11 -0500 (EST) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Daniele Nicolodi Subject: Re: [PATCH] org-table: Add mode flag to enable Calc units simplification mode In-Reply-To: <938fa4a5-f162-6c03-072b-4f11546a95c8@grinta.net> References: <48c15b01-341d-f4c6-7086-1a39e4977868@grinta.net> <87h7pgvk6b.fsf@kyleam.com> <938fa4a5-f162-6c03-072b-4f11546a95c8@grinta.net> Date: Mon, 23 Nov 2020 17:27:11 -0500 Message-ID: <87blfnso8w.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 07F1B1B4-2DDB-11EB-9397-D152C8D8090B-24757444!pb-smtp1.pobox.com Received-SPF: pass client-ip=64.147.108.70; envelope-from=kyle@kyleam.com; helo=pb-smtp1.pobox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, 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: Org Mode List Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=mAjelZ f; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=Ub3eyBxC; dmarc=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: -1.21 X-TUID: CXxiddIpFN5D Daniele Nicolodi writes: > On 23/11/2020 04:14, Kyle Meyer wrote: >> Daniele Nicolodi writes: [...] >>> diff --git a/lisp/org-table.el b/lisp/org-table.el >>> index 4baad2600..6b92656bd 100644 >>> --- a/lisp/org-table.el >>> +++ b/lisp/org-table.el >>> @@ -2447,11 +2447,12 @@ location of point." >>> (?e (org-table--set-calc-mode 'calc-float-format (list 'eng n))))) >>> ;; Remove matched flags from the mode string. >>> (setq fmt (replace-match "" t t fmt))) >>> - (while (string-match "\\([tTUNLEDRFS]\\)" fmt) >>> + (while (string-match "\\([tuTUNLEDRFS]\\)" fmt) >>> (let ((c (string-to-char (match-string 1 fmt)))) >>> (cl-case c >>> (?t (setq duration t numbers t >>> duration-output-format org-table-duration-custom-format)) >>> + (?u (org-table--set-calc-mode 'calc-simplify-mode 'units)) >>> (?T (setq duration t numbers t duration-output-format nil)) >>> (?U (setq duration t numbers t duration-output-format 'hh:mm)) >>> (?N (setq numbers t)) >> >> A nit-pick about ordering: I think it'd be better to not nestle "u" in >> between "t" and "T" because it invites the reader to incorrectly assume >> that "u" is somehow connected to "t", "T", and "U". >> >> You already mentioned that you plan to add documentation. It'd also be >> good to add a test to test-org-table.el and a NEWS entry. > > I thought alphabetical ordering was the most natural. Which other > ordering would make sense? I'd be more likely to agree that alphabetical is the most natural if the list was already alphabetical, but instead it's grouped by "topic" (or something :). So I'd say just tacking u onto the end. But I also don't feel strongly about that, so I'm okay if you stick with the current order.