From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard M Stallman Newsgroups: gmane.emacs.devel Subject: Re: map-file-lines Date: Wed, 04 Feb 2009 02:04:32 -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 1233731201 2309 80.91.229.12 (4 Feb 2009 07:06:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2009 07:06:41 +0000 (UTC) Cc: tzz@lifelogs.com, joakim@verona.se, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 04 08:07:55 2009 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 1LUbrS-0001ZY-LS for ged-emacs-devel@m.gmane.org; Wed, 04 Feb 2009 08:07:50 +0100 Original-Received: from localhost ([127.0.0.1]:55385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUbq9-0000TN-J1 for ged-emacs-devel@m.gmane.org; Wed, 04 Feb 2009 02:06:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUbq5-0000TI-34 for emacs-devel@gnu.org; Wed, 04 Feb 2009 02:06:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUbq3-0000T5-Tx for emacs-devel@gnu.org; Wed, 04 Feb 2009 02:06:24 -0500 Original-Received: from [199.232.76.173] (port=36989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUbq3-0000T2-QS for emacs-devel@gnu.org; Wed, 04 Feb 2009 02:06:23 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:49950) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUbq3-0006wH-GL for emacs-devel@gnu.org; Wed, 04 Feb 2009 02:06:23 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LUboG-0001l0-OZ; Wed, 04 Feb 2009 02:04:32 -0500 In-reply-to: (message from Stefan Monnier on Tue, 03 Feb 2009 09:50:38 -0500) X-detected-operating-system: by monty-python.gnu.org: GNU/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:108717 Archived-At: Here's an idea for a UI for editing big files. First you run M-x grep on the file, and display the matches for whatever regexp. In the *grep* buffer you specify a region, which is a way of choosing two matches, the ones whose entries contain point and mark. Then you give a command to edit the file from one of the matches to the other. It marks these matches (and the lines containing them) as read-only so that you can't spoil the correspondance with the file. Thus, you can always save this partial-file buffer. The beginning and end of the *grep* buffer can be used to specify that the portion to edit starts or ends at bof or eof. It would be easy to adapt this to variants such as (1) using hexl-mode to visit the file, (2) using methods other than grep to subdivide the file, (3) providing more friendly front ends to grep.