From: Kaushal Modi <kaushal.modi@gmail.com>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>,
Nicolas Petton <nicolas@petton.fr>
Subject: Help making a map-do/seq-do based code work on emacs 26.3
Date: Wed, 4 May 2022 14:50:37 -0400 [thread overview]
Message-ID: <CAFyQvY3QjiftXzC7XOFp5jq8KhrCRfq2tSL5=MAgqA1Qm2MLCQ@mail.gmail.com> (raw)
Hello,
I recently published the tomelr package on GNU ELPA that can take in a
plist or alist and return a TOML string.
Now I need to tackle a small problem that makes the package fail at
run-time only on emacs 26.3 (not on emacs 27+) when a plist is passed
to its tomelr-encode function.
Recipe to reproduce failure:
1. Load emacs 26.3
2. Install tomelr from GNU ELPA
3. (require 'tomelr)
4. M-: (tomelr-encode '(:int 123))
Error backtrace
Test test-plist backtrace:
#f(compiled-function (pair) #<bytecode 0x313eed>)(:int)
mapc(#f(compiled-function (pair) #<bytecode 0x313eed>) (:int 123))
seq-do(#f(compiled-function (pair) #<bytecode 0x313eed>) (:int 123))
map--do-alist(tomelr--print-pair (:int 123))
map-do(tomelr--print-pair (:int 123))
(let ((tomelr--print-indentation-depth (1+ tomelr--print-indentation
(if (map-empty-p map) nil (let ((tomelr--print-indentation-depth (1+
tomelr--print-map((:int 123))
(cond ((tomelr-toml-table-p list) (tomelr--print-map list)) ((listp
tomelr--print-list((:int 123))
(cond ((tomelr--print-boolean object)) ((listp object) (tomelr--prin
tomelr--print((:int 123))
(save-current-buffer (set-buffer standard-output) (set (make-local-v
(let ((standard-output standard-output)) (save-current-buffer (set-b
(progn (let ((standard-output standard-output)) (save-current-buffer
(unwind-protect (progn (let ((standard-output standard-output)) (sav
(let ((standard-output (get-buffer-create (generate-new-buffer-name
(string-trim (let ((standard-output (get-buffer-create (generate-new
tomelr-encode((:int 123))
Expected output:
"int = 123"
Same error on the package's CI for reference:
https://github.com/kaushalmodi/tomelr/runs/6295315125?check_suite_focus=true
===
- Is there a function or few of them that I can override so that
(tomelr-encode '(:int 123)) works on emacs 26.3 as well?
- Can I force install map and seq from GNU ELPA on emacs 26.3? But how
can I do that if a user's package.el is installing tomelr.el from GNU
ELPA as a dependency? Also package.el will refuse to install map and
seq because they are already present in Emacs 26.3 core.
--
Kaushal Modi
next reply other threads:[~2022-05-04 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 18:50 Kaushal Modi [this message]
2022-05-04 19:20 ` Help making a map-do/seq-do based code work on emacs 26.3 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
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='CAFyQvY3QjiftXzC7XOFp5jq8KhrCRfq2tSL5=MAgqA1Qm2MLCQ@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--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).