[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master cc199f5: Show progress of automatic el-search-query-replac
From: |
Michael Heerdegen |
Subject: |
[elpa] master cc199f5: Show progress of automatic el-search-query-replace |
Date: |
Sun, 18 Mar 2018 12:09:36 -0400 (EDT) |
branch: master
commit cc199f5973c71b8516f165b438964536ca11c888
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>
Show progress of automatic el-search-query-replace
* el-search/el-search.el: (el-search--search-and-replace-pattern):
Show percentage of progress of automatic query-replace.
---
packages/el-search/el-search.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index c574b0b..5a0efa5 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
;; Created: 29 Jul 2015
;; Keywords: lisp
;; Compatibility: GNU Emacs 25
-;; Version: 1.6.1
+;; Version: 1.6.2
;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
@@ -3244,7 +3244,7 @@ Thanks!"))))
(setq nbr-replaced 0)
(setq nbr-skipped 0)
(condition-case err
- (progn
+ (let ((start-point (point)))
(unless replace-all
(el-search-hl-other-matches matcher)
@@ -3300,7 +3300,15 @@ Thanks!"))))
(el-search--ensure-sexp-start))
(cl-incf nbr-replaced)
(cl-incf nbr-replaced-total)
- (setq replaced-this t)))
+ (setq replaced-this t)
+ (when replace-all
+ (let ((head (el-search-object-head
el-search--current-search)))
+ (el-search--message-no-log
+ "%s (%d%%)"
+ (or (el-search-head-file head)
+ (el-search-head-buffer head))
+ (/ (* 100 (- (point) start-point -1))
+ (- (point-max) start-point -1)))))))
(query
(lambda ()
(car
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master cc199f5: Show progress of automatic el-search-query-replace,
Michael Heerdegen <=