diff --git a/vlf-base.el b/vlf-base.el index 98b6831..e9a11bc 100644 --- a/vlf-base.el +++ b/vlf-base.el @@ -28,7 +28,7 @@ ;;; Code: (defcustom vlf-batch-size 1024 - "Defines how large each batch of file data is (in bytes)." + "Defines how large each batch of file data initially is (in bytes)." :group 'vlf :type 'integer) (put 'vlf-batch-size 'permanent-local t) @@ -108,8 +108,7 @@ bytes added to the end." 0))) (setq vlf-start-pos place vlf-end-pos place) - (if (not minimal) - (vlf-update-buffer-name)) + (or minimal (vlf-update-buffer-name)) (cons (- start place) (- place end))))) ((or (/= start vlf-start-pos) (/= end vlf-end-pos)) diff --git a/vlf-integrate.el b/vlf-integrate.el index 435ac45..aa65b76 100644 --- a/vlf-integrate.el +++ b/vlf-integrate.el @@ -29,6 +29,10 @@ (defgroup vlf nil "View Large Files in Emacs." :prefix "vlf-" :group 'files) +(defcustom vlf-batch-size 1024 + "Defines how large each batch of file data initially is (in bytes)." + :group 'vlf :type 'integer) + (defcustom vlf-application 'ask "Determines when `vlf' will be offered on opening files. Possible values are: nil to never use it; @@ -98,7 +102,8 @@ OP-TYPE specifies the file operation being performed over FILENAME." (vlf filename) (error "")) ((and large-file-warning-threshold - (< large-file-warning-threshold size)) + (< large-file-warning-threshold size) + (< vlf-batch-size size)) (if (eq vlf-application 'dont-ask) (progn (vlf filename) (error ""))