From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Refactoring in Emacs (was: Note on 109327) Date: Tue, 31 Jul 2012 21:06:33 +0300 Message-ID: <83pq7berfa.fsf@gnu.org> References: <5017D1D4.2050601@yandex.ru> <83wr1jeua9.fsf@gnu.org> <50181914.4030503@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1343758011 15214 80.91.229.3 (31 Jul 2012 18:06:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2012 18:06:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov , joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 31 20:06:51 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 1SwGqH-0001EI-6p for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2012 20:06:49 +0200 Original-Received: from localhost ([::1]:56472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGqG-0008Rh-EL for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2012 14:06:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGqD-0008Qf-1a for emacs-devel@gnu.org; Tue, 31 Jul 2012 14:06:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwGqB-00070j-NW for emacs-devel@gnu.org; Tue, 31 Jul 2012 14:06:44 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:36597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGqB-00070O-Dn for emacs-devel@gnu.org; Tue, 31 Jul 2012 14:06:43 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M8100500DUJ8L00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Tue, 31 Jul 2012 21:06:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M81005CBEB27D50@a-mtaout23.012.net.il>; Tue, 31 Jul 2012 21:06:38 +0300 (IDT) In-reply-to: <50181914.4030503@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:152023 Archived-At: > Date: Tue, 31 Jul 2012 21:42:44 +0400 > From: Dmitry Antipov > Cc: Juanma Barranquero , emacs-devel@gnu.org > > > Btw, can't we have in Emacs a feature that would allow such > > refactoring? The replacements don't seem too complex to me. Adding > > this to Emacs will both allow getting rid of an external tool, and be > > a valuable addition to Emacs abilities. WDYT? > > IIUC real refactoring of C should imply preprocessing and full > syntactic analysis Why is that? Can you give a couple of examples? Even if a full-fledged refactoring engine does need that, we could have a somewhat limited one that doesn't, could we? AFAICS, the refactoring you did until now were all quite simple. > so, I'm thinking about GCC plugin. Why do we need a GCC plugin? What kind of information is needed from the compiler? > Nevertheless, I suppose that it should be possible to build > simple refactoring engine on top of cc-mode, and such an engine > may provide basic features like intelligent renaming of identifiers > or tweaking function arguments. That would be very good, I think. > From: joakim@verona.se > Date: Tue, 31 Jul 2012 19:35:35 +0200 > Cc: Juanma Barranquero , dmantipov@yandex.ru, > emacs-devel@gnu.org > > http://cedet.sourceforge.net/srecode.shtml > > The idea is that the two CEDET tools, Semantic and SRecode can cooperate > to provide such features, I think. Emacs has some of both; is what we have not enough?