From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: igrep on remote files with tramp? Date: Wed, 03 Aug 2005 10:10:16 +0200 Message-ID: References: <0001HW.BF12DC880234B350F0305550@news.ispnetbilling.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123060300 3254 80.91.229.2 (3 Aug 2005 09:11:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2005 09:11:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 11:11:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E0FGM-0004Ag-8P for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Aug 2005 11:10:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0FJ6-00031v-5M for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Aug 2005 05:13:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E0EuL-00065U-Va for help-gnu-emacs@gnu.org; Wed, 03 Aug 2005 04:47:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E0Eu6-0005e0-7l for help-gnu-emacs@gnu.org; Wed, 03 Aug 2005 04:47:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0Ejg-000432-Vh for help-gnu-emacs@gnu.org; Wed, 03 Aug 2005 04:36:25 -0400 Original-Received: from [194.113.59.95] (helo=mailrelay1.alcatel.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E0EWz-0007Q2-Ne for help-gnu-emacs@gnu.org; Wed, 03 Aug 2005 04:23:18 -0400 Original-Received: from slbwba.alcatel.de (slbwba.bln.sel.alcatel.de [149.204.93.70]) by mailrelay1.alcatel.de (8.12.10/8.12.10/ICT TSC MAIL 2005) with ESMTP id j738AHRB008384; Wed, 3 Aug 2005 10:10:17 +0200 Original-To: Kevin Rodgers In-Reply-To: (Kevin Rodgers's message of "Tue, 02 Aug 2005 14:35:13 -0600") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (hpux) X-Scanned-By: MIMEDefang 2.49 on 149.204.45.72 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28379 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28379 Kevin Rodgers writes: > > Can't a local igrep be run on the local tmp files that get used for so > > many other purposes? > > I don't know how tramp works, but ange-ftp evidently does not leave the > local tmp files on disk once their contents have been inserted into the > buffer. So does Tramp. > > In any case, being able to run remote processes with tramp would be > great. > > It turns out that ange-ftp provides file name handlers for > shell-command, which uses remote-shell-program (e.g. /bin/remsh) to > execute the command on the other host when visiting a remote file or > directory. So I would be suprised if tramp does not provide the same > functionality when you use e.g. `! grep foo *.java'. So does Tramp. > But igrep and grep are based on compile, which uses start-process > instead of shell-command. But since tramp provides commands for > compilation of files on remote hosts (see > http://www.gnu.org/software/tramp/#Compilation), perhaps tramp-util.el > just needs something like this (cribbed from tramp-compile): [...] It could go this way. But as I wrote already, it would be an endless task to provide such Tramp pendants for all usefull commands. Therefore it won't be done inside main Tramp development (except the integration of `compile', which already exists). Instead of I hope to convince the emacs-devel list to extend `call-process' and `start-process' supporting something like file handlers. There was already a step into that direction with `process-file', which should act like `call-process' on remote hosts. But this approach is not sufficient I fear. > > I've frequently wished I could do this with gdb within emacs, for > instance. > > You are not alone. That will be the proof of concept (prototype implementation). If it doesn't work for gdb out of the box, the concept is not worth to be applied. Best regards, Michael.