From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: Per-language project-search-path, was: Re: Unified project interface Date: Mon, 03 Aug 2015 07:33:35 -0400 Message-ID: <55BF518F.5070301@gmail.com> References: <557039DB.4060607@yandex.ru> <86zj2jb1tx.fsf@stephe-leake.org> <55B517AC.5020401@yandex.ru> <86oaiybvbf.fsf@stephe-leake.org> <55B62B53.5060003@yandex.ru> <861tftaxgx.fsf@stephe-leake.org> <55B78F49.6010101@yandex.ru> <868ua09s1y.fsf@stephe-leake.org> <55B7CD86.20306@yandex.ru> <86oaiv8zqn.fsf@stephe-leake.org> <55B9590C.3080108@yandex.ru> <86wpxi6ovl.fsf@stephe-leake.org> <55BABE27.4040105@yandex.ru> <868u9wz4mw.fsf@stephe-leake.org> <55BC1D5F.4010502@yandex.ru> <86d1z7jnl9.fsf@stephe-leake.org> <55BCD3E9.40606@yandex.ru> <55BD807B.5030206@gmail.com> <877fpef4pl.fsf@esperi.org.uk> <87oaiptxxc.fsf@web.de> <55BEA31E.6010802@gmail.com> <87mvy9uuoa.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1438601637 3540 80.91.229.3 (3 Aug 2015 11:33:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Aug 2015 11:33:57 +0000 (UTC) Cc: Nix , emacs-devel@gnu.org, Stephen Leake , Dmitry Gutov To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 03 13:33:51 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZME07-0002rj-D7 for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 13:33:51 +0200 Original-Received: from localhost ([::1]:58639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZME06-0005qr-FO for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 07:33:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMDzy-0005ou-Uu for emacs-devel@gnu.org; Mon, 03 Aug 2015 07:33:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMDzt-0006Z2-Vc for emacs-devel@gnu.org; Mon, 03 Aug 2015 07:33:42 -0400 Original-Received: from mail-vk0-x22b.google.com ([2607:f8b0:400c:c05::22b]:33333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMDzt-0006Yw-Rr for emacs-devel@gnu.org; Mon, 03 Aug 2015 07:33:37 -0400 Original-Received: by vkgc186 with SMTP id c186so41446421vkg.0 for ; Mon, 03 Aug 2015 04:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=NNmvlYtzdcW3KLYfi+R68c0swJ5FMeoaNHE7mxhnecw=; b=Zf4x39LxSqwlLg/ZQ9m9B3BtUe5Y9fgANhvwQRev3R3c5yO1ciKTq79AUoZgs+cEZH sI2DefUmqWV1YdCiZ86taOnT2jweYf9M6CKARbUx/8mUZl7FZrWZGaUrVMBtxwjX52qT clgTHTpq8Kd7NR3ySpZ9Uxu9SUFW/d4tt3n2I0JINF6q2RMwBomBzSMiIoUVbg0f+wtg xyxMAkjrrzg6eGt0wEPM9q5DNTA6K8DKdeV7ONIwpKadkf58W9+h1r44dkOePwcdeMxi YL85EW7vlPn6aIvv+90/k2Ej62PWwVCrYLpAbJy1xwDci5nxIDhRyqVEc54k93SEwJud nZfg== X-Received: by 10.52.120.18 with SMTP id ky18mr88186vdb.94.1438601617083; Mon, 03 Aug 2015 04:33:37 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-71-184-198-118.bstnma.fios.verizon.net. [71.184.198.118]) by smtp.googlemail.com with ESMTPSA id ds5sm50733vdc.3.2015.08.03.04.33.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 04:33:36 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <87mvy9uuoa.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c05::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188334 Archived-At: On 08/02/2015 07:39 PM, Michael Heerdegen wrote: > Eric Ludlam writes: > >> It may be that the specifics you are looking for are part of the local >> context parser, which includes functions such as -get-local-variables, >> -get-local-arguments, and -current-symbol, which gets the whole >> symbols in a dotted expression. This is in semantic/ctxt.el. > Thanks for the explanations. > > I gave these functions a quick try, evaluating them via M-: > (the-function), with not much luck. In Elisp, all calls always returned > nil. In a C file, I even got an error: > > Debugger entered--Lisp error: (wrong-type-argument syntax-table-p nil) > set-syntax-table(nil) > (progn (set-syntax-table semantic-lex-syntax-table) (save-excursion (cond ((looking-at "\\w\\|\\s_") > because semantic-lex-syntax-table is bound to nil which > `set-syntax-table' doesn't like. > Everything in the semantic system needs `semantic-mode' enabled. That sets up all the parsing context needed for the various tools, and keeps it up to date. There is a lot of little features needed to handle parsing, so the mode enables the hooks to get it setup as you load files, and then the tagging parser parsers you buffers, which the context parser uses to identify the outer bounds of different contexts. Once you do that, you could try 'semantic-analyze-current-context' which will give you some high level data about where point is. The local -ctxt- functions can be used to do something unrelated smart completion. Eric