Recently I have downloaded emacs on my system to edit large files as it claims. When trying opening large files, the emacs gives me a problem that buffer size is exceeded.
Is there a way to increase it?! I have a system with memory of 24 GB!
Recently I have downloaded emacs on my system to edit large files as it claims. When trying opening large files, the emacs gives me a problem that buffer size is exceeded.
Is there a way to increase it?! I have a system with memory of 24 GB!
I've never used it but vlf.el is an elisp hack to view overly large files. I believe it uses insert-file-contents
, but reads from an offset so as to do something akin to pagination.
There are some notes on the wiki but no solutions apart from vlf.el
which I've linked to above.
Type M-:(log most-positive-fixnum 2)
to see whether the return value is closer to 64 or 32. If the latter, compile or get yourself a 64-bit Emacs. Also look at M-x find-file-literally if large files cause sluggishness; it should disable some time consuming operations such as font-lock-mode
.
Are you running the 64-bit version of emacs? Check with file, you should get something like this:
$ file /usr/bin/emacs
/usr/bin/emacs: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
Why do you want to edit huge 14Gb files? I believe it is wrong to want to do that.
You don't have the human time to read all (or even most) of such a huge file. What kind of file is it? (some log file, some MySQL dump file???)
So you are searching some specific pattern inside that file. Do yourself a favor, write a script (or even a program) to do that, and to edit (if relevant) your big file where needed...
Very probably, you don't care of most of the content of that huge file. Only a few lines matter to you.
Or split the file into smaller pieces (e.g. with csplit
), and edit the relevant smaller chunks, then rebuild the huge file with cat