mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 20:10:47 +00:00
Add command to display batch starting from point.
This commit is contained in:
parent
d6c722376c
commit
51d95ec0a3
@ -57,6 +57,8 @@ refresh with *C-c C-v g*.
|
||||
prefix argument they move prefix number of batches. With negative -
|
||||
append prefix number of batches.
|
||||
|
||||
*C-c C-v n* displays batch starting from current point.
|
||||
|
||||
*C-c C-v [* and *C-c C-v ]* take you to the beginning and end of file
|
||||
respectively.
|
||||
|
||||
|
7
vlf.el
7
vlf.el
@ -65,6 +65,7 @@
|
||||
(map (make-sparse-keymap)))
|
||||
(define-key map [next] 'vlf-next-batch)
|
||||
(define-key map [prior] 'vlf-prev-batch)
|
||||
(define-key map "n" 'vlf-next-batch-from-point)
|
||||
(define-key map "+" 'vlf-change-batch-size)
|
||||
(define-key map "-"
|
||||
(lambda () "Decrease vlf batch size by factor of 2."
|
||||
@ -325,6 +326,12 @@ When given MINIMAL flag, skip non important operations."
|
||||
(setq start (max 0 (- end vlf-batch-size))))
|
||||
(vlf-move-to-chunk start end minimal)))
|
||||
|
||||
(defun vlf-next-batch-from-point ()
|
||||
"Display batch of file data starting from current point."
|
||||
(interactive)
|
||||
(vlf-move-to-batch (+ vlf-start-pos (position-bytes (point)) -1))
|
||||
(goto-char (point-min)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; primitive chunk operations
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user