[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vlf a5fec57 090/310: Mostly documentation and commentar
From: |
Stefan Monnier |
Subject: |
[elpa] externals/vlf a5fec57 090/310: Mostly documentation and commentary added. |
Date: |
Sat, 28 Nov 2020 00:32:53 -0500 (EST) |
branch: externals/vlf
commit a5fec57e322d2655a24a8ec3dcc8ed541a426bbf
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>
Mostly documentation and commentary added.
---
vlfi.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/vlfi.el b/vlfi.el
index 9b1c11b..88a494f 100644
--- a/vlfi.el
+++ b/vlfi.el
@@ -30,7 +30,7 @@
;; The buffer uses VLFI mode, which defines several commands for
;; moving around, searching and editing selected chunk of file.
-;; This package is an improved fork of the vlf.el package.
+;; This package is upgraded version of the vlf.el package.
;;; Code:
@@ -568,10 +568,12 @@ EVENT may hold details of the invocation."
(defun vlfi-occur-visit (&optional event)
"Visit current `vlfi-occur' link in a vlfi buffer.
-The same for mouse EVENT."
+If original VLFI buffer has been killed,
+open new VLFI session each time.
+EVENT may hold details of the invocation."
(interactive (list last-nonmenu-event))
(when event
- (switch-to-buffer (window-buffer (posn-window (event-end event))))
+ (set-buffer (window-buffer (posn-window (event-end event))))
(goto-char (posn-point (event-end event))))
(let* ((pos (point))
(pos-relative (- pos (line-beginning-position) 1))
@@ -589,11 +591,11 @@ The same for mouse EVENT."
(switch-to-buffer occur-buffer)))
(pop-to-buffer buffer)
(vlfi-move-to-chunk chunk-start chunk-end)
- (set-buffer buffer)
(goto-char match-pos)))))
(defun vlfi-occur (regexp)
- "Make occur style index for REGEXP."
+ "Make whole file occur style index for REGEXP.
+Prematurely ending indexing will still show what's found so far."
(interactive (list (read-regexp "List lines matching regexp"
(if regexp-history
(car regexp-history)))))
@@ -633,7 +635,7 @@ The same for mouse EVENT."
(position-bytes
(match-end 0))))
(if (match-string 5)
- (setq line (1+ line)
+ (setq line (1+ line) ; line detected
last-line-pos (point))
(let* ((chunk-start vlfi-start-pos)
(chunk-end vlfi-end-pos)
@@ -642,8 +644,8 @@ The same for mouse EVENT."
(line-text (buffer-substring
line-pos (line-end-position))))
(with-current-buffer occur-buffer
- (unless (= line last-match-line)
- (insert "\n:")
+ (unless (= line last-match-line) ;new match line
+ (insert "\n:") ; insert line number
(let* ((overlay-pos (1- (point)))
(overlay (make-overlay
overlay-pos
@@ -652,7 +654,7 @@ The same for mouse EVENT."
(propertize
(number-to-string line)
'face 'shadow)))
- (insert (propertize line-text
+ (insert (propertize line-text ; insert line
'file file
'buffer vlfi-buffer
'chunk-start chunk-start
@@ -667,7 +669,7 @@ The same for mouse EVENT."
(let ((line-start (+ (line-beginning-position)
1))
(match-pos (match-beginning 10)))
- (add-text-properties
+ (add-text-properties ; mark match
(+ line-start match-pos (- last-line-pos))
(+ line-start (match-end 10)
(- last-line-pos))
@@ -700,7 +702,7 @@ The same for mouse EVENT."
in file: %s" total-matches line regexp file)
'face 'underline))
(set-buffer-modified-p nil)
- (forward-char)
+ (forward-char 2)
(vlfi-occur-mode))
(display-buffer occur-buffer)))))
- [elpa] externals/vlf 88cf03c 030/310: Interactive change of batch size immediately updates content., (continued)
- [elpa] externals/vlf 88cf03c 030/310: Interactive change of batch size immediately updates content., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 995a7a0 042/310: Change some VLFI key-bindings not to override special-mode ones., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 0610822 046/310: Make saving with change of size correct., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf b52ca6c 063/310: Don't change encoding for edited chunk, leave it to the user in case, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf a31be70 076/310: Update README and bump version., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ca8ba42 077/310: Fix position handling to correctly deal with multibyte characters., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 5aef3e1 078/310: Update file size changes more lazily., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ba439de 083/310: Initial generation of vlfi-occur results., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 83eb8a5 080/310: Fixes for GNU Emacs 23., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 70719b0 089/310: Add vlfi-occur-show command for showing match but still staying in, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf a5fec57 090/310: Mostly documentation and commentary added.,
Stefan Monnier <=
- [elpa] externals/vlf fbc3a37 094/310: Add tip for ability to change major mode and more section hierarchy., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf fd9c258 096/310: Use permanent buffer local write hook and update README., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf fbe0814 097/310: Fix occur indexing not to skip last chunk., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 28255a2 098/310: Correctly print MB (for older emacsen)., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ca13bea 101/310: Try utf-8 and if not successful, auto detect when adjusting chunk for, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ae775f8 107/310: Extend vlfi-goto-line to count lines from the end with negative, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 36d2ed4 109/310: Update README., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 3c2fb6b 111/310: Merge branch 'master' into chunk-opt2, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf a0b8d5f 115/310: Merge pull request #3 from danlamanna/master, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 8ed9192 117/310: Review fixes:, Stefan Monnier, 2020/11/28