From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filippo Argiolas Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] new package: eglot-inactive-regions Date: Thu, 05 Dec 2024 13:04:14 +0100 Message-ID: References: <874j3nrri7.fsf@posteo.net> <878qswlfty.fsf@posteo.net> <87ldwvjdzl.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4163"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Gerd =?utf-8?Q?M=C3=B6llmann?= , Stefan Kangas , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 05 13:04:44 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tJAb6-0000tw-FS for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Dec 2024 13:04:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJAaq-0003cP-1G; Thu, 05 Dec 2024 07:04:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJAak-0003c3-Ra for emacs-devel@gnu.org; Thu, 05 Dec 2024 07:04:23 -0500 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJAai-0003xY-IA for emacs-devel@gnu.org; Thu, 05 Dec 2024 07:04:22 -0500 Original-Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-434a45f05feso8953405e9.3 for ; Thu, 05 Dec 2024 04:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733400258; x=1734005058; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FxMi6M8fXzzuAtQ0XZecI/SX+tdRSt+QktOHPCi8QeA=; b=BMIiGsChLRsZRCf9p4Ka2oH2740AiodFj4z3wnD54hZJ8TIQf/K31sL3OGGFbz7mVp V00xR/nEfnrTtDbJSwfh/58nOxKxYhNBwmHeEG4xTSItbER4hy8VA4RF//+QJ+c4EwNp lhNFIrLM1l4DTVofcTMvdhfSuIij2zju56SJPC7YSAr5nS3LjlI922yP5/hUMU44VU6X rD9ee0ml742XKyBPRQuwZWFjG7FxFYodi9UydWp+P/CgKiFoJiEE/b+DR1vzNsExs+S9 taxlRAUDR4p+Vcus3VzyLN2iVWZo9Lvhc7RE32FCatx0gZsDEjJTt+yPRY7+5MZwm4Vt vosw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733400258; x=1734005058; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FxMi6M8fXzzuAtQ0XZecI/SX+tdRSt+QktOHPCi8QeA=; b=nW8XHoF/U1yVPt8Dv6gQ9l8nWrBICb2TP3PoODkW4Co1bgt9tIvx0MC7sB6zy38m+W ka/PusUMtDO/1RYByIxk+Bg0YBJ60S9krfXOPaaxLTr7UIeBlLKHss7AXutdCrGELr+N Za+MawOBVdaNFX7TVJDBlOXP6uy/E1j+ZXs6DzEV2Xv82Pwk0xjTGZsD/VXGGRobp9Vb Y8kgUKfvKFIHgpyoueQgP7QAx0bAIm8noTiz5tMBRc9gabrTMadJYA49mWcxDQuUZnk7 BWNXq4UOQNuYrzK5Cv9k3jigLcImGMeruM3+IaDRGSt1l9Ugql9rxNcs0S7TSObiaVyj kXsQ== X-Gm-Message-State: AOJu0Yyeqp1o3OEcj7N+dV6bEzO7JSl4bDpaRQRDGWAjyHl3Zb/ELr09 rNavRJUKVMvmEp9p33wVvL01POhhT5NH4IeEnYDjJbj6bsk2K3/i X-Gm-Gg: ASbGncthM6VdcJaayqeMiJyJKYL7H1yHOw5zCR5hzL1pdz2ZSsCBfabsxARZnnXr82f 1to2JePPb0U84hTsooTMlmIw/RvlRcZH8Tn0HcOHtpbGDlxrs3fgnuQVAOJSma7tptSNzggu3Xl nVWA5/FYFrUu/o8j8k+Oy3VlWq/yNyuULmu3Qm7DO5uhSypjtBLxVBt0LKF2ZwC+bBXz+T2c3YU j3ddJT602BhzXCYp0Hc7wunO7P68Onzdsk6bwBN+7HnBUab6dckgPuWsw== X-Google-Smtp-Source: AGHT+IHDhpYZLZpaP3fzi7fKIk00B8HHX3ac8zCsqGj2JteyOJf6ne8i71rrrh2eMzzJRPl1AsH+Hw== X-Received: by 2002:a05:600c:1989:b0:431:6083:cd30 with SMTP id 5b1f17b1804b1-434d09b2a75mr95509395e9.6.1733400257615; Thu, 05 Dec 2024 04:04:17 -0800 (PST) Original-Received: from mba ([151.56.36.113]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d526b577sm59892095e9.3.2024.12.05.04.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 04:04:16 -0800 (PST) In-Reply-To: <87ldwvjdzl.fsf@posteo.net> Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=filippo.argiolas@gmail.com; helo=mail-wm1-x32d.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326087 Archived-At: Philip Kaludercic writes: > Filippo Argiolas writes: > >> Filippo Argiolas writes: >> >>> Philip Kaludercic writes: >>> >>>> I would try something of the form like >>>> >>>> (if (fboundp 'new-function) >>>> (new-function ...) >>>> (old-function ...)) >>>> >>>> If on the other hand there has already been a new release of Eglot with >>>> these commands, then just depend on that version and the issue would >>>> resolve itself. >>>> >>> >>> CC-ing Jo=C3=A3o. >>> >>> I pushed the suggested change but I still get the compile warnings about >>> deprecated functions. I'd like to keep supporting emacs-29, should I >>> just disregard the warning? >>> >>> Sorry for the ignorance, how would the dependency on a specific eglot >>> version work now that it's in core? >>> Does it require the users to have additional repos enabled? >>> >>> Sounds strange to me that we have macros to deprecate functions but no >>> mechanism to automatically switch to the new one if it's just a >>> rename. Am I missing something obvious? >>> >>> Thanks! >>> >>> Filippo >> >> How about something like: >> >> ;; fallback to deprecated eglot functions >> (when (version< emacs-version "30") >> (defalias 'eglot-uri-to-path 'eglot--uri-to-path) >> (defalias 'eglot-range-region 'eglot--range-region)) >> >> or even something similar with a check on eglot version? > > That can be dangerous if other packages do fboundp checks and infer too > much from that. I would try to see if adding `declare-function's could > help suppress the warnings? Nope, the only solution working so far is to call the deprecated functions with `with-no-warnings'. Guess I'll go with this. I'd be fine with the warnings too if we didn't have the annoying habit of scaring the end users with them :-) Still open to any better idea! Filippo