[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/el-search 7d621de 216/332: * el-search/el-search.el: So
From: |
Stefan Monnier |
Subject: |
[elpa] externals/el-search 7d621de 216/332: * el-search/el-search.el: Some minor tweaks |
Date: |
Tue, 1 Dec 2020 15:48:48 -0500 (EST) |
branch: externals/el-search
commit 7d621de46f6db25836bfd391eb451440641bf674
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>
* el-search/el-search.el: Some minor tweaks
There were two separate bug sections in the header - fix that.
Add comment to "Known Limitations" section that circular syntaxes are
unmatchable.
(el-search-pattern-backwards): Add fixme note.
(el-search-load-path): Use `remq' instead of `delq' to prevent
altering the `load-path'.
And some whitespace changes
---
el-search.el | 61 ++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 35 insertions(+), 26 deletions(-)
diff --git a/el-search.el b/el-search.el
index 0cc403c..614e6b2 100644
--- a/el-search.el
+++ b/el-search.el
@@ -344,34 +344,40 @@
;; (el-search-mapc->dolist repl) -> repl
;;
;;
+;; Acknowledgments
+;; ===============
;;
-;; Bugs, Known Limitations
-;; =======================
+;; Thanks to Stefan Monnier for corrections and advice.
;;
-;; - Replacing: in some cases the read syntax of forms is changing due
-;; to reading-printing. "Some" because we can handle this problem in
-;; most cases.
;;
-;; - Similar: comments are normally preserved (where it makes
-;; sense). But when replacing like `(foo ,a ,b) -> `(foo ,b ,a)
+;; Known Limitations
+;; =================
;;
-;; in a content like
+;; - Replacing: in some cases the read syntax of forms is changing due
+;; to reading-printing. "Some" because we can handle this problem
+;; in most cases.
;;
-;; (foo
-;; a
-;; ;; comment
-;; b)
+;; - Similar: comments are normally preserved (where it makes sense).
+;; But when replacing like `(foo ,a ,b) -> `(foo ,b ,a)
;;
-;; the comment will be lost.
+;; in a content like
;;
+;; (foo
+;; a
+;; ;; comment
+;; b)
;;
-;; Acknowledgments
-;; ===============
+;; the comment will be lost.
+;;
+;; - Something like '(1 #1#) is unmatchable (because it is
+;; un`read'able without context). For a similar reason it is
+;; currently not possible to allow a replacement to contain
+;; uninterned symbols or repeated/circular parts.
;;
-;; Thanks to Stefan Monnier for corrections and advice.
;;
;;
-;; BUGS:
+;; BUGS
+;; ====
;;
;; - l is very slow for very long lists. E.g. C-S-e (l "test")
;;
@@ -2347,7 +2353,8 @@ With prefix arg, restart the current search."
;;;###autoload
(defun el-search-pattern-backwards (pattern)
"Search the current buffer backwards for matches of PATTERN."
- (declare (interactive-only t))
+ (declare (interactive-only t));; FIXME: define noninteractive version - and
-1 with hms like
+ ;; `el-search--search-pattern-1'
(interactive (el-search-pattern--interactive))
(if (eq pattern (el-search--current-pattern))
(progn
@@ -2951,7 +2958,7 @@ are ignored."
(lambda ()
(stream-concatenate
(seq-map (lambda (path) (el-search-stream-of-directory-files path nil))
- (stream (delq nil load-path)))))
+ (stream (remq nil load-path)))))
(lambda (search) (setf (alist-get 'description (el-search-object-properties
search))
"Search `load-path'"))))
@@ -3187,7 +3194,8 @@ Thanks!"))))
(el-search-head-buffer
head)))
(sit-for 1.)))
- (while (and (not done) (el-search--search-pattern-1 matcher
t nil heuristic-matcher))
+ (while (and (not done)
+ (el-search--search-pattern-1 matcher t nil
heuristic-matcher))
(setq opoint (point))
(setf (el-search-head-position
(el-search-object-head el-search--current-search))
@@ -3250,9 +3258,11 @@ Thanks!"))))
'(?b "skip buf"
"Skip this buffer and any
remaining matches in it")
(and buffer-file-name
- '(?d "skip dir" "Skip a parent
directory of current file"))
+ '(?d "skip dir"
+ "Skip a parent directory of
current file"))
(and (not replaced-this)
- (list ?s (concat (if splice
"disable" "enable") " splice")
+ (list ?s (concat (if splice
"disable" "enable")
+ " splice")
(substitute-command-keys "\
Toggle splicing mode (\\[describe-function] el-search-query-replace for
details).")))
'(?o "show" "Show replacement in a
buffer")
@@ -3377,10 +3387,9 @@ Toggle splicing mode (\\[describe-function]
el-search-query-replace for details)
nbr-replaced
(if (zerop nbr-skipped) ""
(format " (%d skipped)" nbr-skipped))))))))
- (while (and
- (not done)
- (progn (el-search-continue-search)
- (and el-search--success (not el-search--wrap-flag))))
+ (while (and (not done)
+ (progn (el-search-continue-search)
+ (and el-search--success (not el-search--wrap-flag))))
(funcall replace-in-current-buffer)
(unless replace-all-and-following (setq replace-all nil)))
(message "Replaced %d matches in %d buffers" nbr-replaced-total
nbr-changed-buffers))))
- [elpa] externals/el-search fac5586 285/332: [el-search] Improve my last commit "Add C-h help", (continued)
- [elpa] externals/el-search fac5586 285/332: [el-search] Improve my last commit "Add C-h help", Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 23911d1 288/332: [el-search] Add menus, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 68fcfcd 286/332: [el-search] Include preceding comments in occur defun context, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 90062c5 290/332: Update copyrights of some packages, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 120c662 296/332: [el-search] Minibuffer pattern prompt hints part 2, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 668d049 302/332: [el-search] Add el-search-list-defined-patterns, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search bb978b2 306/332: [el-search] Fix behavior after completed single-buffer search, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 985ca3c 312/332: [el-search] Add "List patterns" menu item, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search f5e8235 321/332: [el-search] C-c C-c in edit-replacement means replace, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 9d8798f 140/332: Work around more manifestations of Emacs bug #24542, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 7d621de 216/332: * el-search/el-search.el: Some minor tweaks,
Stefan Monnier <=
- [elpa] externals/el-search 29eeda2 228/332: Show progress of automatic el-search-query-replace, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 4b934f1 238/332: * el-search/el-search.el: Skip over #N read syntaxes, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 01d4431 269/332: [el-search] Don't initially fold El Occur buffers, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 1169ef1 294/332: [el-search] Add accessible buffer area to a validity check, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search c0947c3 295/332: [el-search] Minibuffer pattern prompt hints part 1: preparations, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 749aa0c 300/332: [el-search] Improvements for 'change' and 'changed', Stefan Monnier, 2020/12/01
- [elpa] externals/el-search e522b71 305/332: [el-search] Enhance docstring of el-search-occur-mode, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search fdc4663 308/332: [el-search] Bump version to 1.11.1, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search e790747 309/332: [el-search] Fix quits in minibuffer in emacs -nw, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 39da179 313/332: [el-search] Minibuffer pattern prompt hints part 3, Stefan Monnier, 2020/12/01