[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements. |
Date: |
Tue, 13 Dec 2022 03:59:33 -0500 (EST) |
branch: elpa/flx
commit dd428a8cc659604afa174720a24b55e2b1f8bb6a
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
Add some debug statements.
---
flx-ido.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/flx-ido.el b/flx-ido.el
index 414b01137e..93f01a586f 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -97,6 +97,12 @@ item, in which case, the ending items are deleted."
(length b))))
(eq t (compare-strings b 0 min-len
a 0 min-len))))
+(defvar flx-ido-debug nil)
+
+(defun flx-ido-debug (&rest args)
+ (when flx-ido-debug
+ (apply 'message args)))
+
(defun flx-ido-is-prefix-match (str prefix)
"Return t if PREFIX is PREFIX of STR"
(when (and str prefix)
@@ -107,6 +113,7 @@ item, in which case, the ending items are deleted."
(defun flx-ido-narrowed (query items)
"Get the value from `flx-ido-narrowed-matches-hash' with the
longest prefix match."
+ (flx-ido-debug "flx-ido-narrowed saw %s items" (length items))
(if (zerop (length query))
(list t (nreverse items))
(let ((query-key (flx-ido-key-for-query query))
@@ -178,6 +185,7 @@ item, in which case, the ending items are deleted."
"Better sorting for flx ido matching."
(cl-destructuring-bind (exact res-items)
(flx-ido-narrowed query items)
+ (flx-ido-debug "exact: %s\nbefore hash coung %s " exact (hash-table-count
flx-ido-narrowed-matches-hash))
(flx-ido-cache query (if exact
res-items
(flx-ido-match-internal query res-items)))))
- [nongnu] elpa/flx 9fec96087b 010/182: fix sort modifying list by side-effect bug, (continued)
- [nongnu] elpa/flx 9fec96087b 010/182: fix sort modifying list by side-effect bug, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx d295ba6a2f 007/182: add test list, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx b1702e2aa1 054/182: Add colon to non-word characters., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 5a23bc7da3 003/182: update tests, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 64b8e0f934 027/182: work around ido bug 10994, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8605b4b421 026/182: don't do caching when reading file names, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8849b39816 066/182: Make flx-capital-p behave correctly for non-latin words, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx ad87db4348 068/182: Make flx-ido depend on flx on package level, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 225fae97c9 070/182: Mention Marmalade in the README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 43f78d4815 090/182: Touch-up commentary., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements.,
ELPA Syncer <=
- [nongnu] elpa/flx 3054a8038d 112/182: Fix typo in README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f0c3157268 114/182: Increase default flx-ido-threshold to 6000, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f5fda2897f 125/182: enable lexical-binding, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 2b31df9ed0 140/182: Make dynamic programming test even more "difficult", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx cd557fcb00 051/182: fix C-SPC, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9e7749e9e6 067/182: Merge pull request #27 from bbatsov/fix-capital-check, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7424f54816 079/182: flx-ido: don't require cl; flx requires it anyway, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3bcaf03434 002/182: add readme, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx bdfd9d98aa 014/182: add travis status image, ELPA Syncer, 2022/12/13