From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id S67nKdR241+6CQAA0tVLHw (envelope-from ) for ; Wed, 23 Dec 2020 16:56:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4CZHJdR241+bRQAAbx9fmQ (envelope-from ) for ; Wed, 23 Dec 2020 16:56:52 +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 940049401BF for ; Wed, 23 Dec 2020 16:56:51 +0000 (UTC) Received: from localhost ([::1]:35126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks7RS-0001bc-AK for larch@yhetil.org; Wed, 23 Dec 2020 11:56:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks7Qc-0001ZU-Uj for emacs-orgmode@gnu.org; Wed, 23 Dec 2020 11:55:58 -0500 Received: from out0.migadu.com ([94.23.1.103]:5220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks7QZ-0007nI-Pn; Wed, 23 Dec 2020 11:55:58 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1608742550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Lehk0VbG8eFlGDTI2eQVEGJaMhsqRDEcnZeZcbP1LW8=; b=D6l8BRWr/NTb4Xj8M42E/RY+ba9zhTFDhWQGqAvBBWUR1EJK38VgXZgiBMOp8cOg6goEow MBi5JxVFhbFDve9nwf5ObbeWNGaM0QBrvsfieiakm+omvOq6oX1Z8NWv5ORJMtv5Yb9ouU M7pSrfhPiVmcHkqcI/3W0Qz2VuJxoLXQa1c/cgrZU2ZsUZz6q7E0DHKj0bhsQjL94jo5mC KEl/wpkCUCKduyasuAoXM8X9bxqvNXlRszTxg6gPGkXuIzYM1pe2zjtAqIEE9ZRsp+7muc hWHNJua4Mshrx05ypmBhzPrTU64UuLT8KfkXiKQ5uj+McaXN+QqSvpgyigmWHw== From: Kyle Meyer To: TEC Subject: Re: [PATCH] org-plot abstractions and extension In-Reply-To: <87wnx8ud5k.fsf@gmail.com> References: <87imcrfntf.fsf@gmail.com> <87blijmnv9.fsf@gnu.org> <87lfhbhfhe.fsf@gmail.com> <87r1qp3fu1.fsf@gmail.com> <871rhxd2ib.fsf@gmail.com> <87r1pnoo5y.fsf@bzg.fr> <87lffv8oy5.fsf@gmail.com> <87zh2hosex.fsf@bzg.fr> <87im8tglbl.fsf@kyleam.com> <87zh25t8cj.fsf@gmail.com> <87y2hpt568.fsf@gmail.com> <87czz1gfje.fsf@kyleam.com> <87wnx8ud5k.fsf@gmail.com> Message-ID: <871rfgh36z.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Wed, 23 Dec 2020 16:55:50 GMT Received-SPF: pass client-ip=94.23.1.103; envelope-from=kyle@kyleam.com; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Bastien , org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=kyleam.com header.s=key1 header.b=D6l8BRWr; 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-Migadu-Queue-Id: 940049401BF X-Spam-Score: -1.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: mZlHEvPBcDwU TEC writes: > Kyle Meyer writes: > >> case is still available under the cl- prefix. If you wanted to use it >> in 73c99bf42 (org-plot.el: add utility functions for range,ticks), I >> don't see a reason not to use it now. > > I tend to use pcase over cl-case (since it's completely built in, i.e. > no (require 'cl-lib) required). Regardless of what you tend to use, you used "case" here in 73c99bf42; the minimal fix is to add a cl- prefix, and any other switch with the justification that "case is obsolete" is likely to raise a reviewer's eyebrow. cl-case isn't in cl-lib, and there is no need to load anything. > I'm not sure if there's any argument for cl-case over pcase, let me > know if so. It depends on who you ask (and, if you search emacs.devel, you will unsurprisingly see a range of opinions). I like pcase (and pattern matching in general) but think it's overused in simple cases. Here's a recent org-plot example from 8d5122fc5: (when (pcase x ('y t) ('yes t) ('t t)) ...) That could be rewritten as (when (memq x '(y yes t)) ...) As for the "[cl-]case -> pcase" change in this patch, I don't mind either cl-case or pcase here. It was the switch itself that I was commenting on. If you choose to leave it as is, that's fine. >>> @@ -210,9 +210,9 @@ values, namely regarding the range." >>> "From a the values in a TABLE of data, attempt to guess an appropriate number of ticks." >>> (let* ((row-data >>> (mapcar (lambda (row) (org--plot/values-stats >>> - (mapcar #'string-to-number (cdr row)) >>> - hard-min >>> - hard-max)) table)) >>> + (mapcar #'string-to-number (cdr row)) >>> + hard-min >>> + hard-max)) table)) >> >> Please drop this unrelated space change. > > Erm, this isn't unrelated. As the function being called changed length, > the indentation of the arguments is thus also changed. This change is in org--plot/sensible-tick-num. I don't spot any non-whitespace changes there. Git appears to agree with me: $ git show | grep '@@ -210,9' @@ -210,9 +210,9 @@ (defun org--plot/sensible-tick-num (table &optional hard-min hard-max) $ git show -w | grep '@@ -210,9' > Subject: [PATCH] org-plot.el: fix compiler warnings > > * (org--plot/values-stats): Replace `log10' with `log'. Please add a file name ("lisp/org-plot.el") to the start of the changelog entry.