GNU bug report logs - #75986
[PATCH] gnu: Add emacs-khardel.

Previous Next

Package: guix-patches;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Sat, 1 Feb 2025 07:03:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 75986 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#75986; Package guix-patches. (Sat, 01 Feb 2025 07:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konrad Hinsen <konrad.hinsen <at> fastmail.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 01 Feb 2025 07:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add emacs-khardel.
Date: Sat, 01 Feb 2025 08:02:06 +0100
* gnu/packages/emacs-xyz.scm (emacs-khardel): New variable.

Change-Id: I74093cc2cade2330f9981b88e7bb6f8b030d1c85
---
 gnu/packages/emacs-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 153785e017..6a2e0c8129 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6773,6 +6773,39 @@ (define-public emacs-keyfreq
 a command.")
     (license license:gpl3+)))
 
+(define-public emacs-khardel
+  (package
+   (name "emacs-khardel")
+   (version "20231126.1502")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/DamienCassou/khardel.git")
+           (commit "205e374b36252183a146a7a8f857bcf95a77edc3")))
+     (file-name (git-file-name name version))
+     (sha256
+      (base32 "0gqijnmj24phryi6n74iq410k0637j0li1ncdymxhk3bdmp4mb40"))))
+   (build-system emacs-build-system)
+   (inputs
+    (list khard))
+   (propagated-inputs
+    (list emacs-yaml-mode))
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'fix-path
+          (lambda _
+            (substitute* "khardel.el"
+                         (("\\(executable-find \"khard\"\\)")
+                          (string-append "\"" (which "khard") "\""))))))))
+   (home-page "https://github.com/DamienCassou/khardel")
+   (synopsis "Emacs interface to khard")
+   (description
+    "Emacs integrate with khard, a console carddav application to search and
+edit contacts in carddav/vcard format.")
+   (license license:gpl3+)))
+
 (define-public emacs-ligature
   (let ((commit "3d1460470736777fd8329e4bb4ac359bf4f1460a")
         (revision "1"))

base-commit: d48da2d21610f9cf5f76cd846703b12beedb1fd5
-- 
2.48.1




Information forwarded to guix-patches <at> gnu.org:
bug#75986; Package guix-patches. (Sat, 01 Feb 2025 09:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 75986 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 75986 <at> debbugs.gnu.org
Subject: Re: [bug#75986] [PATCH] gnu: Add emacs-khardel.
Date: Sat, 01 Feb 2025 10:03:48 +0100
Hello,

Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

> * gnu/packages/emacs-xyz.scm (emacs-khardel): New variable.

Thank you. Some comments follow.

> +   (version "20231126.1502")
> +   (source
> +    (origin
> +     (method git-fetch)
> +     (uri (git-reference
> +           (url "https://github.com/DamienCassou/khardel.git")

You can drop the ".git" suffix.

> +           (commit "205e374b36252183a146a7a8f857bcf95a77edc3")))

Version is wrong: it should be "2.0.0". You do not need to provide a raw
commit hash either, the "v2.0.0" tag will be fine.

> +     (file-name (git-file-name name version))
> +     (sha256
> +      (base32 "0gqijnmj24phryi6n74iq410k0637j0li1ncdymxhk3bdmp4mb40"))))
> +   (build-system emacs-build-system)
> +   (inputs
> +    (list khard))
> +   (propagated-inputs
> +    (list emacs-yaml-mode))
> +   (arguments
> +    `(#:phases
> +      (modify-phases %standard-phases
> +        (add-after 'unpack 'fix-path
> +          (lambda _
> +            (substitute* "khardel.el"
> +                         (("\\(executable-find \"khard\"\\)")
> +                          (string-append "\"" (which "khard")
> "\""))))))))

I think using `search-input-file' is more elegant than relying on
`which'. Also, the latter may return unpredictable results if "khard"
was already on $PATH.

> +   (home-page "https://github.com/DamienCassou/khardel")
> +   (synopsis "Emacs interface to khard")

Nitpick: khard -> Khard

> +   (description
> +    "Emacs integrate with khard, a console carddav application to search and
> +edit contacts in carddav/vcard format.")

"Khardel provides an Emacs integration with Khard…"

also,

in carddav/vcard-> vCard format

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou






Information forwarded to guix-patches <at> gnu.org:
bug#75986; Package guix-patches. (Sat, 01 Feb 2025 09:10:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Nicolas Goaziou via Guix-patches via <guix-patches <at> gnu.org>
Cc: 75986 <at> debbugs.gnu.org, Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Subject: Re: [bug#75986] [PATCH] gnu: Add emacs-khardel.
Date: Sat, 01 Feb 2025 10:09:06 +0100
Nicolas Goaziou via Guix-patches via <guix-patches <at> gnu.org> writes:

>> +        (add-after 'unpack 'fix-path
>> +          (lambda _
>> +            (substitute* "khardel.el"
>> +                         (("\\(executable-find \"khard\"\\)")
>> +                          (string-append "\"" (which "khard")
>> "\""))))))))

Also, you could use `emacs-substitute-variables' above.






Information forwarded to guix-patches <at> gnu.org:
bug#75986; Package guix-patches. (Sat, 01 Feb 2025 09:10:02 GMT) Full text and rfc822 format available.

This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.