unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Filippo Argiolas <filippo.argiolas@gmail.com>
Cc: emacs-devel@gnu.org, "Gerd Möllmann" <gerd.moellmann@gmail.com>,
	"Stefan Kangas" <stefankangas@gmail.com>,
	"João Távora" <joaotavora@gmail.com>
Subject: Re: [NonGNU ELPA] new package: eglot-inactive-regions
Date: Thu, 05 Dec 2024 15:43:00 +0000	[thread overview]
Message-ID: <878qsu3zln.fsf@posteo.net> (raw)
In-Reply-To: <m2ed2m9w01.fsf@gmail.com> (Filippo Argiolas's message of "Thu, 05 Dec 2024 13:04:14 +0100")

Filippo Argiolas <filippo.argiolas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Filippo Argiolas <filippo.argiolas@gmail.com> writes:
>>
>>> Filippo Argiolas <filippo.argiolas@gmail.com> writes:
>>>
>>>> Philip Kaludercic <philipk@posteo.net> 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ão.
>>>>
>>>> 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 :-)

I don't have your source code available right now, my last suggestion
would be to use `with-suppressed-warnings' where  you can suppress
specific obsoletion warnings, but that requires Emacs 27.1 or newer.

> Still open to any better idea!
>
> Filippo



  reply	other threads:[~2024-12-05 15:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-01  8:04 [NonGNU ELPA] new package: eglot-inactive-regions Filippo Argiolas
2024-12-01 22:02 ` Philip Kaludercic
2024-12-02 17:31   ` Filippo Argiolas
2024-12-03 19:35     ` Philip Kaludercic
2024-12-03 22:02       ` Filippo Argiolas
2024-12-04 17:09         ` Filippo Argiolas
2024-12-04 17:23       ` Filippo Argiolas
2024-12-04 20:59         ` Filippo Argiolas
2024-12-04 22:10           ` Philip Kaludercic
2024-12-05 12:04             ` Filippo Argiolas
2024-12-05 15:43               ` Philip Kaludercic [this message]
2024-12-05 21:19                 ` Filippo Argiolas
2024-12-06  9:00                   ` Philip Kaludercic
2024-12-06  9:21                     ` Filippo Argiolas
2024-12-06 11:38                       ` Philip Kaludercic
2024-12-06 11:59                         ` Filippo Argiolas

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=878qsu3zln.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=filippo.argiolas@gmail.com \
    --cc=gerd.moellmann@gmail.com \
    --cc=joaotavora@gmail.com \
    --cc=stefankangas@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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