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: sweep Date: Tue, 27 Sep 2022 17:46:31 +0000 Message-ID: <874jwsn214.fsf@posteo.net> References: <877d1qlynt.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Jan Wielemaker To: Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 27 19:50:27 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 1odEix-0002tu-B9 for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Sep 2022 19:50:27 +0200 Original-Received: from localhost ([::1]:47792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odEiv-0004pq-O1 for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Sep 2022 13:50:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odEfM-00034A-KG for emacs-devel@gnu.org; Tue, 27 Sep 2022 13:46:44 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:38487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odEfK-0004BK-7I for emacs-devel@gnu.org; Tue, 27 Sep 2022 13:46:44 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8081E240101 for ; Tue, 27 Sep 2022 19:46:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664300800; bh=GItPstg0bIKLjuv7zE3h0FPVzqRotBDM2TiS//2yhU0=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=nNicnCY36lC+n/8t4z0wwMphD+ercVkTnayezJKxg4rhfh6PCnbz0javOEb8j9bur XuMGjrRVOmRuO+9EqnJBY4YK3PLL7tzkH4bZigmTEG7Nzrwl2Beyj0oyX2bRxeNU3p iL+4nTKD4+J2Hgp3oLSyFyRxZUvawiFbBySX4FEtEDbDTBmFedGyNVEj147+zeP4G2 n+5qeo2KUV1InjjmWgJ6k5ZwZJR6U9WjxWq72572ULYn+E1lM51TapczlpN8QlHwuH RnCGHCd9FU6Y7CJupJuf6AXBangL9i8zIfl1t0iWloEhvo/CJDMU2khklwFJL6M28G +vazSS7VzjFHg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4McRrY3lRzz9rxQ; Tue, 27 Sep 2022 19:46:37 +0200 (CEST) In-Reply-To: (Eshel Yaron's message of "Tue, 27 Sep 2022 19:32:46 +0300") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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_H2=-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" Xref: news.gmane.io gmane.emacs.devel:296363 Archived-At: Eshel Yaron writes: > Philip Kaludercic writes: > >>> I would like to submit a new package to NonGNU ELPA, called "sweep": >> >> May I ask what the name is supposed to mean? > > Of course, but there's not a lot of depth to it, basically its derived > from "SWI-P(rolog)", with the "I" replaced with two "e"s for > "Emacs-Embedded". So a possible backronym may be > "SW(I) Emacs-Embedded Prolog". I agree with RMS () that it might be nice to have a more indicative name, or at least something that includes "Prolog". Mor eso because "sweep" makes me think of something that cleans. >> From briefly skimming through the code I see that you define a new major >> that doesn't inherit from the default `prolog-mode'. Is there a reason >> not to do so, or even implement sweep as a minor mode? > > I am not opposed to building on top of `prolog-mode`, but since > `sweep-mode` has access to the actual SWI-Prolog runtime including > notably its parser, we can (and do) provide better implementations for > many of the features of `prolog-mode`, at the cost of targeting only > SWI-Prolog where `prolog-mode` is more implementation agnostic. > For example, `sweep-mode` defines an `indent-line-function` which takes > into account the dynamic operator definitions that may occur in Prolog > code. > > So currently I'm not sure what will be the benefits of inheriting > from `prolog-mode`, but I'll gladly revisit it as missing features in > `sweep-mode` pop up. Does that make sense? The main advantage I see would be that anyone who uses `prolog-mode' could inherit their customisations when using sweep. And it shouldn't be an issue if sweep-mode overrides most of what `prolog-mode' defines. >>> The dynamic module ("sweep-module") is distributed and built as part of >>> the latest SWI-Prolog version, so the only files that need to be >>> distributed via the ELPA package are the Elisp package sweep.el and the >>> user manual. >> >> What happens if someone doesn't have a recent version of SWI Prolog? > > Currently you would get an error while loading `sweep.el` because > `sweep--ensure-module` is executed on load which tries to find and load > the dynamic module. This is probably not ideal. I wonder if it would > be preferable to suggest fetching and building the dynamic module, or > just to fail more gracefully... Is the error self-explanatory, in the sense that a user would be able to understand that SWI Prolog is outdated? There are some packages that build software themselves (e.g. pdf-tools), but I don't think that issue has ever been solved in a clean and robust way.