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

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

[elpa] master 391d3f5: Show line numbers in *El Occur* buffers


From: Michael Heerdegen
Subject: [elpa] master 391d3f5: Show line numbers in *El Occur* buffers
Date: Mon, 2 Oct 2017 12:00:01 -0400 (EDT)

branch: master
commit 391d3f584c1f3e64e0066ed53c879df2beff943d
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

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

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index f59a4a1..ed7aae9 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/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]