emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NonGNU ELPA] new package: eglot-inactive-regions


From: Philip Kaludercic
Subject: Re: [NonGNU ELPA] new package: eglot-inactive-regions
Date: Fri, 06 Dec 2024 09:00:31 +0000

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

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> 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.
>>
>
> Thanks this seems to do the trick!

OK great, I'll add the package to NonGNU ELPA.  Can you just add a
.elpaignore file that lists the "screenshot" directory to be excluded
from the tarball?

PS. Using the command "oxipng -o max -Z" I could compress one of the
images by 49%.  You might also consider creating a SVG screenshot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]