From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Make company-backends buffer-local? Date: Sun, 4 Mar 2018 21:26:45 +0200 Message-ID: References: <83369150-de09-f305-18af-cdc9420eea4e@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1520191510 16399 195.159.176.226 (4 Mar 2018 19:25:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Mar 2018 19:25:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 To: Jefferson Carpenter , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 04 20:25:06 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1esZFd-0002HZ-7a for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 20:24:53 +0100 Original-Received: from localhost ([::1]:45867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esZHf-0000ND-QF for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 14:26:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esZHZ-0000L2-P3 for emacs-devel@gnu.org; Sun, 04 Mar 2018 14:26:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esZHW-0004wf-KZ for emacs-devel@gnu.org; Sun, 04 Mar 2018 14:26:53 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:52885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esZHW-0004wO-Db for emacs-devel@gnu.org; Sun, 04 Mar 2018 14:26:50 -0500 Original-Received: by mail-wm0-x22c.google.com with SMTP id t3so11925702wmc.2 for ; Sun, 04 Mar 2018 11:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IErnfFZtCLhbt9XNazIJlywcROftKiHIBj4H/4+xWs0=; b=Vv7uYul/tAGe5kDCXBvWGAFdDbHKqHvmgEHv8rfP6SQJ9Wp3IUg5e+ExNCG+phlt9Y Cj2hXt32q2E0jq/K+qmlBOXeD1YppglUMog1EHfKiibxcrFwtQjegS1ANNFhzrLZO4Wa wD+CyqIsNPH0QmtFqCIucqaNUPjriwVj3ViKb7Ut5rp0eekK/U+XPNOOME3ENlW3zY+k of6ciHV/3YIUYLvCZe9GCj37gxhhioC+gzeEzsdY6kES3Q37fDwD/0Vlr01PJoyh+q8m a5UIg7yLnEZqvxURHBi7DFR3IuyCyK0U7aMjxMQm4iZbMGtWnvrMMeHNm7pvCP9iYt5w Txpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IErnfFZtCLhbt9XNazIJlywcROftKiHIBj4H/4+xWs0=; b=oCyupchjEvvHrk7cXE1TQNj8oLzk01TSngsk4EBE5J2zdpUKsZrbRx3SjdlGDg1jIi Avd+RUbrwy+YqrvFLtX+bFV266MbY7vrQg3xHEWvG5PvvVtLgQm37EgtC4vMlTzl2/IZ 3bmBj8gRYL+a4VujrxHFpkXzOTrNq38jIGNSs7G96FYKiwW5Jto4iD2MoQxpNJuRCeJc se5vdAngH3/dKBSaGoBckVB+2LRm88SnJ2eMXt8FCKLACi4ebGmNsn0nkIvc6YclfhV1 tx8V1kH5P4zhUFzWKD1Qfl8rZy1CV7SJDusXelMiOCXFcY/qvbjTOONp4VRwTkHjXl3E IGJQ== X-Gm-Message-State: AElRT7FrzJPxcmcIecLzood3rkGm7m4Z6URTLjlZC13QZzHZrBp5E1DZ ZeptsumeCKWAjVx972eZcMfg2PLp X-Google-Smtp-Source: AG47ELsZKsinr7SPNDKK6LmlmqWbS2+++6iPTtO/WrtOTuE/Q/ji0Lyxszpr2dQvp6jUvMfcZRPfIQ== X-Received: by 10.28.10.81 with SMTP id 78mr6063733wmk.115.1520191608780; Sun, 04 Mar 2018 11:26:48 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id r71sm8274865wmd.48.2018.03.04.11.26.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Mar 2018 11:26:47 -0800 (PST) In-Reply-To: <83369150-de09-f305-18af-cdc9420eea4e@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:223265 Archived-At: On 3/4/18 9:47 AM, Jefferson Carpenter wrote: > First post to this list -- sorry if this is either not a good suggestion > at all, not right format, or too irrelevant. > > The company-backends variable is currently a global variable.  The > backend that serves completions is the first one that returns a prefix > for the location at point. > > Are there any barriers to making company-backends a buffer-local > variable?  I don't see any drawbacks - it would take a pretty small > amount of extra memory to create a copy for each buffer. You can do this in your own init script. Performance benefits are negligible, but you can organize your backends this way.