From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Help making a map-do/seq-do based code work on emacs 26.3 Date: Wed, 4 May 2022 14:50:37 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7225"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs mailing list , Nicolas Petton Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 04 20:52:45 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmK7A-0001lj-05 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 May 2022 20:52:44 +0200 Original-Received: from localhost ([::1]:47722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmK78-0007Fy-HY for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 May 2022 14:52:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmK5l-0006pa-IX for help-gnu-emacs@gnu.org; Wed, 04 May 2022 14:51:17 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:55110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmK5k-0004bQ-0U for help-gnu-emacs@gnu.org; Wed, 04 May 2022 14:51:17 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id fv2so2021168pjb.4 for ; Wed, 04 May 2022 11:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=e8kB5OKLaMrN7mqLzIMJH1RdWBnQV3eFxmzQ/sqqTc0=; b=eyzp3arxfUuf6z8JvMq1cKXQF8dezPdc778AK+TY9fJ4znkg4FInzIhcq/masEmkaA Ctkq4ZEsQpZ4LuOH8tBhHAIrZJsNd2xL6P5Hs3b9ND/5SWx5P/wEgh53VEuHsZLxEVRZ fP4SxLe2qIRdbiTJJ1yPG7zrOeoQklwqgssndtRGhiq4ynLlpgqm7jsDmmbYToY5PbJj n/Uc9Q6KmRl4eyHhltGjiIAWeBp8jhKD3vxQNrWjj9NjuT3LN0Op/MO9Sm98EHsbCaY1 EuoJ6gXcbfmdGr+MKyFtb2uHD/60QO5zS0ML8lvOjXF2BfFi8HZsLNy5I3QbiTr85PMu xIXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=e8kB5OKLaMrN7mqLzIMJH1RdWBnQV3eFxmzQ/sqqTc0=; b=Kag1RA/rTQq0e7MEoyMyfWv/+XuXdnvYLTiS4LNPXwL2hPf/NeLJ9PDdNBBLUHRXmG a8xa0vr9iIY5knMyrWavFN6G3HWKy+WfkXKz2Sc7IoNnQnxacgP778AmODOAX53rozbz AZkzkj/cAJkHzRhO4zWak5p/AY0GQ8W8tqqjro2lGqsn0Csd9XFmkaBlpCkI0CTmmwDZ zotEAPNnh2V6Qp9wT76NG66ljY94arx+IqK9N5QJF9DEipy0QcwiIXP1xXTicCAtLBWq ADbXCeTJ6IUce1V3RBLudvPXeAXEWEoGiFPtNVudXCuBQn7opGfF6/Gd54wirsEKlKwB Ztyw== X-Gm-Message-State: AOAM532WZErmpQdj86So/GJ7m6lZm/5XPXt3cIg8haaUpByIxm+J2RnI 03coyg2Z0Qsyi8gRBMgYvoPZmtxEPHLKr4mogN+ZkcQHm54= X-Google-Smtp-Source: ABdhPJzWeq8NrWLHGp5ITyrtaa99z7WuG0InlJFP5wFcAbO9dTyuMePEtfOLafU0vfsIxhQc38UYvmyyiy4pataPasM= X-Received: by 2002:a17:90b:4a90:b0:1dc:aec3:c04 with SMTP id lp16-20020a17090b4a9000b001dcaec30c04mr1029982pjb.118.1651690274080; Wed, 04 May 2022 11:51:14 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=kaushal.modi@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137120 Archived-At: 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) #)(:int) mapc(#f(compiled-function (pair) #) (:int 123)) seq-do(#f(compiled-function (pair) #) (: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