emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vlf b62bc04 301/310: Issue 31 Make vlf-batch-size confi


From: Stefan Monnier
Subject: [elpa] externals/vlf b62bc04 301/310: Issue 31 Make vlf-batch-size configurable in the remote case
Date: Sat, 28 Nov 2020 00:33:36 -0500 (EST)

branch: externals/vlf
commit b62bc046128df83c816a9b199ab5b4a7fcf93837
Author: Dan Harms <dan.harms@xrtrading.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Issue 31 Make vlf-batch-size configurable in the remote case
---
 vlf.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/vlf.el b/vlf.el
index e695c2c..5d6fcb0 100644
--- a/vlf.el
+++ b/vlf.el
@@ -53,6 +53,10 @@ One argument is supplied that specifies current action.  
Possible
 values are: `write', `ediff', `occur', `search', `goto-line'."
   :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)
 
 (autoload 'vlf-write "vlf-write" "Write current chunk to file." t)
@@ -172,8 +176,10 @@ Return newly created buffer."
     (set-buffer vlf-buffer)
     (set-visited-file-name file)
     (set-buffer-modified-p nil)
-    (if (or minimal (file-remote-p file))
-        (set (make-local-variable 'vlf-batch-size) 1024))
+    (cond (minimal
+           (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)
     (when minimal                 ;restore batch size to default value
       (kill-local-variable 'vlf-batch-size)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]