emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/el-search 6e4b9cc 170/332: Show line numbers in *El Occ


From: Stefan Monnier
Subject: [elpa] externals/el-search 6e4b9cc 170/332: Show line numbers in *El Occur* buffers
Date: Tue, 1 Dec 2020 15:48:37 -0500 (EST)

branch: externals/el-search
commit 6e4b9cc614e9ba771ebdc8889eb7d647a0aae12d
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    Show line numbers in *El Occur* buffers
---
 el-search.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/el-search.el b/el-search.el
index f59a4a1..ed7aae9 100644
--- a/el-search.el
+++ b/el-search.el
@@ -2216,7 +2216,7 @@ Prompt for a new pattern and revert the occur buffer."
                     (cl-incf overall-matches buffer-matches)
                     (pcase-let ((`(,buffer ,_ ,file) (stream-first 
stream-of-buffer-matches)))
                       (if file (cl-incf matching-files) (cl-incf 
matching-buffers))
-                      (insert "\n;;; ** ")
+                      (insert "\n\n;;; ** ")
                       (insert-button
                        (or file (format "%S" buffer))
                        'action
@@ -2310,6 +2310,10 @@ Prompt for a new pattern and revert the occur buffer."
                                              (overlay-put ov 'face 
'el-search-match)
                                              (overlay-put ov 'el-search-match 
t))
                                            (with-current-buffer buffer 
(point)))))
+                                (insert (format "\n;;;; Line %d\n"
+                                                (with-current-buffer buffer
+                                                  (line-number-at-pos 
context-beg))))
+                                (setq insertion-point (point))
                                 (let ((working-position context-beg))
                                   (while (not (stream-empty-p matches))
                                     (pcase-let ((`((,_ ,match-beg ,_) . ,_) 
(stream-pop matches)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]