From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gabriele Labita Newsgroups: gmane.emacs.help Subject: Semantic mode for c++ Date: Mon, 26 Jun 2017 14:34:31 +0200 Message-ID: <11d06dbd-0321-ca9a-3967-3dab2cf61b6d@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1498484111 17998 195.159.176.226 (26 Jun 2017 13:35:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 13:35:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 26 15:35:08 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 1dPUAQ-0004Fr-Qn for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 15:35:02 +0200 Original-Received: from localhost ([::1]:46756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPUAW-00018R-3u for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 09:35:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPTE0-0006w3-Q4 for help-gnu-emacs@gnu.org; Mon, 26 Jun 2017 08:34:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPTDv-00016C-SU for help-gnu-emacs@gnu.org; Mon, 26 Jun 2017 08:34:40 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:37712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPTDv-00015g-Kn for help-gnu-emacs@gnu.org; Mon, 26 Jun 2017 08:34:35 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id i127so19617wma.0 for ; Mon, 26 Jun 2017 05:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version; bh=XjOdn/t173Tul8/hQW9aPuKbClNtkbQ2rgQcmpB4iKA=; b=OfCpsUqhJhB3F8PF/KnBE29rfG0T2P29vmzUFDogAKlPWnmff35773t45hlxbdW9Au 5+NN6oVzGqZBko5g8d9+vPBc4T5hZ0MT/BhGfUSdPaM5/Oq1gR/tXP7u+3v5nIuuw346 TrU05dLiv8aAsUVcijrWWTh4Co3f9b3hwCwn1n3E+LiZU6pSW9Vn+pcB54EcW4spU/wY MlEFmNuzjIoGpq3L4JKEBgPbzUl0JKV3VDW4sJm81p46rcgGnDcICc8qqCUeQzpUgAX2 hB/RRrUNwcf23rS8icxTrwk0qvGBp2rN+QNlQin9YazJMmOocGjpRSgDKnqYnWBu/8HQ MWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=XjOdn/t173Tul8/hQW9aPuKbClNtkbQ2rgQcmpB4iKA=; b=b/8dPCx4GY/UZdj5tluJQp1aU6UhaLuelgh1DrWqJ1OcMf5vJPGQAL+p+19T1YJgdc eu8LPVrdg6zCdIUdoJyNAPPhdAwavNuZEHfv09CZdY79Ue+2RqN6P7eCkLVYLzzm92ol fq71F7n6bp9QufPJYqDP2tW+5ISMV/vaqBgDBLHYgiQNKNzY8mGetSwvgvF8QbucgTIl Q4WPuZa8a/dV8GIwvISGT0aMyR5tycmxDeIe4Oyf+bt0twB+N2JCSqVLfc5psdiG6oQi 6+herRpNHOBltZbc4bE82J4EZNRA2lnDp1MrF+3BAKFByJSC9rpznK455kkNYDSGYMZ8 Z40A== X-Gm-Message-State: AKS2vOxqXA3WjGXvHbZ8F6RW5rKaCv6e8bGcFIvLN4EWh8SIR8SOfk4j L1/wrPSczjd30LuqwsM= X-Received: by 10.28.167.205 with SMTP id q196mr10142615wme.54.1498480472707; Mon, 26 Jun 2017 05:34:32 -0700 (PDT) Original-Received: from [10.5.2.112] ([85.88.194.95]) by smtp.gmail.com with ESMTPSA id c55sm15977075wrc.7.2017.06.26.05.34.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 05:34:31 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-Mailman-Approved-At: Mon, 26 Jun 2017 09:34:34 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:113582 Archived-At: Hi, I'm trying to configure semantic module to have auto completion for c++ in emacs. I put this code on .emacs file: ``` (add-hook 'c-mode-common-hook '(lambda () (load (concat custom-config-path "custom-config-c++.el"))) ) ``` And this is my custom-config-c++.el file: ``` (add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode) (add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode) (add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode) (add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode) (add-to-list 'semantic-default-submodes 'global-semantic-show-parser-state-mode) (add-to-list 'semantic-default-submodes 'global-semantic-show-unmatched-syntax-mode) (semantic-mode 1) (require 'semantic/ia) (require 'semantic/bovine/gcc) (semanticdb-enable-gnu-global-databases 'c++-mode) (global-ede-mode t) (global-flycheck-mode t) (setq flycheck-gcc-language-standard "c++14") ;; To add library use follow command: ;; > flycheck-pkg-config ;; 70 Columns RULE (require 'whitespace) (setq whitespace-line-column 71) (setq whitespace-style '(face lines-tail)) (global-whitespace-mode +1) ``` It works well but I've a annoying problem: when I use the command: 'semantic-ia-complete-symbol' on 'std::', the semantic db is created in the .emacs.d/semanticdb/ folder. The problem is that the created db refers to c++98 instead of c++14. For example: when auto complete smart pointers, I find the "auto_ptr" suggestion and not "unique_ptr" or "shared_ptr". How can I generate the right db? More Infos: - Debian 9 amd 64 - gcc 6.3.0 - Emacs 24.5.1 - global 6.5.6