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.
This commit is contained in:
parent
db2d27b66c
commit
14cb05e0fa
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue