From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Help sought understanding shorthands wrt modules/packages Date: Fri, 11 Nov 2022 22:35:50 -0500 Message-ID: References: <25a8a3a6-81c8-3fbc-434d-fb1b24ae1d62@gmail.com> <83cza48lxe.fsf@gnu.org> <87cza0ihb7.fsf@gmx.de> <87o7td7qfu.fsf@gmail.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?iso-8859-1?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 12 04:37:04 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 1othKJ-0004Gu-F4 for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Nov 2022 04:37:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1othJB-0006dO-1k; Fri, 11 Nov 2022 22:35:53 -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 1othJ9-0006cL-JL for emacs-devel@gnu.org; Fri, 11 Nov 2022 22:35:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1othJ9-00073N-4D; Fri, 11 Nov 2022 22:35:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=2m16klct/eiWHbg0e5fCNXEPx2xxC113eXIVyItn4r8=; b=FgsjW1fgaknz qggJrKxkbgrpkwYwHwIcDZIy31hj9min+kNscAqzLkl/wkXsJjrqArRvu2yqOOt59pZ33ZM3dqOXt lXJX7gFBulpDHXb85CkSB+C1mGP3RfdgFlRWBrajAW6ZZJ2uRKRSP6/fLSCKcGo4xfGK1HpXTmv2a gSDrKco8qzE0sWaeMM94LJUGRvudkp7S0G0EFvYA6xxe/OoPsDYMwfFqixN46lJnf0vdFHg82j2OB umM4lr6h3D4k0nb0O+MHvyapfzOalcZW28tMk3FEfPO+Iw/DKxke7QbyvcZnrUmq/6nNBxmhr2dfM zW9/wAyfci1aKbuh6fYKLg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1othJ8-0007uF-Sc; Fri, 11 Nov 2022 22:35:50 -0500 In-Reply-To: <87o7td7qfu.fsf@gmail.com> (message from =?iso-8859-1?Q?Jo=C3?= =?iso-8859-1?Q?=A3o_T=C3=A1vora?= on Fri, 11 Nov 2022 10:09:41 +0000) 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:299599 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > The magnars-string.el file is meant to supersede s.el and be a > well-behaved version of it. The s.el file, as it exists today, is a > namespace-polluting liability, we shouldn't maintain it. No one would be happer than I to eliminate te usual version of s.el, but my understanding is that that would cause a big practical problem. Lots of packages do (require 's), and they call those functions by the names s-... defined in s.el. If we don't have s.el, they will break. They can't use your proposed magnars-string.el (which I would call stris.el), since the names it would define are wrong _for them_. To modify all those files would satisfy all our goals, but it's not feasible. We don't maintain them. I suppose we don't distribute most of them. We could distribute both s.el and magnars-string.el (strings.el), two files which are almost the same and should be changed in sync. That would do the job, but it is undesirable in terms of maintenance. `load-with-shorthands' is a way of making strings.el use a modified virtual copy of s.el, in a way that avoids actually duplicating the contents of s.el. > If I find a bug or want to add some function to that presumed s.el that > your string.el is loading specially, I have to somehow remember to load > it with shorthands. What is the precise scenario here? I don't see it. If we found a need to modify s.el, we would modify our version of s.el. With my implementation, that would DTRT for programs that use s.el and for programs that use strings.el. If we wanted to add something to strings.el, we would add it directly to strings.el. The shorthands would not apply to the contents of strings.el itself. They would only apply to the contents of s.el when it is loaded by strings.el. > The usual commands C-M-x, M-x load-file, M-x > emacs-lisp-byte-compile-and-load will all produce wrong results that I > won't know how to fix. I don't follow you. I don't see why anything would produce wrong results. If you show me a specific scenario, I might understand. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)