From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Okamsn Newsgroups: gmane.emacs.devel Subject: Re: Adding the `prescient` packages to NonGNU ELPA? Date: Tue, 20 Dec 2022 01:32:37 +0000 Message-ID: <807a3f55-e76a-583f-381a-e15adb270c46@protonmail.com> References: <16193c73-ab80-04c9-558f-d5e6142f38f3@protonmail.com> <87pmcj2lsg.fsf@posteo.net> <877cyq5qym.fsf@posteo.net> <87pmcivwrq.fsf@posteo.net> <87iliavw08.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="25747"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , North Year , Visuwesh , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 20 04:20:37 2022 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 1p7TBE-0006TG-HD for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Dec 2022 04:20:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7TAq-0007Ja-PW; Mon, 19 Dec 2022 22:20:12 -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 1p7RUz-00079O-DN for emacs-devel@gnu.org; Mon, 19 Dec 2022 20:32:53 -0500 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7RUx-0001vz-19 for emacs-devel@gnu.org; Mon, 19 Dec 2022 20:32:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1671499965; x=1671759165; bh=jHhg9C2lcKu/R3dwvd4UtNv1RkHJAEIh2NNKPVTRum0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FLRZa5usYySygo8xTDP9VSWppHQ34lRwVXQg4W2/uBE9VpGJt10ty8yi1Ll6G8BOQ vCXfY4DAAlXx9p8SwM+YrumbyreI6hFOI+ycINHuDUj4ob024EJCd+U0HLLFz78DSE SbWYiQlL2mZsqg6W7wDridrVdAra9qf4o2+wWCMeWev1tlDtIKSMn2KOZGzVANcF/O tzGHewnqwWCLecr4IJFtFhg5gvbFTB3fPu4W4uTX7yFdNjFJ+TcgeqyLU9QdAT1xWv iu62BXZCJCYQ5Ar5FBRprlYYM4iLrYgmYixKlDurrB+qRaFhgh6Y6wUIEY8fKsLu4F x5fbB3frtypwQ== In-Reply-To: Feedback-ID: 25935600:user:proton Received-SPF: pass client-ip=185.70.43.22; envelope-from=okamsn@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 19 Dec 2022 22:20:10 -0500 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:301677 Archived-At: On 2022-12-17 18:39 UTC, Stefan Monnier wrote: >> Is there a way to fix this while still declaring the extension packages' >> requirements? > > Usually the way we expect this to work is: > > - the user install prescient > - the user installs company/corfu/younameit > - it just works > > Sample (and incomplete) patch below (a lot of it is unrelated, > e.g. I make it use `add-function` instead of manually saving the old > function and restoring it, and I move the "turn off the mode" to the > beginning instead of the weird recursive call which would inevitably > mess up anyone using `-prescient-mode-hook` as well as confuse > Custom's tracking of whether the mode was set (and whether pragmatically > or not)). > > > Stefan OK, I misunderstood what was being said about `require`. I will make that change. Would you please explain why one would want to use `add-function` instead of directly setting `corfu-sort-function`, since setting the variable is the intended use? Do you think that storing the old value is insufficient? Also, you suggest using `message` to warn that `corfu` isn't found. Would use of the function `user-error` be incorrect for this? Thank you.