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: Automatic Suggestion of Packages Date: Fri, 08 Nov 2024 16:23:28 +0000 Message-ID: <87msi9ofsv.fsf@posteo.net> References: <7cb15f5c-efd0-4516-8190-a53c0d958eb6@gutov.dev> <86ses8x1po.fsf@gnu.org> <865xp3w64u.fsf@gnu.org> <61171da3-7428-4572-bc13-783766a123b5@gutov.dev> <86v7x2u7rz.fsf@gnu.org> <877c9hizof.fsf@web.de> <86cyj9u71k.fsf@gnu.org> <8734k5ipx3.fsf@web.de> <868qtxtx2p.fsf@gnu.org> <87a5ed605a.fsf@posteo.net> <87y11xh4cy.fsf@web.de> <87ikt1ust4.fsf@posteo.net> <87pln8hfh6.fsf@web.de> <87ttcjt9ht.fsf_-_@posteo.net> <87ttcjt4cu.fsf@gmail.com> <87v7wyhfwo.fsf@posteo.net> <87ldxutl71.fsf@gmail.com> <87msi9hlhv.fsf@posteo.net> <87cyj5u3wc.fsf@gmail.com> 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="13694"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 08 17:24:29 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 1t9Rmd-0003QS-S6 for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Nov 2024 17:24:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Rlu-00066K-Sd; Fri, 08 Nov 2024 11:23:43 -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 1t9Rls-00066B-AZ for emacs-devel@gnu.org; Fri, 08 Nov 2024 11:23:40 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Rlp-0003Bq-Qc for emacs-devel@gnu.org; Fri, 08 Nov 2024 11:23:40 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 78FD2240101 for ; Fri, 8 Nov 2024 17:23:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1731083010; bh=usI4QwOhh8/74vULNlki9sI33veS+gaWoDpyr3zWT9c=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=jugyjr9P8tt7QYd/G5JGpQqAISCWYTQ9g101lq0oSmoXW9VqwbOQbsVIBx3Xpfshg 9/Bxs0Z3H/iWjW13FKWZomWXr4dvglYyuPl8mDs2Zti5uLUCWVJsgoLqd8rzFT3gMV RXnjFLAHhtpVDQKEUNNpQfOps7LeKmvdxxw/yqph/EEH44UyOsiVc0s7rJHWUrzXl4 nei2+PBv6IPbZtDP77Kz/1BEZu+ibd/cqKXbdbnG/jGV95bEVi9v3KImk0cjdtQn51 DY3A9gQkEbQMfguhDNLsSV0HgZNYSVaxEnwnPiHl5XRxRByP1vV0PQYObrg5mnXW+8 YF+wk8BytpRfQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XlPPs4QHHz6twL; Fri, 8 Nov 2024 17:23:29 +0100 (CET) In-Reply-To: <87cyj5u3wc.fsf@gmail.com> (Visuwesh's message of "Fri, 08 Nov 2024 21:14:03 +0530") 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=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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:325297 Archived-At: Visuwesh writes: > [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=A8=E0=AE= =B5=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 08, 2024] Philip Kaluderci= c wrote: > >>>> [...] >>>> Perhaps it makes sense to always present a message if the minor mode >>>> is enabled, and add a separate option to enable the mode-line button? >>> >>> I would be happy with this (though I would turn the mode-line button on >>> by default). >> >> The issue with enable-by-default in the current implementation is that >> we would have to load package.el by default, which is currently avoided >> to reduce the startup time (see `package-enable-at-startup'). > > I see. > >> >> We could extract the autosuggest logic into a separate file and suggest >> loading that by default. >> >> We could also consider not using the mode line, but the menu bar to hint >> at package suggestions, but that might be easy to miss especially if a >> lot of people advise disabling the menu bar. > > That is a good idea too. > >>> BTW, I looked at the code to see what it does when there's multiple >>> packages suggested for a single (e.g., racket: racket-mode and >>> geiser-racket). It seems to install and enable only the first >>> suggestion: should we instead prompt the user about it? But asking the >>> user would defeat the purpose of the feature, which helps in assisting >>> her in setting up her environment for her work. >> >> No the current implementation would just install everything. Neither of >> the two solutions are really ideal. Perhaps we need to pop up a buffer >> with clickable elements to present the package suggestions and propose >> installing one of them? > > It would help the user decide between the packages if some kind of > popularity metric is shown. If they cannot decide between the options, > they could at least pick the most popular one and go with that. I think > the current one shown in the GNU ELPA website should be sufficient for > most cases. > Although I dislike the idea myself personally, "last updated time" might > be a good indication too. [ I dislike it because stable packages don't > need to get updated. After all, they just work. ] AFAIK we don't currently expose the ranking information via some API, but that might change in the future. Last updated has advantages and disadvantages that one should be weary of (a stable package might be seldom updated and a newer package more frequently as it is trying to become more mature). The core of the problem to me seems that we have situations where a file extensions might be used by multiple languages (as is currently the situation with Perl and Prolog, both commonly using ".p"). Assuming these were ELPA packages and not-built-in, we could try to combine the data, e.g. if the interpreter and the file name agree, only the propose Perl and not Prolog. Yet it is probably the safest option to engage human judgement and present the options, in a simple menu listing package names, their summaries and a button to install the package. Based on what I am imagining, the complementary issue that you mention, "racket-mode" vs "geiser-racket" would pop up a buffer that would look something this: --8<---------------cut here---------------start------------->8--- There are multiple package suggestions based on the available information: - "racket-mode" [install] Racket editing, REPL, and more Suggested due to: file name matching \.rkt\', the interpreter matching "racket". - "geiser-racket" [install] Support for Racket in Geiser Suggested due to: file name matching \.rkt\' --8<---------------cut here---------------end--------------->8--- --=20 Philip Kaludercic on siskin