From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Implementing Eclipse's "organize-imports" in Emacs Lisp Date: Mon, 28 Jan 2008 02:18:11 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1201504897 22143 80.91.229.12 (28 Jan 2008 07:21:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jan 2008 07:21:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: pmr@pajato.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 08:21:57 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJOJZ-0000az-8m for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2008 08:21:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJOJ8-0006YN-FV for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2008 02:21:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJOG0-00051b-Ux for emacs-devel@gnu.org; Mon, 28 Jan 2008 02:18:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJOFx-0004xr-A3 for emacs-devel@gnu.org; Mon, 28 Jan 2008 02:18:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJOFw-0004xG-O2 for emacs-devel@gnu.org; Mon, 28 Jan 2008 02:18:12 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJOFw-0002pg-Hz for emacs-devel@gnu.org; Mon, 28 Jan 2008 02:18:12 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JJOFv-0001MB-Vm; Mon, 28 Jan 2008 02:18:12 -0500 In-reply-to: (message from Paul Michael Reilly on Tue, 22 Jan 2008 05:53:12 -0500) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87691 Archived-At: One of the Eclipse features that I find indispensable is the Organize Imports feature which analyses the source file to determine if the import statements need to be pruned, augmented or modified (based on the .classpath file which is problematic since this file is an Eclipse artifact). I would dearly love to have this capability in Emacs. It seems to me that the best way to do this is by writing an external command line program to report the info. And then writing an Emacs function to run that program and display the results. Have either of the other two Java developers who use Emacs done this perchance? :-) I'm guessing not. Assuming it does not exist, I'd be inclined to create a Java application to run in the background which provides an IPC mechanism to talk to Emacs Lisp. Why make the communication so complex? Why not just fork and exec? What causes the "startup overhead"? Is it loading a large analysis program? Is it parsing and analyzing your program?