From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Danny YUE Newsgroups: gmane.emacs.help Subject: Re: help correcting web-mode configuration Date: Sun, 12 Mar 2017 20:27:34 +0800 Message-ID: <87inneade1.fsf@gmail.com> References: <8737ei28k7.fsf@gmail.com> <4aa2cd16-09f4-f786-eab5-cd0456911ee3@openmailbox.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489321764 10823 195.159.176.226 (12 Mar 2017 12:29:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 12:29:24 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: "help-gnu-emacs@gnu.org" , Danny YUE To: Krishnakant Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 12 13:29:13 2017 Return-path: Envelope-to: geh-help-gnu-emacs@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 1cn2cY-00019T-J2 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 13:29:10 +0100 Original-Received: from localhost ([::1]:46948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn2cc-0003I9-U4 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 08:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn2c8-0003I4-MU for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:28:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cn2c3-0005BI-U3 for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:28:44 -0400 Original-Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:33988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cn2c3-0005A9-Oq for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:28:39 -0400 Original-Received: by mail-pg0-x243.google.com with SMTP id b5so15269768pgg.1 for ; Sun, 12 Mar 2017 05:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=HZvbuZtk8xsmHQKNRhVhIkIS7dELVleEMcoqW27V6DI=; b=Rc4+rEKOvss9cBc41kS2Ho6XQ0BJ/hxRfOM6cxsck8Idr4OXpXSWpgTch7SOZQnC5A m19lp0hg/gmq7aADEGIC8s3dpITb6zhGAP5TIJ5IOeH12/+VhSzWyJAvRBN3WvM+ETTS i7icYQYBfINAjkyY5RKNTXtrlgUJooWvEmJHADKFIbvQ7SmGmQ3tPT6ylh3MDH2G4qjz St96abR2h9s5R60Yx/hOcneonMfEyjcVt0nkFJORTjNnM3olyzbZp9Qzqj5u2WAksmYa U5V2BJJx4YRmyJ8ub6/zImE0PO4ZfYOGBIwAdL2DG5wBa6gfONsNAcJN934QVjav10kA YMug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=HZvbuZtk8xsmHQKNRhVhIkIS7dELVleEMcoqW27V6DI=; b=Nv9Zz0/dURFCEPjk6bLX1jXceMUf33FZlbWwBpWh0ulV0eOCyu09lY2ybXUl4kRJPe hDF/U9PEleoD3cgmPV8XMPN9caoJtcVPqzLe2DdWgZ28Eu2B0nu8vpOUuJ/LqCiSxJMp dX082NQLXUYkF+VgS/BzYXGnow50EMGeZcuGXw5YnqJ1ZbDOnOJvD+laBuaT5OabPl8H JgNRm68v7ghhcKbj1NIUzKIOnGhWO2QfKPUAELW2iMUE9/1nWzHSkadX6JbX/k4hBpeG IGLIk4lchIqx1Dka1gSJc/7uSMqVN6+CZkXeLSj6FWN3G6NkaaHsUWGsLRdb5aSWUBTQ SuBA== X-Gm-Message-State: AMke39kO9z6i/AfsrsoUGiYd/Ogi001av65hAo/2cfNOJ8W2aEam9qSpFoPLJZ5p3TWP5A== X-Received: by 10.84.232.134 with SMTP id i6mr40243478plk.101.1489321718742; Sun, 12 Mar 2017 05:28:38 -0700 (PDT) Original-Received: from localhost (23.83.238.120.16clouds.com. [23.83.238.120]) by smtp.gmail.com with ESMTPSA id b14sm28314881pfh.114.2017.03.12.05.28.36 (version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 05:28:37 -0700 (PDT) In-reply-to: <4aa2cd16-09f4-f786-eab5-cd0456911ee3@openmailbox.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112546 Archived-At: This is really strange... You see, if 'company-diag' says that your back-end gives no completion, which is actually wrong because 'company-web-something' does work as you said... Wait, why the "Prefix" is nil? It should be a string storing the characters you have typed when invoking the command. In Emacs Lisp mode if I type "(add" then invoke 'company-diag, I get: Prefix: "add" which is correct... By the way are you using this pacakge? https://github.com/osv/company-web Danny On 2017-03-12 10:27, Krishnakant wrote: > Hi Danny > > > > On Sunday 12 March 2017 02:09 PM, Danny YUE wrote: >> Hi, >> >> I barely use web-mode because I seldom write HTML etc, but I use >> company-mode a lot and find it sometimes tricky to setup. >> >> I noticed that you set company-backends locally, but you have to make >> sure it's actually being called. >> >> You can tackle it down by 2 steps: >> 1. Try command 'company-web-html' or something provided by your company >> web-mode package. If it's giving you the completions, this step is >> passed. Otherwise, you have problem setting up the package itself. >> >> >> 2. Try command 'company-diag' to see what back-end it's using currently, >> and if the back-end it's using is not what you want, maybe you have to >> set the company-backends without append. For example: >> >> (defun web-mode-setup-company () >> (make-local-variable 'company-backends) >> (setq company-backends '(company-web-html))) >> (add-hook 'web-mode-hook 'web-mode-setup-company) >> > > This is the output from company-diag > > Used backend: company-web-html > Prefix: nil > Completions: none > I get same result of company-diag even after adding your code to init.el > Happy hacking. > Krishnakant.