[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intelligently opening large files in emacs
From: |
Jambunathan K |
Subject: |
Re: Intelligently opening large files in emacs |
Date: |
Tue, 18 Mar 2014 20:35:36 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Dushyant Juneja <juneja.dushyant@gmail.com> writes:
> My question hence is, is there a way to integrate find-file-literally
> in a way that emacs automatically opens large files using this
> function, and the smaller files using the usual find-file. Please help
> me if such is possible.
Feel free to steal from the snippet below. (Remember to alter 1e3 apart
from other things).
(defun my-find-file (filename)
(interactive "fFile name:")
(let ((size-in-bytes (nth 7 (file-attributes filename))))
(if (< size-in-bytes 1e3)
(find-file-literally filename)
(vlf filename))))
Re: Intelligently opening large files in emacs, Stefan, 2014/03/18