From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: configuring irony Date: Mon, 12 Oct 2015 13:01:27 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1444680985 26938 80.91.229.3 (12 Oct 2015 20:16:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 20:16:25 +0000 (UTC) Cc: Sanjeev Sariya To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 22:16:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ZljW1-0000e1-W7 for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 22:16:14 +0200 Original-Received: from localhost ([::1]:58503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZljW1-0006gR-CP for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 16:16:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZljI7-0007iH-PP for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 16:01:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZljI3-0000fy-I8 for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 16:01:51 -0400 Original-Received: from mail-yk0-x22f.google.com ([2607:f8b0:4002:c07::22f]:34400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZljI3-0000fs-EZ for help-gnu-emacs@gnu.org; Mon, 12 Oct 2015 16:01:47 -0400 Original-Received: by ykdg206 with SMTP id g206so143858844ykd.1 for ; Mon, 12 Oct 2015 13:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ea/f2XTN44a/NreB403lJ3Nfu1XU9yRCroTXMdnA0ic=; b=pHGroq/BrO00Hu5jRckU2+q8yTHwwbtHWokQXGm92Yt6IYSQroIqjzv+VSNX2pidIE AZCAsvDj4LJ3+qWYJgIyLOWG1zcRiWZa1sw5CQ+X+Sea97Md9GhPwBOfk0lZ1siMCRCo ZsMrpSGXC/LTTCsvvaEYFlUDtuwLHH4728CblMIrrfam6TKueV0JwRoVJoUZDsjS/yjH qN1pqCVXPArMecDxatOd2BbEjG8F7c6OqQm6M+H7/IgUkI2O0CMUtP/ia8qVuV6agpv1 PciAz8WpUSoeoIBZkpGj6hpXx77C+/Vjme9axkCHEdJq9C9uGHiHnv8RxZwTr105rqOh GLuA== X-Received: by 10.129.31.69 with SMTP id f66mr22086118ywf.174.1444680106893; Mon, 12 Oct 2015 13:01:46 -0700 (PDT) Original-Received: by 10.37.214.143 with HTTP; Mon, 12 Oct 2015 13:01:27 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22f X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107596 Archived-At: Sanjeev Sariya wrote: > Hi Emacs Users, > > Apologies if this a naive query. I'm new to emacs world, and have been > trying to learn how to set up config in .emacs/init.el file for irony > package. I've installed/downloaded irony, company-irony, added their > path to my .emacs file, yet they don't work. > > https://github.com/Sarcasm/irony-mode > > My .emacs file look like: > > (add-to-list 'load-path "/Users/sariyasanjeev/.emacs.d/elpa/irony-20150831.144/") > (load "irony.el") > (require 'irony) > (add-hook 'c++-mode-hook 'irony-mode) > (add-hook 'c-mode-hook 'irony-mode) > (add-hook 'objc-mode-hook 'irony-mode) > > (add-to-list 'load-path "/Users/sariyasanjeev/.emacs.d/elpa/company-irony-20150810.239/") > (eval-after-load 'company > '(add-to-list 'company-backends 'company-irony)) > > How do I enable these? Emacs -version 24.5.1 GNU, OSX, 10.9 > Please help me. Here are a few things I noticed: - Those (add-to-list 'load-path ...) forms shouldn't be necessary and I would recommend removing them. That's part of what package.el handles for you. - I also suspect that (load "irony.el") is unnecessary - You should add this to your init file if not already present: (add-hook 'after-init-hook #'global-company-mode) - The irony-mode README mentions that it requires an external program, irony-server, which requires CMake and libclang. Have you confirmed those are installed and working? - In a later message, you mentioned attempting to invoke completion by hitting tab after typing some characters. However, that's not how company-mode is generally used. Instead, it automatically begins completion after you type a specified number of characters (see company-minimum-prefix-length). Hope that helps -- john