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 20:39:24 +0100 Message-ID: <87y2px9c43.fsf@gmail.com> References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87mu6dctgg.fsf@gmail.com> <87a72dge3u.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="104867"; 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 21:41:01 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 1jYalw-000R6t-A9 for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 21:41:00 +0200 Original-Received: from localhost ([::1]:34790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYalv-0003he-8W for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 15:40:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYakV-0001uA-C0 for emacs-devel@gnu.org; Tue, 12 May 2020 15:39:31 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:50743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYakT-0004Uk-6O for emacs-devel@gnu.org; Tue, 12 May 2020 15:39:31 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id m12so18541015wmc.0 for ; Tue, 12 May 2020 12:39:27 -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=o9IXOAPdosVBU2+KDnyQD6Xd9d8/xs+YqCSbqiitzmU=; b=SlNsRMT1rZesGLMKc/IykF6ligBlOGjm64dJlD/wt7Wb000eywPg964tzNicz3duHu 1OUunpPrjw9PSSqK7FALt7o77SAbAhv54K54GG3a04xIz2fWt6Q0L1BDEje0pD1UtRnN T6AB4hspBOEsMIQwgGTPALxPODtlwRNPhtLlmt8/6nTFm3wZtp9fUkyOQ7rPfnKNM7DT tYG9GhtkMsgmCD/5O/Of3FKHM6DrAX7zoh/lv8ADhbR6s25aBbCZLm0kf/XY7AqLvuLW HQ3c0uFfld1FVUP8XUqHPS7jXHt7LmCriI7+lhL5PJlcho+m5GcYGNK0gE4Zv/ZmpPvh wm3w== 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=o9IXOAPdosVBU2+KDnyQD6Xd9d8/xs+YqCSbqiitzmU=; b=l+4Ls2h/oLY2xbPoNIDAICRZF2EsYGiBU2ZF9cX3sXc3xbqPL4mTrJaI9KBi2E47Cj Y4T36BkkUd7mZ2L+rqpEjWn2u8vP1DzZO3d/1znOG8Wmaq1HVc9RW2tC3YwmwgN9Kxel rKXJajyGrZ9kLTEAOx8XzjqYS62p3gdJyPy16QYAFg4j57vypTSrMxAuLfxGUpVeCXw4 zOY/mWLnW4FComl6unH/tKcUSztvlpXLUhGrcOZ83xbGnF8LTz5lP23BEWv7mzIc24eK TCpOcr7qQlSZcX92O1Dupy1pwBwg2lRfcaXiPKvRVCiR1GYNErOlEGteTPYgc5wkSOog lOEQ== X-Gm-Message-State: AGi0PubudjbjR3Nz7fvHwMzK23JjreKWoeQK9yZpldpmdgUvzimiZbnh OTY38Y+mlteNz3V5XbznQYdOtKAlpbM= X-Google-Smtp-Source: APiQypJ9Qu3zARqkqmoFq/jgi0H5jxiQthTE96uzbZbck2haT2RQlEBb9+CwQP9ibCMuKkm9thS5GQ== X-Received: by 2002:a1c:9d12:: with SMTP id g18mr17023799wme.109.1589312366459; Tue, 12 May 2020 12:39:26 -0700 (PDT) Original-Received: from krug ([2001:818:d820:9500:824a:171:15a:2213]) by smtp.gmail.com with ESMTPSA id i17sm33183065wml.23.2020.05.12.12.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 12:39:25 -0700 (PDT) In-Reply-To: <87a72dge3u.fsf@alphapapa.net> (Adam Porter's message of "Tue, 12 May 2020 14:14:29 -0500") Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x332.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:250031 Archived-At: Adam Porter writes: > Jo=C3=A3o T=C3=A1vora writes: > > I'm hopeful that this solution, or something like it, will make it into > Emacs! Thank you for working on this, Jo=C3=A3o. You're welcome. Let's hope we find a practical solution this time around! > One minor drawback I see is that the symbol renaming is placed at the > bottom of an Elisp file, while the loading of the library whose symbols > are renamed is (usually) at the top of the file. > > Would a macro something like this be feasible, to (require ...) the > library and specify the renamings together? > > (shorthand-require 'magnar-string :with "^s-" :as "magnar-string-") 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 One thing that I'd like to discuss is whether it's a good idea or not to rename s.el to magnar-string.el. Maybe there's a way to keep calling it s.el and let every client keep using (require 's). 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) Jo=C3=A3o