emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: TEC <tecosaur@gmail.com>
Cc: Bastien <bzg@gnu.org>, org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-plot abstractions and extension
Date: Wed, 23 Dec 2020 07:14:31 GMT	[thread overview]
Message-ID: <87czz1gfje.fsf@kyleam.com> (raw)
In-Reply-To: <87y2hpt568.fsf@gmail.com>

> Subject: [PATCH] org-plot.el: fix compiler warnings
>
> * (org--plot/values-stats): Replace `log10' with `log'.
> (org--plot/nice-frequency-pick): Replace obsolete `case' with `pcase`.

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.

> (org--plot/radar): Replace `s-join' with `mapconcat', removing the
> implicit dependency on s.el.
> (org-plot/gnuplot-script): Remove unused let bindings.
> (org-plot/gnuplot-script): Replace free variable refence with expression

s/refence/reference/

> @@ -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.

> @@ -473,34 +473,36 @@ EOD
>  
>  (defun org--plot/radar (table params)
>    (let* ((data
> -	  (concat "\"" (s-join "\" \"" (plist-get params :labels)) "\""
> +	  (concat "\"" (mapconcat #'identity (plist-get params :labels) "\" \"") "\""
>  		  "\n"
> -		  (s-join "\n"
> -			  (mapcar (lambda (row)
> -				    (format
> -				     "\"%s\" %s"
> -				     (car row)
> -				     (s-join " " (cdr row))))
> -				  (append table (list (car table)))))))
> +		  (mapconcat #'identity
> +			     (mapcar (lambda (row)
> +				       (format
> +					"\"%s\" %s"
> +					(car row)
> +					(mapconcat #'identity (cdr row) " ")))
> +				     (append table (list (car table))))
> +			     "\n")))

The mapcar is unnecessary; you can reposition (lambda ...) as
mapconcat's FUNCTION argument.

Same comment applies to a spot farther down in the patch.

Thanks.


  reply	other threads:[~2020-12-23  7:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06  5:50 [PATCH] org-plot abstractions and extension TEC
     [not found] ` <87blijmnv9.fsf@gnu.org>
     [not found]   ` <CAHNg_jM8sE4a6XvL5D8Gks4dQXfWhZvRBR33BDLkRgEgZ++ZGg@mail.gmail.com>
2020-09-15  3:43     ` TEC
2020-09-25 17:51       ` TEC
2020-10-17  2:12         ` TEC
2020-10-24 11:31           ` Bastien
2020-10-24 18:16             ` TEC
2020-11-21 11:49               ` ian martins
2020-12-09  2:58               ` TEC
2020-12-10 10:28                 ` Bastien
2020-12-14  5:41               ` Bastien
2020-12-14  6:30                 ` TEC
2020-12-14  6:56                   ` Bastien
2020-12-23  5:09                 ` Kyle Meyer
2020-12-23  5:10                   ` TEC
2020-12-23  6:19                     ` TEC
2020-12-23  7:14                       ` Kyle Meyer [this message]
2020-12-23  8:38                         ` TEC
2020-12-23 16:55                           ` Kyle Meyer
2020-12-23 18:19                             ` TEC
2020-12-24  3:09                               ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czz1gfje.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).