Subject: Re: bug#79283: 30.1; [ELPA] compile error when installing iso-date-1.0.3

From: Philip Kaludercic <[email-masked]>
Date: Thu, 21 Aug 2025 19:59:24 +0000

Lucas Quintana via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>
>> I have added the maintainer to the CC's to see what they think of
>> the issue.
>
> Thank you.  I just pushed a fix.  If it builds cleanly, I'll bump the
> version number later.

For the convenience of the list, this is the change:

--8<---------------cut here---------------start------------->8---
>From 83e9386ecab1bbb48d37e68f6b74dce8cd9302d0 Mon Sep 17 00:00:00 2001
From: Lucas Quintana <[email-masked]>
Date: Thu, 21 Aug 2025 10:28:08 -0300
Subject: [PATCH] Fix package installation when embark is not available

---
 embark-iso-date.el | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/embark-iso-date.el b/embark-iso-date.el
index 64ec910..d565ba6 100644
--- a/embark-iso-date.el
+++ b/embark-iso-date.el
@@ -21,27 +21,27 @@
 
 ;;; Code:
 
-(require 'embark)
+(require 'embark nil t)
 (require 'iso-date)
 
-(embark-define-thingatpt-target iso-date)
-
-(defvar-keymap embark-iso-date-map
-  :parent embark-general-map
-  "RET" #'iso-date-show-calendar
-  "a" #'iso-date-show-org-agenda
-  "c" #'iso-date-show-calendar
-  "d" #'iso-date-show-diary
-  "f" #'iso-date-echo-difference
-  "p" #'iso-date-pretty-print
-  "x" #'iso-date-send-to-calc
-  "<up>" #'iso-date-at-point-day-up
-  "<down>" #'iso-date-at-point-day-down)
-
-(add-to-list 'embark-repeat-actions 'iso-date-at-point-day-up)
-(add-to-list 'embark-repeat-actions 'iso-date-at-point-day-down)
-(add-to-list 'embark-target-finders 'embark-target-iso-date-at-point)
-(add-to-list 'embark-keymap-alist '(iso-date embark-iso-date-map))
+(with-no-warnings
+  (with-eval-after-load 'embark
+    (embark-define-thingatpt-target iso-date)
+    (defvar-keymap embark-iso-date-map
+      :parent embark-general-map
+      "RET" #'iso-date-show-calendar
+      "a" #'iso-date-show-org-agenda
+      "c" #'iso-date-show-calendar
+      "d" #'iso-date-show-diary
+      "f" #'iso-date-echo-difference
+      "p" #'iso-date-pretty-print
+      "x" #'iso-date-send-to-calc
+      "<up>" #'iso-date-at-point-day-up
+      "<down>" #'iso-date-at-point-day-down)
+    (add-to-list 'embark-repeat-actions 'iso-date-at-point-day-up)
+    (add-to-list 'embark-repeat-actions 'iso-date-at-point-day-down)
+    (add-to-list 'embark-target-finders 'embark-target-iso-date-at-point)
+    (add-to-list 'embark-keymap-alist '(iso-date embark-iso-date-map))))
 
 (provide 'embark-iso-date)
 ;;; embark-iso-date.el ends here
--8<---------------cut here---------------end--------------->8---

I think that it is regrettable to revert to this "hack", but it seems
that there is no way around it if we want to distribute both in the same
package (which I think is preferable overall).

<
> Best regards.