emacs-devel
[Top][All Lists]
Advanced

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

Re: Split off some backends from Company?


From: Stefan Monnier
Subject: Re: Split off some backends from Company?
Date: Wed, 13 Aug 2014 23:07:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>> I see what you mean, but why does this need another package?
>> It seems the code could/should be in yasnippet, controlled by
>> something like a minor-mode.
> It could be in yasnippet, but then it would implicitly depend on Company
> anyway.

You mean it can't be a completion-at-point-function?

> And some users just bind a key sequence to this command (which all Company
> backend double as), to invoke instead of pressing TAB for yasnippet
> expansion. I guess this specific usage could be facilitated via a minor
> mode, but I don't know how popular it is.

Indeed the completion-at-point-function don't double as commands the way
company backends do.  And while it's easy to create a wrapper for it,
that wrapper will inevitably end up choosing a particular UI, so if we
want to use Company for it, we're stuck with a dependency on Company.

> setup). So the simplicity has to be balanced against the odds of users being
> forced to undo the automatic setup.

That can be a delicate balance, indeed.

> Further, there is a convention in the third-party developer community of not
> doing too much in autoloads ("installing the package shouldn't turn it on",
> or something along these lines).

That's true as well.  Of course "turn it on" is not always as clear-cut
as it sounds.  Adding oneself to company-backend might be seen as "turn
it on", but if you consider that it's only actually used if you do
enable company and if you use the appropriate major mode (or compiler
backend, or snippet library, ...), then you may decide that it's not
really "turned on".

To the extent that ELPA packages are normally installed by the end user
(my install.el package distinguished "system install" from "user
install" but package.el doesn't really provide much support for
system-wide installs, thjo it doesn't actively prevent them), I think
it's not that bad if installing a package also turns it on.
E.g. AUCTeX does just that (with a custom var that lets you "opt out"
if you prefer).
Of course, for people like me who install GNU ELPA via "git clone elpa;
make", we get all packages whether we want them or not, so "turns it on"
shouldn't be too much in your face.


        Stefan



reply via email to

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