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

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

Re: Reading huge files


From: Andreas Roehler
Subject: Re: Reading huge files
Date: Tue, 09 Jan 2007 21:42:11 +0100
User-agent: KNode/0.9.2

Kevin Rodgers wrote:

> Leonid Grinberg wrote:
>> I need to read a file, which contains approximately 1.2GB of
>> data. Obviously, this is well above the maximum buffer limit.
>> Is there any way for me to read it without
>> 
>> 1) breaking it up into smaller files and
>> 2) using a different editor
> 
> Not that I'm aware of.  You could cook up something like:
> 
> (defun view-large-file-contents (file beg end)
>    "View FILE contents from bytes BEG through END, in View
>    mode." (interactive "fView file: \nnFrom byte: \nnTo byte:
>    ") (switch-to-buffer
>     (generate-new-buffer (format "%s[%d,%d]"
> (file-name-nondirectory file) beg end)))
>    (insert-file-contents file nil beg end)
>    (view-mode 1))
> 
>> I am using GNU Emacs 21.4.1 on Ubuntu Edgy Eft on a Dell
>> Latitude C600 with 256MB of memory.
> 

Think it should be possible to have an ed-mode.

Until then, opening a file into `ed' from an emacs-shell
seems much more convenient than calling it from bash or
so.

__
Andreas Roehler


reply via email to

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