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: Fri, 06 Dec 2024 09:00:31 +0000 [thread overview]
Message-ID: <87jzcd2nkg.fsf@posteo.net> (raw)
In-Reply-To: <m21pyl4ykj.fsf@gmail.com> (Filippo Argiolas's message of "Thu, 05 Dec 2024 22:19:56 +0100")
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.
next prev parent reply other threads:[~2024-12-06 9:00 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
2024-12-05 21:19 ` Filippo Argiolas
2024-12-06 9:00 ` Philip Kaludercic [this message]
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=87jzcd2nkg.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).