From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Note on 109327 Date: Tue, 31 Jul 2012 21:42:44 +0400 Message-ID: <50181914.4030503@yandex.ru> References: <5017D1D4.2050601@yandex.ru> <83wr1jeua9.fsf@gnu.org> 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 1343756575 3259 80.91.229.3 (31 Jul 2012 17:42:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2012 17:42:55 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 31 19:42:55 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 1SwGT8-0006w7-US for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2012 19:42:55 +0200 Original-Received: from localhost ([::1]:40223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGT8-0004LQ-9W for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2012 13:42:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGT5-0004LA-Gp for emacs-devel@gnu.org; Tue, 31 Jul 2012 13:42:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwGT4-0005Ne-Iw for emacs-devel@gnu.org; Tue, 31 Jul 2012 13:42:51 -0400 Original-Received: from forward2.mail.yandex.net ([77.88.46.7]:43019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGT2-0005N9-Rj; Tue, 31 Jul 2012 13:42:49 -0400 Original-Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward2.mail.yandex.net (Yandex) with ESMTP id EBFFE12A196F; Tue, 31 Jul 2012 21:42:46 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343756567; bh=vHKUv/8yP9qiP+VTAXaycNAwE8J9udOyZYDI2E98u9w=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=bX9qlMa2PFSDaatDZFzk7mTRAKb1g8zjwpLJJwyzOcXZJ0JtHU4eDu3LO+pelqXvZ CnE8Q+6NDqNeCObXpVj57YcMDkRcllApKQkKV8vayrKjbPkecJOY9YD8NxbvXeocP/ SyUS4iYF/9H0Pc84Mm21zhbFdtguCfMFPBg61v4Q= Original-Received: from smtp2.mail.yandex.net (localhost [127.0.0.1]) by smtp2.mail.yandex.net (Yandex) with ESMTP id BC1BEE20013; Tue, 31 Jul 2012 21:42:46 +0400 (MSK) Original-Received: from 155.gprs.mts.ru (155.gprs.mts.ru [213.87.130.155]) by smtp2.mail.yandex.net (nwsmtp/Yandex) with ESMTP id giJ4VMbk-gkJK6u1F; Tue, 31 Jul 2012 21:42:46 +0400 X-Yandex-Rcpt-Suid: eliz@gnu.org X-Yandex-Rcpt-Suid: lekktu@gmail.com X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343756566; bh=vHKUv/8yP9qiP+VTAXaycNAwE8J9udOyZYDI2E98u9w=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=BHS70bH+VEIjymx6ceSfie3hdsf7IhPounBFlpvdVKwE/LRNURpf9sBM6IiTyjvoD RDziwsKeWjEBivpZms/QCtun4vr3urGv6ZpSDwszWwCfHtmEyk4N/bbTUIj23YH0rb Nxr3y4WISMGJo13oluiaGhgmm8paId2pDT2k1Hfo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <83wr1jeua9.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.46.7 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:152016 Archived-At: On 07/31/2012 09:04 PM, Eli Zaretskii wrote: > This problem, however, is more serious, IMO: > > gcc -I. -c -gdwarf-2 -g3 -DEMACSDEBUG -fno-crossjumping -Id:/usr/include/libxml2 -DGLYPH_DEBUG=1 -Demacs=1 -I../lib -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o oo/i386/w32menu.o w32menu.c > w32menu.c: In function `w32_menu_show': > w32menu.c:857: error: structure has no member named `title_' > makefile:322: recipe for target `oo/i386/w32menu.o' failed > make[1]: *** [oo/i386/w32menu.o] Error 1 > > AFAIU, it means that coccinelle made an incorrect replacement. Yes, it's not a silver bullet (yet). And, of course, I'm not a heavily experienced user. > I fixed both of these in revision 109332. Thanks. > 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, so, I'm thinking about GCC plugin. 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. Dmitry