unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>,
	Nicolas Petton <nicolas@petton.fr>,
	 Stefan Monnier <monnier@iro.umontreal.ca>
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	[thread overview]
Message-ID: <CAFyQvY0hxy5hAUQ5iUGfbQLv7npE9Gb8YeOU0K-6-3pEQKOWvw@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3QjiftXzC7XOFp5jq8KhrCRfq2tSL5=MAgqA1Qm2MLCQ@mail.gmail.com>

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
 :)



  parent reply	other threads:[~2022-05-05 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 18:50 Help making a map-do/seq-do based code work on emacs 26.3 Kaushal Modi
2022-05-04 19:20 ` Emanuel Berg
2022-05-05  2:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-05-05 16:24 ` Kaushal Modi [this message]
2022-05-05 18:32   ` Stefan Monnier
2022-05-05 21:23     ` Kaushal Modi
2022-05-05 21:33       ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY0hxy5hAUQ5iUGfbQLv7npE9Gb8YeOU0K-6-3pEQKOWvw@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=nicolas@petton.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).