From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Krishnakant Newsgroups: gmane.emacs.help Subject: Re: help correcting web-mode configuration Date: Sun, 12 Mar 2017 18:13:38 +0530 Message-ID: <15149b53-695b-bcc9-567b-5c44eabf02ca@openmailbox.org> References: <8737ei28k7.fsf@gmail.com> <4aa2cd16-09f4-f786-eab5-cd0456911ee3@openmailbox.org> <87inneade1.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1489322664 24734 195.159.176.226 (12 Mar 2017 12:44:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 12:44:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: "help-gnu-emacs@gnu.org" To: Danny YUE Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 12 13:44:20 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 1cn2rA-0005cc-38 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 13:44:16 +0100 Original-Received: from localhost ([::1]:46973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn2rF-0005Cy-G6 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 08:44:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn2qk-0005Ct-Am for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:43:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cn2qg-0003E9-F9 for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:43:50 -0400 Original-Received: from lb1.openmailbox.org ([5.79.108.160]:33840 helo=mail.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cn2qg-0003DG-6j for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 08:43:46 -0400 Original-Received: by mail.openmailbox.org (Postfix, from userid 20002) id 53A63522D5C; Sun, 12 Mar 2017 13:43:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1489322624; bh=Paupe0/75KxuTG8ZA9xJWuEDsbBYluC0lszgxlL64RE=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=C6Kt9mWD/2gxHXtk6XkY/COBsD2fKcv0SrpPIS46JuupACd4QCSoJsJa0YuiuTruK 6mEwFu/v7fbfYhNT+AKWKZ48URxbAlGUfwvDQ/WWpc6Hy+0uqXZfnEv5wlryNUD64U C8a7fr3QsCbL//8HBS8OOr1R6n7hR9L6TSh+X2v0= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1489322623; bh=Paupe0/75KxuTG8ZA9xJWuEDsbBYluC0lszgxlL64RE=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=egX7zAdrGwf0ih1NHnF00RKtafS+NzSPfYTDB83MoE8SJb7cFAnY7KcuivEPlfHd8 cd84vTdrPHDjx0ySP00bedvhMiawXuMlqFVIPp/qCE4gv2j8RlC6bM9v4jEFYJJ7jH UOGRQ0yY+3IcrU4d4H1a1gUARnZnTjMit0PtmUoM= In-Reply-To: <87inneade1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.79.108.160 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:112548 Archived-At: Sorry my stupidity, I hadn't started typing when I did company-diag. here is the output when I try to start html" I guess the completions are not correct. Happy hacking. Krishnakant. On Sunday 12 March 2017 05:57 PM, Danny YUE wrote: > 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. >