mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 20:10:47 +00:00
Issue 31 Make vlf-batch-size configurable in the remote case
This commit is contained in:
parent
55e0c404c8
commit
b62bc04612
8
vlf.el
8
vlf.el
@ -53,6 +53,10 @@ One argument is supplied that specifies current action. Possible
|
|||||||
values are: `write', `ediff', `occur', `search', `goto-line'."
|
values are: `write', `ediff', `occur', `search', `goto-line'."
|
||||||
:group 'vlf :type 'hook)
|
:group 'vlf :type 'hook)
|
||||||
|
|
||||||
|
(defcustom vlf-batch-size-remote 1024
|
||||||
|
"Defines size (in bytes) of a batch of file data when accessed remotely."
|
||||||
|
:group 'vlf :type 'integer)
|
||||||
|
|
||||||
(defvar hexl-bits)
|
(defvar hexl-bits)
|
||||||
|
|
||||||
(autoload 'vlf-write "vlf-write" "Write current chunk to file." t)
|
(autoload 'vlf-write "vlf-write" "Write current chunk to file." t)
|
||||||
@ -172,8 +176,10 @@ Return newly created buffer."
|
|||||||
(set-buffer vlf-buffer)
|
(set-buffer vlf-buffer)
|
||||||
(set-visited-file-name file)
|
(set-visited-file-name file)
|
||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
(if (or minimal (file-remote-p file))
|
(cond (minimal
|
||||||
(set (make-local-variable 'vlf-batch-size) 1024))
|
(set (make-local-variable 'vlf-batch-size) 1024))
|
||||||
|
((file-remote-p file)
|
||||||
|
(set (make-local-variable 'vlf-batch-size) vlf-batch-size-remote)))
|
||||||
(vlf-mode 1)
|
(vlf-mode 1)
|
||||||
(when minimal ;restore batch size to default value
|
(when minimal ;restore batch size to default value
|
||||||
(kill-local-variable 'vlf-batch-size)
|
(kill-local-variable 'vlf-batch-size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user