From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Split off some backends from Company?
Date: Thu, 14 Aug 2014 06:20:34 +0400 [thread overview]
Message-ID: <53EC1CF2.3050904@yandex.ru> (raw)
In-Reply-To: <jwvha1gr2kq.fsf-monnier+emacs@gnu.org>
On 08/13/2014 04:38 PM, Stefan Monnier wrote:
>> Probably not: using yasnippet as a completion source is a questionable
>> decision, which each user should make themselves. It replaces the advertised
>> way to interact with yasnippet (type the snippet key, press TAB), and the
>> recommended way to use this backend is to group it with others, not by
>> itself (think `completion-table-merge' instead of
>> `completion-table-in-turn'), so putting it in
>> `completion-at-point-functions' would probably be misguided.
>
> 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. A minor mode would, again, be something like an on/off switch,
and company-yasnippet requires manual configuration to be useful, and
users probably have to pick a good combination for each major mode they
intend to use it in.
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.
>> Hmm, yes. I guess we could do that if the user explicitly
>> installed a backend package.
>
> I think it's "should" rather than "could", because it's important for
> the installation to be as straightforward as possible.
On the one hand, the simplest setup is desirable. On the other hand,
`company-backends' is designed to be customized, and to allow users to
mix backends, to there's no single way to use a specific backend (see
https://github.com/iquiw/company-ghc#4note as an example of alternative
setup). So the simplicity has to be balanced against the odds of users
being forced to undo the automatic setup.
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). I don't entirely agree with it
(here's one discussion on the subject:
https://github.com/skeeto/skewer-mode/issues/22#issuecomment-18454897),
but I prefer to do less, rather than more, when the choice is not obvious.
next prev parent reply other threads:[~2014-08-14 2:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 19:21 Split off some backends from Company? Dmitry Gutov
[not found] ` <jwva979sonu.fsf-monnier+emacs@gnu.org>
2014-08-13 1:57 ` Dmitry Gutov
2014-08-13 12:38 ` Stefan Monnier
2014-08-14 2:20 ` Dmitry Gutov [this message]
2014-08-14 3:07 ` Stefan Monnier
2014-08-14 4:23 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53EC1CF2.3050904@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).