From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Tue, 12 May 2020 22:18:40 +0100 Message-ID: <87sgg4am33.fsf@gmail.com> References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87mu6dctgg.fsf@gmail.com> <87a72dge3u.fsf@alphapapa.net> <87y2px9c43.fsf@gmail.com> <875zd0hnmh.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22452"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 12 23:19:21 2020 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 1jYcJ6-0005lG-Vl for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 23:19:21 +0200 Original-Received: from localhost ([::1]:60866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYcJ6-0001p3-1Y for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 17:19:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYcIY-0001Cx-7K for emacs-devel@gnu.org; Tue, 12 May 2020 17:18:46 -0400 Original-Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:38495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYcIX-0005C2-Cz for emacs-devel@gnu.org; Tue, 12 May 2020 17:18:45 -0400 Original-Received: by mail-wr1-x444.google.com with SMTP id e1so3811441wrt.5 for ; Tue, 12 May 2020 14:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=UzgOCTuc62L9dh1UkAbd4aRYrB1bD7VFSjtd67k810I=; b=kSOLT76Lzojn4qd6xWIoF+VPfBRGxBWfVzRF5Ucz++dNdEqG2xBt4pMsZgrBjwfN27 xA1aKEOhEAlCm3WVAMOovub3oANH9jraQXZvy7kCBQyW2TsHwNyOfg5376osD6NRDq+v ncZZmYL0GAA0KGdxVIn31zAgwGQMG2JJMzNUv4g472RIr9Ohj9pPJ/CBvbVGNSerkglS F+UW6dYQesH5o00FcMjKc5GEW+g0L2rI71RvkD4+Vm56aFl+3BuuBIiap+GRuJEtB8ou WKj6X5qcvFuW/w6lPvgjEkbgL4NSjfM07WJIymT370CC/QjAcixpIMFdlQLjjM2Di765 VDbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=UzgOCTuc62L9dh1UkAbd4aRYrB1bD7VFSjtd67k810I=; b=dM87LGexZvgn6CdQHfpgB68zfDCXfgX0biIZ5CdO1VbE+1dNe7soDcYB6HPaPdFpTb doQK5eofaXCPQizd6WAaUKvpbFntwsEs5Iwp+RjK/BA+8Cb88zgKPfcXUgrOhz+c+KOY 1UIdqkQiL6NyoXg84XlLHW71njgGuqQJXxJ0jtTAZ2HoHQSpcWXvGXtGZNAa7stA3No3 CzQMOSA0ZVbW4ZrfRWRaej2Ld2VG9ZioJzoqWlmOSGYUvCsDWJqbJUoNAQPQPj7L+tBR MS9BC1w2bnAx4veOFaZpPpkxFYO7FpekWu2kLMhZPDVVJaT/PPWWee+a6fJzyB9MhLci Y/Kg== X-Gm-Message-State: AGi0Puajq8MNFOU13TxjItW5iSdSmwcXOHFTkilIlEucN7ddV/jbvg6Y fTPesj6Bz87OiJhuZGlTF+ihglv6f88= X-Google-Smtp-Source: APiQypKptjwodxKQg7YVVnYaKf4TrBiLDsHZVSLZEhg3h5ISO7x4+qN16D9h4dTuKvbzL34NLri0PQ== X-Received: by 2002:a5d:55c5:: with SMTP id i5mr21211507wrw.402.1589318323552; Tue, 12 May 2020 14:18:43 -0700 (PDT) Original-Received: from krug ([2001:818:d820:9500:824a:171:15a:2213]) by smtp.gmail.com with ESMTPSA id v8sm24599910wrs.45.2020.05.12.14.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 14:18:42 -0700 (PDT) In-Reply-To: <875zd0hnmh.fsf@alphapapa.net> (Adam Porter's message of "Tue, 12 May 2020 16:03:34 -0500") Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:250050 Archived-At: Adam Porter writes: > Jo=C3=A3o T=C3=A1vora writes: >> Yes, something like that is reasoanble. Or we can just have a table of >> "notable renamings", and then the bare (require 'magnar-string) would >> come with that. Or as Richard, suggested, the default renamings could >> be given in the magnar-string.el file itself. They could be collected >> within each byte-compile-file or load-file, then restored.=20=20 > I may be missing something, but it strikes me as almost duplicating the > original problem, if libraries are allowed to define their own symbol > abbreviations. You can say that yes, but you wouldn't be duplicating the problem because the symbols of the library foobarfaz.el that the library imperiously wants you to access as with the prefix `f-` are still filed under the prefix `foobarbaz-`, where now you they are filed under `f-`. But yes, my suggestion to let the library itself decide opens the door to some contention. But if Emacs itself curates a list of notable cases, it's probably not so bad. > IOW, it seems almost like solving the problem of libraries' > "polluting" the global symbol namespace by allowing libraries to > "pollute" the global symbol *abbreviation* namespace (in the sense > that one would exist). Yes, exacly. So maybe not such a good idea. :-) >> Another thing that has to implemented is a special syntax to escape the >> renamings (imagine that you want to use some legitimate "s-foo" function >> that your renaming has shadowed) > > Would a table of buffer-local symbol aliases work? Maybe it could even > work something like: I was thinking of making say sth like ##s-lines really tell the reader to intern the symbol "s-lines", even if there's a renaming rule for "^s-" active. so (##s-lines) would call the function s-lines and (defface ##s-lines) would define that face, etc... Anyway, you raise good points. I'm not married to any of these solutions and I hope I made the code simple enough that others can hack on it and experiment. Jo=C3=A3o