emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hcel 204d78168f 2/2: a tiny bug


From: ELPA Syncer
Subject: [elpa] externals/hcel 204d78168f 2/2: a tiny bug
Date: Thu, 29 Sep 2022 19:57:48 -0400 (EDT)

branch: externals/hcel
commit 204d78168f394904ecbea51d087c7658fc28a9a8
Author: Yuchen Pei <hi@ypei.me>
Commit: Yuchen Pei <hi@ypei.me>

    a tiny bug
---
 hcel-haddorg.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/hcel-haddorg.el b/hcel-haddorg.el
index 09a8026927..a6961ccf9e 100644
--- a/hcel-haddorg.el
+++ b/hcel-haddorg.el
@@ -86,14 +86,16 @@ is in ghc-8.10.1, hcel will attempt to look up in 
ghc-9.2.2.org."
          (expand-file-name (format "%s/%s.org" hcel-haddorg-dir package-id))))
     (cond ((file-exists-p exact-match) exact-match)
           (hcel-haddorg-lax-version
-           (when-let ((files
-                       (sort (directory-files
-                              hcel-haddorg-dir t
-                              (format "^%s\\(-[0-9.]+\\)?\\.org$"
-                                      (car (split-string package-id "-"))))
-                             (lambda (x y)
-                               (string> (file-name-base x)
-                                        (file-name-base y))))))
+           (when-let
+               ((files
+                 (sort (directory-files
+                        hcel-haddorg-dir t
+                        (format "^%s\\(-[0-9.]+\\)?\\.org$"
+                                (alist-get
+                                 'name (hcel-parse-package-id package-id 
"-"))))
+                       (lambda (x y)
+                         (string> (file-name-base x)
+                                  (file-name-base y))))))
              (message
               "Cannot find org file for %s, opening instead that of the 
highest available version %s."
               package-id (file-name-base (car files)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]