From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: emacs C++ auto code completion problem Date: Tue, 26 May 2009 17:55:18 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243356084 25687 80.91.229.12 (26 May 2009 16:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2009 16:41:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 26 18:41:17 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M8ziE-00008C-T9 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 18:41:15 +0200 Original-Received: from localhost ([127.0.0.1]:52554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8ziE-0001VE-2m for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 12:41:14 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!feeder.motzarella.org!news.motzarella.org!news.eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-X-Trace: news.eternal-september.org U2FsdGVkX18ldwUJag6mTf0AAEhsULlXu9gGmZJupQqbIOFThelrSlCX7jHpaB2apdrwdCwQUb4gKGgFKfS4Z0WjZDPOhl5xg5fVbv7nIXUCuCjf8R0m6vifW/B7SG/UAmZvoFvsio4FCK9nEFV7kQ== Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Tue, 26 May 2009 15:55:21 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19Z9MDoBClCK/01xt/+5mEFwrp6yMWhM6CJY45wkLiTGw== Cancel-Lock: sha1:SZYdto1V4qSaj71lpg5E4BmqbtA= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:169501 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64734 Archived-At: GMS S writes: > Hi, > The C++ auto code completion is not working with emacs. > Reading this http://cedet.sourceforge.net/setup.shtml > > make EMACS=emacs > > And added in .emacs file > > (load-file "~/cedet-1.0pre6/common/cedet.el") > (global-ede-mode 1) ; Enable the Project management system > (semantic-load-enable-code-helpers) ; Enable prototype help and smart completion > (global-srecode-minor-mode 1) ; Enable template insertion menu > > But it is not working. > If I run a .cpp file with emacs and after typing dot(.) no menu is shown. > > Would someone please tell where is the mistake? > > > > > > > Did you read http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html ? Specifically ,---- | (defun my-c-mode-cedet-hook () | (local-set-key "." 'semantic-complete-self-insert) | (local-set-key ">" 'semantic-complete-self-insert)) | (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook) `---- I used company-mode as it has far better search and context help for completion candidates. To use the semantic functions simply comment out the "(company-mode 1") in the my-cedet-hook in the code below. My own set up is here: http://richardriley.net/projects/emacs/dotprogramming#sec-1.1 But borrowed heavily from Alex Ott's excellent article (I struggle with the CEDET docs as they cover an awful lot of things I haven't a clue about!). Company mode: http://nschum.de/src/emacs/company-mode/