From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Rostislav Svoboda <rostislav.svoboda@gmail.com>
Cc: 66562@debbugs.gnu.org
Subject: [bug#66562] [PATCH v3] gnu: emacs-haskell-snippets: Use correct directory for snippets.
Date: Mon, 16 Oct 2023 18:57:56 +0200 [thread overview]
Message-ID: <17cd7d2255c7e3e1efb1fb83fc4c0cc84c0c127e.camel@gmail.com> (raw)
In-Reply-To: <CAEtmmex913M9r=SQ2eocdO-2Qy3TqLJ42ndwAWkNrN98ZKijug@mail.gmail.com>
Am Montag, dem 16.10.2023 um 12:57 +0200 schrieb Rostislav Svoboda:
> Hi Liliana,
>
> Your patch works (thank you) and I improved it a tiny bit. (See
> attachment.) BTW shouldn't the revision number in the (git-version
> "0.1.0" "1" commit) be increased to "2" in your patch and to "3" in
> mine?
No. It should just be one patch anyway and the change doesn't affect
the source code, but the build recipe. As such, the rebuild is going
to happen either way.
> DRY in the specification of the relative path of the snippets
> directory.
You can just amend my commit.
> - (let ((snippets
> - (string-append
> - (elpa-directory (assoc-ref outputs "out"))
> - "/snippets/haskell-mode")))
> - (mkdir-p snippets)
> - (copy-recursively "snippets/haskell-mode"
> snippets)))))))
> + (let* ((relative-dirpath "snippets/haskell-mode")
> + (installation-dir
> + (string-append (elpa-directory (assoc-ref
> outputs "out"))
> + "/" relative-dirpath)))
> + (mkdir-p installation-dir)
> + (copy-recursively relative-dirpath installation-
> dir)))))))
Now you repeat yourself on relative-dirpath (which is a very Java name
anyway, just five characters shorter than the original value won't win
you Kolmogorov complexity). Plus you're requiring let* instead of let.
Btw. don't
((compose
(lambda (src dst) (mkdir-p src) (copy-recursively dst src))
(lambda (dir store) (values dir (string-append store "/" dir)))
"snippets/haskell-mode" (elpa-directory (assoc-ref outputs "out")))
to avoid gratuitous repetition.
Sometimes explicit is better than implicit, even if it comes at the
cost of typing a constant twice :)
Cheers
next prev parent reply other threads:[~2023-10-16 16:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-15 15:17 [bug#66562] [PATCH] gnu: emacs-haskell-snippets: Fix haskell-snippets-dir value Rostislav Svoboda
2023-10-15 16:01 ` Liliana Marie Prikler
2023-10-15 17:21 ` Rostislav Svoboda
2023-10-15 18:25 ` [bug#66562] [PATCH v3] gnu: emacs-haskell-snippets: Use correct directory for snippets Liliana Marie Prikler
2023-10-16 10:57 ` Rostislav Svoboda
2023-10-16 16:57 ` Liliana Marie Prikler [this message]
2023-10-17 16:49 ` Rostislav Svoboda
2023-10-17 17:29 ` Liliana Marie Prikler
2023-10-18 8:54 ` Rostislav Svoboda
2023-10-18 21:58 ` Liliana Marie Prikler
2023-10-23 7:58 ` bug#66562: " Liliana Marie Prikler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17cd7d2255c7e3e1efb1fb83fc4c0cc84c0c127e.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=66562@debbugs.gnu.org \
--cc=rostislav.svoboda@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.