emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better way to require with shorthands/renamed symbols


From: Stefan Kangas
Subject: Re: Better way to require with shorthands/renamed symbols
Date: Mon, 27 Sep 2021 13:12:35 -0700

João Távora <joaotavora@gmail.com> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]