From bd82e905996182a5c34cf9127261aa3a5d93dfc0 Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 13 Sep 2022 18:24:14 +0800 Subject: [PATCH] Actually include vlf search chunking code --- config.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 3bdf0c6..2960698 100644 --- a/config.org +++ b/config.org @@ -1798,7 +1798,8 @@ To make VLF available without delaying startup, we'll just load it in quiet mome <> :config (advice-remove 'abort-if-file-too-large #'ad-Advice-abort-if-file-too-large) - <>) + <> + <>) #+end_src Now, there are one or two tweaks worth applying to VLF. For starters, it goes to @@ -1857,7 +1858,7 @@ can implement this behaviour fairly easily. (count-lines (point-min) (point-max)))) +vlf-cumulative-linenum)))) -(add-hook 'vlf-after-chunk-update-hook #'+vlf-log-poses-a) +(add-hook 'vlf-after-chunk-update-hook #'+vlf-update-linum) ;; Since this only works with absolute line numbers, let's make sure we use them. (add-hook! 'vlf-mode-hook (setq-local display-line-numbers t)) @@ -1868,6 +1869,7 @@ other than =M-x occur=. This is because trying to go to the next match at the en of a chunk usually wraps the point to the beginning of the chunk, instead of moving to the next chunk. +#+name: vlf-search-chunking #+begin_src emacs-lisp :tangle no (defun +vlf-next-chunk-or-start () (if (= vlf-file-size vlf-end-pos)