From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric M. Ludlam" Newsgroups: gmane.emacs.devel Subject: Re: Refactoring in Emacs : CEDET Date: Wed, 01 Aug 2012 07:41:24 -0400 Message-ID: <501915E4.8080002@siege-engine.com> References: <5017D1D4.2050601@yandex.ru> <83wr1jeua9.fsf@gnu.org> <50181914.4030503@yandex.ru> <83pq7berfa.fsf@gnu.org> <5018AD37.1000509@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343821301 13814 80.91.229.3 (1 Aug 2012 11:41:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2012 11:41:41 +0000 (UTC) Cc: Eli Zaretskii , joakim@verona.se, emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 13:41:39 2012 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 1SwXJ0-0003yD-J5 for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2012 13:41:34 +0200 Original-Received: from localhost ([::1]:37959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXIz-00084R-VG for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2012 07:41:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXIx-00084M-W6 for emacs-devel@gnu.org; Wed, 01 Aug 2012 07:41:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwXIw-0000vn-Ui for emacs-devel@gnu.org; Wed, 01 Aug 2012 07:41:31 -0400 Original-Received: from mail-vc0-f169.google.com ([209.85.220.169]:61856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXIu-0000uV-5E; Wed, 01 Aug 2012 07:41:28 -0400 Original-Received: by vcbfl10 with SMTP id fl10so7829029vcb.0 for ; Wed, 01 Aug 2012 04:41:27 -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=7tZaa9v6GEHSQc/eUkjP85cbikgQ1A4kiiBbBhLiNYQ=; b=hWhGaJFZNmlSp1juncN7Y+UkBsB9P2X7YsnqO3ClOFDux+k4fabvOx1X9CYbK/2jEQ 82jYJ2mIDZ45xQ/0AAYumbegDO3wqvziQgO2s6YkVM4i9yi3WwFfjmPG/cEDPqTQIj42 Vi9k1y0AKQ+L0KOhVpAKYsbmgbk0UBnktsukK5Rvyqb1RR8kKvGQF9qEPzEou8WlRryM gtpnh5vD8OLHbZNUYgVJ0CofFjkNjM1iMtRZUsIvxcOy74+5radWlzYZhorHSy1LNwu2 FBZKZMdxfXBv64ecL/MQvF7xcHtrhQOrl2M+GaW4OmxeddVlGD/lHzcqBd9JfuTlrrQM 0BHQ== Original-Received: by 10.220.153.200 with SMTP id l8mr16756483vcw.40.1343821287207; Wed, 01 Aug 2012 04:41:27 -0700 (PDT) Original-Received: from [192.168.1.201] (pool-71-184-213-253.bstnma.fios.verizon.net. [71.184.213.253]) by mx.google.com with ESMTPS id w11sm2541529vdt.16.2012.08.01.04.41.25 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 04:41:26 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre In-Reply-To: <5018AD37.1000509@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.169 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:152068 Archived-At: On 08/01/2012 12:14 AM, Dmitry Antipov wrote: > On 07/31/2012 10:06 PM, Eli Zaretskii wrote: > >>> IIUC real refactoring of C should imply preprocessing and full >>> syntactic analysis >> >> Why is that? Can you give a couple of examples? > Hi, I missed earlier parts of this thread, so am replying a bit late. In CEDET, the function 'semantic-symref-symbol' uses the C parser built into semantic, plus external tools like GNU Global, or just plain grep to find symbols. The list buffer that shows all the hits is also a refactoring mode. You can select which hits are correct, and do mass renames. It also has a fancy way to create a keyboard macro that it will apply to all the hits. I'm describing the state of things in the CEDET bzr repository. I don't recall what state this mode was in when CEDET was last merged into Emacs. The symref functions certainly has some limitations as it tends to stick to symbols defined by the user, and the code to handle polymorphism hasn't been written yet, but those could be overcome if there was sufficient interest. Eric