all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* view/edit large files (was: map-file-lines)
@ 2009-02-07  3:44 MON KEY
  2009-02-08  4:34 ` Bob Rogers
  0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2009-02-07  3:44 UTC (permalink / raw)
  To: tzz; +Cc: emacs-devel

> [1] I still can't think of a better term than "window."
> large-file-window is too verbose.  boffset?  byte-offset?
> virtual-buffer?

off-slice
slice-off
virtual-slice

s_P




^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: map-file-lines
@ 2009-02-04 15:38 Ted Zlatanov
  2009-02-05  5:40 ` map-file-lines Richard M Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2009-02-04 15:38 UTC (permalink / raw)
  To: emacs-devel

On Wed, 04 Feb 2009 02:04:32 -0500 Richard M Stallman <rms@gnu.org> wrote: 

RMS> Here's an idea for a UI for editing big files.  First you run M-x grep on
RMS> the file, and display the matches for whatever regexp.  In the *grep*
RMS> buffer you specify a region, which is a way of choosing two matches,
RMS> the ones whose entries contain point and mark.  Then you give a command to edit
RMS> the file from one of the matches to the other.  It marks these matches
RMS> (and the lines containing them) as read-only so that you can't
RMS> spoil the correspondance with the file.  Thus, you can always save this
RMS> partial-file buffer.

RMS> The beginning and end of the *grep* buffer can be used to specify
RMS> that the portion to edit starts or ends at bof or eof.

RMS> It would be easy to adapt this to variants such as
RMS> (1) using hexl-mode to visit the file,
RMS> (2) using methods other than grep to subdivide the file,
RMS> (3) providing more friendly front ends to grep.

This is essentially mapping byte offsets to line positions, with extra
calculations.  As Stefan suggested, it's better to just use byte
offsets.  Your approach requires a lot of tracking of the grep lines,
whereas just using byte offsets requires remembering the two current
offsets and nothing else.  

Otherwise I think your suggestions are similar to mine: set up a special
mode where the buffer is a window[1] into the file instead of the whole
file, and create special commands to move the window back and forth.

Saving would only save the buffer contents; the window won't be moveable
until changes are saved (another approach is to remember modifications
outside the window, but that gets hairy with undo).

Ted

[1] I know "window" has meaning in Emacs already, but I can't think of a
better term.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-09 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07  3:44 view/edit large files (was: map-file-lines) MON KEY
2009-02-08  4:34 ` Bob Rogers
2009-02-09 19:44   ` view/edit large files Thien-Thi Nguyen
  -- strict thread matches above, loose matches on Subject: below --
2009-02-04 15:38 map-file-lines Ted Zlatanov
2009-02-05  5:40 ` map-file-lines Richard M Stallman
2009-02-06 18:42   ` view/edit large files (was: map-file-lines) Ted Zlatanov
2009-02-07  9:14     ` Richard M Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.