unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* view/edit large files (was: map-file-lines)
  2009-02-05  5:40 ` map-file-lines Richard M Stallman
@ 2009-02-06 18:42   ` Ted Zlatanov
  2009-02-07  9:14     ` Richard M Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2009-02-06 18:42 UTC (permalink / raw)
  To: emacs-devel

On Thu, 05 Feb 2009 00:40:40 -0500 Richard M Stallman <rms@gnu.org> wrote: 

RMS> The main point of my message is the UI proposal.  You're right that
RMS> it's good to use byte offsets.  I had not thought about that, but it
RMS> could be done by specifying the -b option for grep.

RMS> I proposed a specific UI for specifying which part of the file to
RMS> edit, one I think will be convenient.

Could you please explain, with code or text, what using your UI would
look like?  I looked over your suggestions and I still think we have the
same idea, just expressed differently.  You do seem to want `grep'
instead of dynamic offsets, but see my comments later.

Here's the "window"[1] API I'm suggesting, as a detailed list of TODO
items:

1) a buffer-local set of offset variables that indicate the beginning
and the end of the current window into the file.

2) override all write-file functions to write the buffer at the starting
offset.  I don't think there's a write-file-contents analogous to
insert-file-contents

3) override all insert-file* functions to respect the offsets as well

3) disable insertion, always in overwrite mode for better performance
(maybe allow insert at end of file...).  Force save when the "window" is
moved.

4) "window" management functions: set/get-window-offset,
set/get-window-length, etc.  These operate on the (1) buffer-local
variables.

As you can see, it requires no grep calls to pre-scan the file, and
should be consistent with the existing Emacs code.  Pre-scanning a large
file with grep can be very expensive, and it's inaccurate if the large
file is growing (e.g. a log file).

Thanks to anyone with suggestions...

Ted

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





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

* 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: view/edit large files (was: map-file-lines)
  2009-02-06 18:42   ` view/edit large files (was: map-file-lines) Ted Zlatanov
@ 2009-02-07  9:14     ` Richard M Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard M Stallman @ 2009-02-07  9:14 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

    Could you please explain, with code or text, what using your UI would
    look like?

Describe it in text is what I thought I did.
I don't have time to implement it, though.

Your API seems to be aimed at a lower level,
so the two could work together.




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

* view/edit large files (was: map-file-lines)
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Rogers @ 2009-02-08  4:34 UTC (permalink / raw)
  To: MON KEY, tzz, emacs-devel

   From: MON KEY <monkey@sandpframing.com>
   Date: Fri, 6 Feb 2009 22:44:30 -0500

   > [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

Porthole?  Aperture?  Stratum?  Zone?

					-- Bob Rogers
					   http://www.rgrjr.com/




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

* Re: view/edit large files
  2009-02-08  4:34 ` Bob Rogers
@ 2009-02-09 19:44   ` Thien-Thi Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2009-02-09 19:44 UTC (permalink / raw)
  To: emacs-devel

() Bob Rogers <rogers-emacs@rgrjr.dyndns.org>
() Sat, 7 Feb 2009 23:34:09 -0500

   Porthole?  Aperture?  Stratum?  Zone?

lima -- limited awareness/area.

thi




^ 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).