[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading huge files
From: |
Kevin Rodgers |
Subject: |
Re: Reading huge files |
Date: |
Tue, 09 Jan 2007 08:24:52 -0700 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
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.
--
Kevin Rodgers
Denver, Colorado, USA