From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Les Harris Newsgroups: gmane.emacs.help Subject: Semantic & Autocomplete Usage Date: Tue, 27 Jan 2009 00:44:27 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233049265 5792 80.91.229.12 (27 Jan 2009 09:41:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2009 09:41:05 +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 Jan 27 10:42:19 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 1LRkSG-0005cA-U3 for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Jan 2009 10:42:01 +0100 Original-Received: from localhost ([127.0.0.1]:45918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRkQy-0001PP-SL for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Jan 2009 04:40:40 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 27 Jan 2009 02:44:26 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Lines: 57 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-LetyQA5atqKmZlNXdgl34Eng0iQ38rK48KpKFVKybXFpOSJ+VYo68XFlbxTwjNaU6/TrqzqpZcngEj6!OhZVf0n9L8g4FZDpUSaxhxYBKLgU18ujEH8BO6zm2BxbITWmX9xZC8ZMus6RkQkX91RDp+BBL4H4 Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:166362 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:61688 Archived-At: Does anyone have any experience using AutoComplete.el (http://www.emacswiki.org/emacs/AutoComplete) with semantic as a source? I am also using Auto-Complete-Extension.el (http://www.emacswiki.org/cgi-bin/emacs/auto-complete-extension.el) which provides among other things ac-source-semantic. My configuration in .emacs: (require 'auto-complete) (require 'auto-complete-extension) ; Provides ac-source-semantic (global-auto-complete-mode t) (define-key ac-complete-mode-map "\C-\M-n" 'ac-next) (define-key ac-complete-mode-map "\C-\M-p" 'ac-previous) (define-key ac-complete-mode-map "\t" 'ac-expand) (define-key ac-complete-mode-map "\r" 'ac-complete) (add-hook 'c-mode-common-hook '(lambda () (c-toggle-auto-state 1) (linum-mode) (set (make-local-variable 'ac-sources) (append '(ac-source-semantic))) ; (set (make-local-variable 'ac-candidate-function) (append 'ac-semantic-candidate)) )) It apparently does nothing :) When I uncomment the ac-candidate-function line I get a syntax error: Error in post-command-hook: (wrong-number-of-arguments (lambda (prefix) (if (memq major-mode (quote (c-mode c++-mode jde-mode java-mode))) (prog1 (mapcar (quote semantic-tag-name) (ignore-errors (or (semantic-ia-get-completions (semantic-analyze-current-context) (point)) (senator-find-tag-for-completion (regexp-quote prefix)))))))) 0) Which is from auto-complete-extension.el. Doesn't inspire confidence. If I try running something like semantic-analyze-possible-completions on the following: pMyObject-> It will correctly list the members of that struct so I am confidant semantic itself is working correctly. So I'm stuck. Anyone help at all would be very appreciated. Thanks! -- Do they only stand By ignorance, is that their happy state, The proof of their obedience and their faith?