[elpa] master updated (0142fa0 -> c84996e)
m00natic pushed a change to branch master. from 0142fa0 Prefer defalias to fset new e2cef67 packages/vlf: [tyny fix] Fix cursor position after search new c8b2bdf packages/vlf: [tyny change] Make vlf-batch-size configurable in the remote case, make mode-line batch indicators more accurate. new 0de88f4 packages/vlf: Fix issue where tramp-verbose is bound to nil. new d11ce00 packages/vlf: Explicitly set coding-system-for-read to the current coding when not inserting from the beginning. new c84996e packages/vlf: Update copyright dates and bump version. Summary of changes: packages/vlf/vlf-base.el | 20 +--- packages/vlf/vlf-ediff.el | 5 +++-- packages/vlf/vlf-follow.el | 2 +- packages/vlf/vlf-occur.el | 5 +++-- packages/vlf/vlf-search.el | 12 +++- packages/vlf/vlf-setup.el | 2 +- packages/vlf/vlf-tune.el | 2 +- packages/vlf/vlf-write.el | 2 +- packages/vlf/vlf.el| 20 +--- 9 files changed, 43 insertions(+), 27 deletions(-)
[elpa] master 0de88f4 3/5: packages/vlf: Fix issue where tramp-verbose is bound to nil.
branch: master commit 0de88f408f512b80dacb09b4eab8dd7c6be78528 Author: Andrey Kotlarski Commit: Andrey Kotlarski packages/vlf: Fix issue where tramp-verbose is bound to nil. --- packages/vlf/vlf-ediff.el | 3 ++- packages/vlf/vlf-occur.el | 3 ++- packages/vlf/vlf-search.el | 6 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/vlf/vlf-ediff.el b/packages/vlf/vlf-ediff.el index e168cf9..2a861e7 100644 --- a/packages/vlf/vlf-ediff.el +++ b/packages/vlf/vlf-ediff.el @@ -170,7 +170,8 @@ logical chunks in case there is no difference at the current ones." (setq buffer-B (current-buffer) min-file-size (min min-file-size vlf-file-size) is-hexl (or is-hexl (derived-mode-p 'hexl-mode))) -(let ((tramp-verbose (if (boundp 'tramp-verbose) +(let ((tramp-verbose (if (and (boundp 'tramp-verbose) + tramp-verbose) (min tramp-verbose 1))) (end-B (= vlf-start-pos vlf-end-pos)) (chunk-B (cons vlf-start-pos vlf-end-pos)) diff --git a/packages/vlf/vlf-occur.el b/packages/vlf/vlf-occur.el index 71d1628..dd3fa38 100644 --- a/packages/vlf/vlf-occur.el +++ b/packages/vlf/vlf-occur.el @@ -206,7 +206,8 @@ Prematurely ending indexing will still show what's found so far." (defun vlf-build-occur (regexp vlf-buffer) "Build occur style index for REGEXP over VLF-BUFFER." - (let* ((tramp-verbose (if (boundp 'tramp-verbose) + (let* ((tramp-verbose (if (and (boundp 'tramp-verbose) + tramp-verbose) (min tramp-verbose 1))) (case-fold-search t) (line 1) diff --git a/packages/vlf/vlf-search.el b/packages/vlf/vlf-search.el index 1793ade..0268ee6 100644 --- a/packages/vlf/vlf-search.el +++ b/packages/vlf/vlf-search.el @@ -48,7 +48,8 @@ Return t if search has been at least partially successful." vlf-start-pos) vlf-file-size))) (or time (setq time (float-time))) - (let* ((tramp-verbose (if (boundp 'tramp-verbose) + (let* ((tramp-verbose (if (and (boundp 'tramp-verbose) + tramp-verbose) (min tramp-verbose 1))) (case-fold-search t) (match-chunk-start vlf-start-pos) @@ -215,7 +216,8 @@ Search is performed chunk by chunk in `vlf-batch-size' memory." (vlf-goto-line-hexl n) (run-hook-with-args 'vlf-before-batch-functions 'goto-line) (vlf-verify-size) -(let ((tramp-verbose (if (boundp 'tramp-verbose) +(let ((tramp-verbose (if (and (boundp 'tramp-verbose) + tramp-verbose) (min tramp-verbose 1))) (start-pos vlf-start-pos) (end-pos vlf-end-pos)
[elpa] master c84996e 5/5: packages/vlf: Update copyright dates and bump version.
branch: master commit c84996e0f9a3c297894626e779b7209c7f0d0fab Author: Andrey Kotlarski Commit: Andrey Kotlarski packages/vlf: Update copyright dates and bump version. --- packages/vlf/vlf-ediff.el | 2 +- packages/vlf/vlf-follow.el | 2 +- packages/vlf/vlf-occur.el | 2 +- packages/vlf/vlf-search.el | 2 +- packages/vlf/vlf-setup.el | 2 +- packages/vlf/vlf-tune.el | 2 +- packages/vlf/vlf-write.el | 2 +- packages/vlf/vlf.el| 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/vlf/vlf-ediff.el b/packages/vlf/vlf-ediff.el index 2a861e7..a28e24e 100644 --- a/packages/vlf/vlf-ediff.el +++ b/packages/vlf/vlf-ediff.el @@ -1,6 +1,6 @@ ;;; vlf-ediff.el --- VLF ediff functionality -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, compare, ediff ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-follow.el b/packages/vlf/vlf-follow.el index 2b825da..52f35cd 100644 --- a/packages/vlf/vlf-follow.el +++ b/packages/vlf/vlf-follow.el @@ -1,6 +1,6 @@ ;;; vlf-follow.el --- VLF chunk follows point functionality -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, follow, recenter ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-occur.el b/packages/vlf/vlf-occur.el index dd3fa38..717513e 100644 --- a/packages/vlf/vlf-occur.el +++ b/packages/vlf/vlf-occur.el @@ -1,6 +1,6 @@ ;;; vlf-occur.el --- Occur-like functionality for VLF -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, indexing, occur ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-search.el b/packages/vlf/vlf-search.el index 0268ee6..2cf4450 100644 --- a/packages/vlf/vlf-search.el +++ b/packages/vlf/vlf-search.el @@ -1,6 +1,6 @@ ;;; vlf-search.el --- Search functionality for VLF -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, search ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-setup.el b/packages/vlf/vlf-setup.el index 8ce7dad..aa061d0 100644 --- a/packages/vlf/vlf-setup.el +++ b/packages/vlf/vlf-setup.el @@ -1,6 +1,6 @@ ;;; vlf-setup.el --- VLF integration with other packages -*- lexical-binding: t -*- -;; Copyright (C) 2014-2015 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, integration ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-tune.el b/packages/vlf/vlf-tune.el index 71e3d5f..566f2d6 100644 --- a/packages/vlf/vlf-tune.el +++ b/packages/vlf/vlf-tune.el @@ -1,6 +1,6 @@ ;;; vlf-tune.el --- VLF tuning operations -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, batch size, performance ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf-write.el b/packages/vlf/vlf-write.el index ae1eda6..d5c87d5 100644 --- a/packages/vlf/vlf-write.el +++ b/packages/vlf/vlf-write.el @@ -1,6 +1,6 @@ ;;; vlf-write.el --- Saving functionality for VLF -*- lexical-binding: t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, saving ;; Author: Andrey Kotlarski diff --git a/packages/vlf/vlf.el b/packages/vlf/vlf.el index 65c08af..adb1f43 100644 --- a/packages/vlf/vlf.el +++ b/packages/vlf/vlf.el @@ -1,13 +1,13 @@ ;;; vlf.el --- View Large Files -*- lexical-binding: t -*- -;; Copyright (C) 2006, 2012-2015 Free Software Foundation, Inc. +;; Copyright (C) 2006, 2012-2017 Free Software Foundation, Inc. -;; Version: 1.7 +;; Version: 1.7.1 ;; Keywords: large files, utilities ;; Maintainer: Andrey Kotlarski ;; Authors: 2006 Mathias Dahl ;; 2012 Sam Steingold -;; 2013-2015 Andrey Kotlarski +;; 2013-2017 Andrey Kotlarski ;; URL: https://github.com/m00natic/vlfi ;; This file is free software; you can redistribute it and/or modify
[elpa] master e2cef67 1/5: packages/vlf: [tyny fix] Fix cursor position after search
branch: master commit e2cef67bf05f35b033c19820adb17d0ca86255c0 Author: Nil Geisweiller Commit: Andrey Kotlarski packages/vlf: [tyny fix] Fix cursor position after search After searching forward (resp. backward) the cursor should be at the end (resp. the beginning) of the match. That way one can jump to the next match by running again the command. --- packages/vlf/vlf-search.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vlf/vlf-search.el b/packages/vlf/vlf-search.el index f797378..1793ade 100644 --- a/packages/vlf/vlf-search.el +++ b/packages/vlf/vlf-search.el @@ -139,10 +139,10 @@ Return t if search has been at least partially successful." (let ((result (if backward (vlf-goto-match match-chunk-start match-chunk-end - match-end-pos match-start-pos + match-start-pos match-end-pos count to-find time highlight) (vlf-goto-match match-chunk-start match-chunk-end -match-start-pos match-end-pos +match-end-pos match-start-pos count to-find time highlight (run-hook-with-args 'vlf-after-batch-functions 'search) result)
[elpa] master c8b2bdf 2/5: packages/vlf: [tyny change] Make vlf-batch-size configurable in the
branch: master commit c8b2bdf33f8d279ba8b5cd2cb0de3f6b410e7dcf Author: Dan Harms Commit: Andrey Kotlarski packages/vlf: [tyny change] Make vlf-batch-size configurable in the remote case, make mode-line batch indicators more accurate. --- packages/vlf/vlf.el | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/vlf/vlf.el b/packages/vlf/vlf.el index e695c2c..65c08af 100644 --- a/packages/vlf/vlf.el +++ b/packages/vlf/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) @@ -105,8 +109,8 @@ values are: `write', `ediff', `occur', `search', `goto-line'." "Mode to browse large files in." :group 'vlf :keymap vlf-prefix-map :lighter (:eval (format " VLF[%d/%d](%s)" - (/ vlf-end-pos vlf-batch-size) - (/ vlf-file-size vlf-batch-size) + (ceiling vlf-end-pos vlf-batch-size) + (ceiling vlf-file-size vlf-batch-size) (file-size-human-readable vlf-file-size))) (cond (vlf-mode (set (make-local-variable 'require-final-newline) nil) @@ -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)
[elpa] master d11ce00 4/5: packages/vlf: Explicitly set coding-system-for-read to the current
branch: master commit d11ce0013fed5295b2bd3216680beb04545bd6aa Author: Andrey Kotlarski Commit: Andrey Kotlarski packages/vlf: Explicitly set coding-system-for-read to the current coding when not inserting from the beginning. --- packages/vlf/vlf-base.el | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/vlf/vlf-base.el b/packages/vlf/vlf-base.el index 701506d..1c1c8e2 100644 --- a/packages/vlf/vlf-base.el +++ b/packages/vlf/vlf-base.el @@ -1,6 +1,6 @@ ;;; vlf-base.el --- VLF primitive operations -*- lexical-binding: t -*- -;; Copyright (C) 2014-2015 Free Software Foundation, Inc. +;; Copyright (C) 2014-2017 Free Software Foundation, Inc. ;; Keywords: large files, chunk ;; Author: Andrey Kotlarski @@ -270,9 +270,11 @@ to the beginning, ADJUST-END - append to the end. Use buffer POSITION as start if given. Return number of bytes moved back for proper decoding and number of bytes added to the end." - (setq adjust-start (and adjust-start (not (zerop start))) -adjust-end (and adjust-end (/= end vlf-file-size)) + (setq adjust-end (and adjust-end (/= end vlf-file-size)) position (or position (point-min))) + (and adjust-start (<= start 4) + (setq adjust-start nil + start 0)) (goto-char position) (let ((shift-start 0) (shift-end 0) @@ -294,7 +296,10 @@ bytes added to the end." (defun vlf-insert-file-contents-1 (start end) "Extract decoded file bytes START to END." - (vlf-tune-insert-file-contents start end)) + (if (zerop start) + (vlf-tune-insert-file-contents start end) +(let ((coding-system-for-read buffer-file-coding-system)) + (vlf-tune-insert-file-contents start end (defun vlf-adjust-start (start end position adjust-end) "Adjust chunk beginning at absolute START to END till content can\ @@ -307,9 +312,10 @@ Return number of bytes moved back for proper decoding." (strict (or (= sample-end vlf-file-size) (and (not adjust-end) (= sample-end end (shift 0)) -(while (and (progn (insert-file-contents buffer-file-name - nil safe-start sample-end) - (not (zerop safe-start))) +(while (and (let ((coding-system-for-read buffer-file-coding-system)) + (insert-file-contents buffer-file-name +nil safe-start sample-end) + (not (zerop safe-start))) (< shift 3) (let ((diff (- chunk-size (length