help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's your favourite *under_publicized* editing feature of Emacs?


From: Perry Smith
Subject: Re: What's your favourite *under_publicized* editing feature of Emacs?
Date: Thu, 17 Feb 2011 07:43:54 -0600


On Feb 17, 2011, at 4:53 AM, Giorgos Keramidas wrote:

On Sat, 29 Jan 2011 09:02:14 -0600, Perry Smith <pedzsan@gmail.com> wrote:
This thread is beginning to drift a bit... but something I wish I had
was a way to view a file without loading all of it.  I look at hugh
trace files and I have to get out of emacs and start a shell so I can
use more / less.

The shame of it all! ;-)

I don't know of such a critter.  If there is one, that would be super
cool.

If there was some way to lazy-load files, I'd be happy too.

I looked at this.  The approach I was going to take was to put into the C code
an "open", "close", "read", and "lseek" concept and that would need a new
"type" for a file descriptor.  You might as well add "write" to complete the set.
There is nothing currently like that in the C code.  I'm not sure if you want
to put this on top of open and its siblings or on top of fopen and let the C
I/O help some with the buffering.

From there, it becomes a matter of writing lisp to load in a "page" into a
buffer so it can be displayed and then a key map so the user can page
forward and backward.  For searches I couldn't come up with a nice
solution so I was just going to loop loading a page and searching the page
until the match was found.

The second generation of this could have a fixed sized cache of pages so that
small movements (like back a page) would be instant and you could even
get fancier and pre-fetch the next page.

This could grow into a hugh beast.  You would want to hook up to the
character set things so that it would detect and process all the different
characters sets (like UTF-8, etc) properly.  And then, what the hell, you
might as well plop the nifty coloring modes on top as well so that
as you page through C text, it would be colored.  In my case, I want to
plop a wireshark mode on top so that I can view network packets.

But, for my own personal case, I have way too many projects going already
so I didn't even post this to the list until just now.  I think its a concept
whose time has come but I don't have the time right now.  I'd love to
contribute to it if anyone wants to start.

Perry


reply via email to

[Prev in Thread] Current Thread [Next in Thread]