From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Split off some backends from Company? Date: Thu, 14 Aug 2014 06:20:34 +0400 Message-ID: <53EC1CF2.3050904@yandex.ru> References: <53E917A2.2080409@yandex.ru> <53EAC60F.6030104@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407982865 23356 80.91.229.3 (14 Aug 2014 02:21:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 02:21:05 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 04:21:00 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XHkep-0002qd-R6 for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2014 04:20:52 +0200 Original-Received: from localhost ([::1]:51572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHkep-0003cd-8Z for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2014 22:20:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHkeh-0003bc-RW for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:20:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHkec-0006tN-CV for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:20:43 -0400 Original-Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:47791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHkec-0006tE-1i for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:20:38 -0400 Original-Received: by mail-lb0-f170.google.com with SMTP id l4so464357lbv.15 for ; Wed, 13 Aug 2014 19:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=WoecIDCQ1r5lmbU8AtFVL40VDHqLSXz8PSYUq3Ez86I=; b=gEzC/3Hz1qzcEKBR9PbnXr2McyBIYULNOVBn7F/mrxxMLqVrveq9njzQc5p7yvIiVM kmqQ8K1lGwoqwjhCrObseyk2QalGrYyIaM9cMMa0AIWQbECGhpOWvzKYxHktJUq27bh8 hAYXXwKqRiCfFvKkUOOaeQLmUTx9AIpFthVxgy5jyW7+x78TwPYeEn+0rGSIjly+Bh8O JQHtVeXBzpSuAqUsGF13jxQnzUVYyYhyozik5OcnCx6426dqaweDRfO8ba/pOGlDWHCJ 3RgrlPTxCdwPMGOCxoe39sP3K7kYlR48tXDAWUBJ6dhfczS3vs+RFheLkmrJyFujHtEz m2Mw== X-Received: by 10.152.206.9 with SMTP id lk9mr1593378lac.21.1407982836542; Wed, 13 Aug 2014 19:20:36 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id sl2sm5670445lbb.33.2014.08.13.19.20.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Aug 2014 19:20:35 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173646 Archived-At: 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.