Open stef204 opened 6 years ago
(setq vlf-batch-size 2000 ;your preferred batch size
vlf-tune-enabled nil ;disable auto tuning so batch size stays the same
vlf-batch-size-remote 2000) ;optionally change remote file batch size, very small by default
That should do it.
Thanks.
Tried it; and it produces errors when opening file with emacsclient using:
emacsclient somelargefile.txt
(so on server buffers.)
It asks me if I want to open it with vlf (I set it up that way), and when I press "v", It seems to kill the frame and I get back to the command line prompt with "ERROR".
The file does seem to be opened by the server though: if I then just run emacsclient
(with no argument) and look at the buffers, there is one for somelargefile.txt
Here is the backtrace
Note: It does not misbehave if I open the file with client already open, using Ctrl-x Ctrl-f BUT it does trigger the debug-on-error and backtrace given above in that case.
Note: it does not misbehave if I use emacsclient -n somelargefile.txt
Thanks, I'm able to reproduce this. The problem seems to be throwing error in the abort-if-file-too-large around advice. This is done to in order to abort the normal file open procedure immediately and open with VLF instead. I'll try to find more civilized way to do this. Until then take the workaround, start emacsclient with no file argument and open the (large) file from there.
OK, I can also use emacsclient -n somelargefile.txt
for the time being.
Thanks for looking into this. Happy to test any potential fix, provide feedback, etc.
Hi, just a nudge to see if any progress on fixing this issue. Thanks.
Another nudge. I am using emacsclient almost exclusively.
In fact, emacsclient exits badly even when vlf is not installed. It asks: "really open? (y)es or (n)o or (l)iterally" Choosing either (n) or (l) will kill your shell.
So I am using a workaround: I check filesizes in bash before letting emacs open the file(s). I use this function in my .bashrc:
function e ()
{
if [[ $# -gt 0 ]] && [[ -n $(find $@ -type f -size +10M 2>/dev/null) ]]; then
emacs -nw $@;
else
emacsclient -t $@;
fi
}
version: 20180201.1454 (Emacs 26) How do I setup the batch size to a lower value than default, on a permanent basis?