From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Better way to require with shorthands/renamed symbols Date: Mon, 27 Sep 2021 13:12:35 -0700 Message-ID: References: <20210927003203.15806.29864@vcs0.savannah.gnu.org> <20210927003205.EF26620A5E@vcs0.savannah.gnu.org> <8735pqryt2.fsf@gmail.com> <0b213c21-aacb-fe9b-11c8-0c4e777fe14d@yandex.ru> <87pmsuqi5o.fsf@gmail.com> 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="11000"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , emacs-devel , Dmitry Gutov To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 27 22:16:45 2021 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 1mUx3M-0002ZU-8P for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 22:16:44 +0200 Original-Received: from localhost ([::1]:57392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUx3L-0001yJ-6c for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 16:16:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUwzP-0004cT-Uz for emacs-devel@gnu.org; Mon, 27 Sep 2021 16:12:39 -0400 Original-Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:39693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUwzN-0002RE-G5 for emacs-devel@gnu.org; Mon, 27 Sep 2021 16:12:38 -0400 Original-Received: by mail-pf1-x435.google.com with SMTP id g2so12826598pfc.6 for ; Mon, 27 Sep 2021 13:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc:content-transfer-encoding; bh=thIJgybFsSdES1jzl+3tvrMUMj8Afav3VLCQSatTqa8=; b=f8lmjyVODcioOQG3Gn5ZRUYLTfTG5127wCcm8SSdujS+cl+aPdUT/1VJlFD7Uoh1BQ mZ+PMK4XXw4KGDE0J5U+wAnCMviLxp5EUhL2Hqhf3qKZY83nBtW5YKXry/+0PTt3BmZ+ HYpLU0hiUXy3a94P3lsdGPlUzhTQfw7tTEjM2wtK0geqZra+udDYJNM07MnSpvsLgTbi K1H6mYv16HgPjkXmMxwjG2YK/PsugxcH9wV5We8KzIkpRBN0r71YxwbdC54wX9+ZlZtG QceObRpUM2A1eE6yF2vWu/ka4IM+x52zgJFxMawHn+f+xu9t0x7aGwTowHiFXb6ayD+9 vowg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc:content-transfer-encoding; bh=thIJgybFsSdES1jzl+3tvrMUMj8Afav3VLCQSatTqa8=; b=krEa6dGpvkFRDoeEE3ydsLiBx5Py3PLVwEl7KBD1reMRAsE2FnPukCFOHyYrsP7yoW XwlDwsTDbYWvzvMyS2T7vicmRd3X6/8XYBBPuAVnNa9KstVZQlrFeqlfj7fGZTFPaSPt gBLLqv8HSdR4Jjwk0KtmsSR9lCsdH/XHchx7AONu5ClS2GLlFMMMZ25yOYmv6K3EvAtZ hJqltoaWdd32uJLVJND/YFppcKKh4mR/9dpm1rbS9/fy7Bhkhw6GC2aryTUM0uYTpyDf OC8Fd9s3XewwtccB50Gd8Z4RtbQLh285bzVTmBxfRgQqRw+QnSD4VWUTlyBTfwBWD1k1 NY1w== X-Gm-Message-State: AOAM532rs63UZ9IWManENdrS8hCLXaCPlYz9NR3QM9hqWNDIGPXbuNmL 8lXWutwpvj4rIeQRvi/1wEtyikXL7JiuMCep67E= X-Google-Smtp-Source: ABdhPJxsd7qmHFpj+TNxiUrs0CKlm2LZHmkQV7FRAqRpeaN+/PpoPmqyoTNCd3gbEOJ7JRU5Jy8o0kmAOQjjQCkuwpc= X-Received: by 2002:a62:cd0f:0:b0:447:b8fe:d6c2 with SMTP id o15-20020a62cd0f000000b00447b8fed6c2mr1748827pfg.70.1632773555761; Mon, 27 Sep 2021 13:12:35 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 27 Sep 2021 13:12:35 -0700 In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=stefankangas@gmail.com; helo=mail-pf1-x435.google.com 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_DNSWL_NONE=-0.0001, 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.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:275613 Archived-At: Jo=C3=A3o T=C3=A1vora writes: >> Otherwise, we are probably better off just leaving things as they are, >> rather than complicating things just for the sake of it. > > Yes, "for the sake of it" is obviously bad. But solving particular > problems that are well described is fine with me. I guess I'm trying to say that it would also be fine to wait until we have more experience with this. In any case, I fully trust you will do the right thing with this feedback. > On this topic, it has come to my attention that some people are sore > or frustrated about how this feature has somehow "defeated" their > preferred idea. I think that doesn't make sense. If those ideas aren't > happening it is not because of my work. Fully agreed, that makes no sense. > The Shorthands feature doesn't have any particular "scope", IMO. It > depends on the use you want to give it. I believe it will be used for > importing `s.el` and `s.el`-dependent libraries into Emacs or *-ELPA > somehow. That's one application. > > Personally, I plan on using it in newer Emacs28-only versions of my > packages: i hate typing/reading long prefixes. Maybe a clean Elisp > version can be developed for older Emacsen, I dunno (the first > version I did was Elisp only, but I don't remember if it worked fully > like this one). Absolutely, I intend to experiment with it as well. Currently, I use the nameless package (and have done for many years), and I'm quite happy with it. It basically detects in "my-long-library-name.el" symbols looking like `my-long-library-name-foo-bar' and hides the package part so you only see `:foo-bar'. The text is still there, but it is out of sight. Extremely handy, and it works in any package. It obviously doesn't solve the problem of very short prefix packages like "s.el", etc. It's mostly just a very useful hack. The main drawback though is that you still need to type out the package name. So I intend to start experimenting with very short shorthand prefixes like ":". It will be interesting to see how useful/usable it turns out to be.