help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Help making a map-do/seq-do based code work on emacs 26.3


From: Kaushal Modi
Subject: Re: Help making a map-do/seq-do based code work on emacs 26.3
Date: Thu, 5 May 2022 12:24:12 -0400

Hi Stefan,

Thanks for your reply.

(I realized that I had got auto-unsubscribed from this mailing list!
But I later found your reply online at
https://lists.gnu.org/r/help-gnu-emacs/2022-05/msg00027.html
I have now re-subscribed.).

> For `seq`, yes, but `map` is not in GNU ELPA.

map is actually available from GNU ELPA.

I tried adding this to tomelr.el and it worked!!

===
;; Package-Requires: ((emacs "26.3") (map "3.2.1") (seq "2.23"))
===

I couldn't do (package-install 'map) from an emacs 26.3 session. But
running (package-install-file "tomelr.el") installed the newer map and
seq from GNU ELPA.
So I am hoping that when a user installs the new tomelr version from
GNU ELPA (on Emacs 26.3), it will install the newer map and seq
versions for them as well.

I have now added this to the CI setup, which now seems to work for
emacs 26.3 too:

===(defun tomelr-install ()
  "Test installation of `tomelr' including all its dependencies."
  (let ((tomelr-site-git-root (progn
                                (require 'vc-git)
                                (file-truename (vc-git-root
default-directory)))))

    (setq package-user-dir (let ((elpa-dir-name (format "elpa_%s"
emacs-major-version))) ;default = "elpa"
                             (file-name-as-directory (expand-file-name
elpa-dir-name user-emacs-directory))))

    ;; Below require will auto-create `package-user-dir' it doesn't exist.
    (require 'package)

    ;; Load emacs packages and activate them.
    ;; Don't delete this line.
    (package-initialize)                  ;
    ;; `package-initialize' call is required before any of the below
    ;; can happen.

    (message "Emacs is now refreshing its package database...")
    (package-refresh-contents)

    (package-install-file (expand-file-name "tomelr.el" tomelr-site-git-root))
    ;; (message "package-user-dir: %S" package-user-dir)
    ;; (message "load-path: %S" load-path)
    ))

(tomelr-install)
===

Finally passing the plist test on 26.3 too :
https://github.com/kaushalmodi/tomelr/runs/6309842382?check_suite_focus=true
 :)



reply via email to

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