From 14cb05e0fa3d474ec6051cc3b5d67de186977f90 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Fri, 13 May 2022 09:47:31 -0700 Subject: [PATCH] Convert to use thread-last While the ->> is nice, perhaps defaulting to emacs-builtin functions is a better idea in general. Besides, it is clearer. --- ha-programming-elisp.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ha-programming-elisp.org b/ha-programming-elisp.org index d871f19..b5b9f49 100644 --- a/ha-programming-elisp.org +++ b/ha-programming-elisp.org @@ -68,15 +68,15 @@ I love packages that add functionality but I don’t have to learn anything. How (ignore-errors (let* ((default-directory (projectile-project-root)) (command (format "rg --json '\\(def[^ ]+ %s ' *.org" str)) - (results (->> command + (results (thread-last command shell-command-to-list second json-parse-string)) - (file (->> results + (file (thread-last results (gethash "data") (gethash "path") (gethash "text"))) - (line (->> results + (line (thread-last results (gethash "data") (gethash "line_number")))) (find-file file)