From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id E+ddIuiAZGHjyQAAgWs5BA (envelope-from ) for ; Mon, 11 Oct 2021 20:22:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cL8wHeiAZGG1CAAAbx9fmQ (envelope-from ) for ; Mon, 11 Oct 2021 18:22:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 534331EF71 for ; Mon, 11 Oct 2021 20:22:30 +0200 (CEST) Received: from localhost ([::1]:38278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZzwS-00082w-Dr for larch@yhetil.org; Mon, 11 Oct 2021 14:22:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZzvw-00082R-3Y for emacs-orgmode@gnu.org; Mon, 11 Oct 2021 14:21:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:49181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZzvk-0000JX-Om for emacs-orgmode@gnu.org; Mon, 11 Oct 2021 14:21:55 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B8EDD5C00DD; Mon, 11 Oct 2021 14:21:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 11 Oct 2021 14:21:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= FNiMAv/HZ/9XEh+9rFhs49Zjhn8WVaL0ZCkjujZ8orQ=; b=Oj2FXyNf4EriR5+N 6172043ZV9RplbuoJWTLhbfemOMs5QbBMnoFzXOp3sVyotSePcrNKO9oMGcvrBHQ vo5ZSCaU9rhd72jcpslyjDiY2YlWckiSaA+4Z2WdudBUQB+hcrPQ4NsNpCvAIAge QuFUeii7UpW++avylbYLkTJDh7xAeeFpr8qzMiweoY0/2KLoCp2YVTEw5/ZTIchG Dc1CvoXFzoIM+ScbeFcX3kNGWYMlsaS8ETReUItYmGxv1TgFVtbBf2iqPP4+xYti wdrsr5dDgzXW7TeFlNsLmBLHO0AKl8RJGr0R+Den2Ce7sYagfETWRfw/iB2rc4ym ixhXig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=FNiMAv/HZ/9XEh+9rFhs49Zjhn8WVaL0ZCkjujZ8o rQ=; b=RE8o8wDgPg+XZme5yd9gVehqkJRNaQCSg46MkeI5JHFg6/+bTabeBwOOH i4zogQgqlN2WV4ewrjApZTu5RbsOUYJ63SrHEHc7WvjqLXrJCX8AvBpcMFVoTyfL fAPGsttHhy6ZnE2jiJkabr3BnzDhtkKFTZ+6JpSTWdXctGeGy7pjeaCMoZX5a/CW cQJD+Q0xSodaLt8YiPChRHDWU8nqKw1pmHm04XJ0jx6RAII9BX5Np71PEbqpzCEV sBYoBvLMYcI/6U7YdDk2gwP7RWvvLTyQyxE36a9SnTjzFrW2vr3SkSLPRZhMp8dn pc/4275ziwDCKkbQg0pho6A9fTwUA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtiedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufffjgfkgggtgfesth hqredttderjeenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhr vghmvghrshesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepvddvgfeghf dtiefhvedvvddtjefhleejveeltdelffevhfeijeekhfdutdffgeefnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrh hssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Oct 2021 14:21:40 -0400 (EDT) References: <87sfx7degz.fsf@gmail.com> <87r1crd33m.fsf@gmail.com> User-agent: mu4e 1.6.6; emacs 27.2.50 From: Joost Kremers To: Timothy Subject: Re: Useful package? Compat.el Date: Mon, 11 Oct 2021 20:04:08 +0200 In-reply-to: <87r1crd33m.fsf@gmail.com> Message-ID: <8735p7pgls.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=66.111.4.25; envelope-from=joostkremers@fastmail.fm; helo=out1-smtp.messagingengine.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633976552; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FNiMAv/HZ/9XEh+9rFhs49Zjhn8WVaL0ZCkjujZ8orQ=; b=CkqFQwzKtws4bjWp8fyMaqXOvzr250FGT4EsYUy1TCH/Nu+UCqbA+DKfqCedh2o0JgZEM2 J10g9q9CkexfU031YxbPpPcoKcjgR10WdwMyx46a+98VNX/KOlmnW2yMsJe94Ay9+h3MEH q62T9cj/4A5ixyXeMCXYeXzXtOeDJzE2v5nYXI/qg5qdONqGeIJz4+wuPYd5FNEvIQTJ9i NJ57HGxD4l2tC+nbPQmd9EBWvDo+ZSYUKAycRycPgpGVAqJxoRTgrynAZWfICppVZZPX6Q 9gxKLhflJuS62irjRnr4SyicqMK7EBBIZPgVQfb62tf+jS28ZdXNps6kAiCSgg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633976552; a=rsa-sha256; cv=none; b=Wm0j8/+tPRuTqNlNwkjrirrPnRZmmFvFCkmjo9QA5NYCAGrmlhot58ro7Ce3VSqxoPRb1l 08n3DYW3cMnsF9zKTtAAZq1IRBrpsYsReX1aSk/ejjo5oVox/6gqlfUnvDgXr9eCGyMRUb A7Pj5+Ywb0p5YkCsPh9BzCjJbZ7PjZ1cpR8KdtLVi8BCFYLEX4cz7ner8l6jkVGkewb+AZ g+Y+UpkxZ7Dz4ALrRkRH/osf+OLenfIJNZXOsujC67GH3pD1wWljTQW3Qhi79y50nzTWjS gp13+q1D6KIOsBZkpNel0016GA/YnjoW3vRzzDXNX3gIsF6J9kIWmTEVvFak5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm1 header.b=Oj2FXyNf; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RE8o8wDg; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm1 header.b=Oj2FXyNf; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RE8o8wDg; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 534331EF71 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: T7C03hosdFXE On Mon, Oct 11 2021, Timothy wrote: > I think the way to do this would be as a =E2=80=9Csoft=E2=80=9D dependenc= y, i.e. not needed for > anyone running a recent version of Emacs, but needed if you want to use O= rg with > an old version of Emacs. Not sure how this would best be done, but if thi= s were > to be useful, this is how I=E2=80=99d imagine it working. IIUC you can simply specify a dependency on `compat` and the package itself= will make sure only the necessary compatibility functions are loaded given the E= macs version it's running in. So if you're running Emacs 28, nothing is loaded; = if you're running Emacs 27, `compat-28.1` is loaded to ensure packages written= for Emacs 28 can still be used; if you're running Emacs 26, both `compat-27.1` = and `compat-28.1` are loaded, etc. --=20 Joost Kremers Life has its moments