From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] new package: eglot-inactive-regions Date: Fri, 06 Dec 2024 11:38:44 +0000 Message-ID: <87ser111ob.fsf@posteo.net> References: <874j3nrri7.fsf@posteo.net> <878qswlfty.fsf@posteo.net> <87ldwvjdzl.fsf@posteo.net> <878qsu3zln.fsf@posteo.net> <87jzcd2nkg.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="23735"; 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: Filippo Argiolas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 06 12:40:02 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 1tJWgj-0005z4-BW for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Dec 2024 12:40:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJWfn-0000jY-47; Fri, 06 Dec 2024 06:39:03 -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 1tJWfk-0000j3-NR for emacs-devel@gnu.org; Fri, 06 Dec 2024 06:39:01 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJWfh-0005A9-DE for emacs-devel@gnu.org; Fri, 06 Dec 2024 06:39:00 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6AF61240028 for ; Fri, 6 Dec 2024 12:38:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1733485134; bh=Q3rPojpot3WvYCmlXX8LqaN97tC5EbuWAh4O7zLsDAk=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=ltTCuuKZ5roYtr4u7CIWKfhfNrDnY1epdCoEc3uNkCSSiRe414XuZwKzrCIJQX2hv o6/2WZpyKWGYsN7HDlC2ddqMkQnkr+kGJTT7j0xTsAyvnWf66Xwi/+G2/bO058JlN8 VKGV55LAjymA3IDE2txSACWTUv4pHlEaU4T25AJDDz83DpLfZM1apNz/IlonDPO8FS eNH509b6tf5xqqvauRNFc/BUNR10lc+fMUoFWAMKd1PL+ibZHGUJYNSt2B2c94sAb7 Z26eb7pcAmEAYJ1a582YWHRfQ81LZtI8WwCNuBqEU7PoaXq0ir4ozXXQkNIbBsGkTP Yr0QKVBY7F5WA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Y4TmY372Gz9rxG; Fri, 6 Dec 2024 12:38:53 +0100 (CET) In-Reply-To: (Filippo Argiolas's message of "Fri, 06 Dec 2024 10:21:24 +0100") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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:326130 Archived-At: Filippo Argiolas writes: > Philip Kaludercic writes: > >> Filippo Argiolas writes: >> >>> Philip Kaludercic writes: >>> >>>> Filippo Argiolas writes: >>>> >>>>> 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 Eglo= t with >>>>>>>>> these commands, then just depend on that version and the issue wo= uld >>>>>>>>> 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 eg= lot >>>>>>>> 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 bu= t 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 co= uld >>>>>> 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. > > Great, thanks! Added screenshots to ignore, let me know if I also have > to bump the release number. That will be necessary for the change to take effect. > One of these days I wanted to update screenshots as they look ugly on > lower res displays, will consider switching to SVG ones. In case you or anyone else reading along is not familiar with the function, you can generate a SVG screenshot by evaluating: (write-region (x-export-frames nil 'svg) nil "screenshot.svg") Note that this requires Emacs to have been built using Cairo.