[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct c79f8c86c9 07/64: Take note of more issues with com
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct c79f8c86c9 07/64: Take note of more issues with completion-in-region |
Date: |
Thu, 30 Dec 2021 23:57:49 -0500 (EST) |
branch: externals/mct
commit c79f8c86c9b6773994c53d15621a00c4b4752ac7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Take note of more issues with completion-in-region
---
mct.el | 67 ++++++++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 47 insertions(+), 20 deletions(-)
diff --git a/mct.el b/mct.el
index 2131e54433..f9416e088b 100644
--- a/mct.el
+++ b/mct.el
@@ -1115,9 +1115,14 @@ region.")
;;;;;; Live completions
+;; FIXME 2021-12-05: This seems to be called at the wrong time? It
+;; never captures the buffer that started the completion-in-region. We
+;; need to get this right for cycling to work between the buffer and the
+;; Completions.
(defun mct--region-current-buffer ()
"Return current buffer of completion in region."
- (and completion-in-region--data (marker-buffer (nth 0 data))))
+ (and completion-in-region--data
+ (marker-buffer (nth 0 completion-in-region--data))))
(defun mct--focus-current-buffer ()
"Focus the buffer where `completion-in-region' is active."
@@ -1144,29 +1149,51 @@ Meant to be added to `after-change-functions'."
"Set up Mct for `completion-in-region'."
(if completion-in-region-mode
(progn
- ;; NOTE: Ignore the predicate in order to support orderless style.
- ;; TODO: This override should be guarded by a customizable variable,
- ;; since it is intrusive. See also `corfu-quit-at-boundary'.
- (setq completion-in-region-mode--predicate (lambda () t))
+ ;; FIXME 2021-12-05: This does not work as intended. If you
+ ;; type "(def TAB SPC mode ea TAB" the list of completions only
+ ;; includes those with the "ea" prefix.
+ ;;
+ ;; ;; NOTE: Ignore the predicate in order to support orderless style.
+ ;; ;; TODO: This override should be guarded by a customizable variable,
+ ;; ;; since it is intrusive. See also `corfu-quit-at-boundary'.
+ ;; (setq completion-in-region-mode--predicate (lambda () t))
(mct--region-live-update))
;; Teardown
(remove-hook 'after-change-functions #'mct--region-live-completions t)))
-;; FIXME 2021-12-03: When using a flex style followed by tab, the
-;; completion-in-region seems to remain active as the echo area has a
-;; message about "sole completion", "no completion", and the like.
-
-;; FIXME 2021-12-03: Again with the flex style, trigger completion while
-;; at "def" and type "dermode": it first expands into
-;; "define-derived-dermode" with the cursor before "dermode" and then
-;; pauses for a short while before becoming "define-derived-mode". This
-;; looks broken.
-
-;; FIXME 2021-12-03: If you type "defa" you will get a list of
-;; candidates that have a common prefix. One of them is differentiated
-;; by an extra "l" (the defalias). If you type that character, the
-;; Completions becomes empty instead of showing the single candidate.
-;; Tab-expansion still works...
+;; UPDATE 2021-12-05: The first of the following two seems to have been
+;; fixed. But flex completion is still wonky. Type "(defglmino TAB".
+;; It will eventually expand into "(define-global-minor-mode", but first
+;; it will show "define-globalminor-mode|glmino" where "|" is the
+;; cursor.
+
+ ;; FIXME 2021-12-03: When using a flex style followed by tab, the
+ ;; completion-in-region seems to remain active as the echo area has a
+ ;; message about "sole completion", "no completion", and the like.
+
+ ;; FIXME 2021-12-03: Again with the flex style, trigger completion while
+ ;; at "def" and type "dermode": it first expands into
+ ;; "define-derived-dermode" with the cursor before "dermode" and then
+ ;; pauses for a short while before becoming "define-derived-mode". This
+ ;; looks broken.
+
+;; UPDATE 2021-12-05: The below seems to have been fixed. But the
+;; completion is still broken. Every time you mistype a text expansion
+;; it gets appended to the list of possible candidates. So after a few
+;; tests I have gotten candidates such as "defalias-" and totally bogus
+;; ones like "defalias-fset-function".
+
+ ;; FIXME 2021-12-03: If you type "defa" you will get a list of
+ ;; candidates that have a common prefix. One of them is differentiated
+ ;; by an extra "l" (the defalias). If you type that character, the
+ ;; Completions becomes empty instead of showing the single candidate.
+ ;; Tab-expansion still works...
+
+;; FIXME 2021-12-05: Something affects performance. In a clean
+;; *scratch* buffer, type "def TAB" and select "defalias". It expands
+;; right away. Try the same in a larger elisp file like this one and
+;; the text expansion is considerably slower. Try it on modus-themes.el
+;; and you might as well prepare dinner while waiting.
;;;###autoload
(define-minor-mode mct-region-mode
- [elpa] externals/mct updated (6279fa3e7d -> 9e81e4425a), ELPA Syncer, 2021/12/30
- [elpa] externals/mct cf99cc1f5c 12/64: Define placeholder predicate for in-region mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 92680c1091 05/64: completion--done: Attempt to teardown completion in region properly, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6cd3b20a83 09/64: Add TODO on binding TAB in region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 555b481fe0 03/64: First steps towards Orderless support, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 5ad44174c8 16/64: Introduce mct-region keymap for completions (WIP), ELPA Syncer, 2021/12/30
- [elpa] externals/mct 788aeafb04 19/64: Rename the minibuffer mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6222731289 10/64: Add new FIXME to exit region completion cleanly, ELPA Syncer, 2021/12/30
- [elpa] externals/mct c79f8c86c9 07/64: Take note of more issues with completion-in-region,
ELPA Syncer <=
- [elpa] externals/mct 0d7d64d79a 15/64: Add in-region version of choose-completion, ELPA Syncer, 2021/12/30
- [elpa] externals/mct adeddd2dfe 14/64: Write helper for "choose completion" routine, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 298a83cfc5 17/64: Respin the mct setup for in-region scenario (WIP), ELPA Syncer, 2021/12/30
- [elpa] externals/mct 0362ca4bf1 34/64: Rename symbol for consistency, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 28d7c54f51 44/64: Add debug print to monitor completion-in-region-mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct bf0f666ee4 49/64: Replace "mct-mode" with "mct-minibuffer-mode", ELPA Syncer, 2021/12/30
- [elpa] externals/mct aaaf12c70c 50/64: Merge branch 'main' into experiment-completion-in-region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 775f42951d 02/64: Remove mct--region-current-buffer, ELPA Syncer, 2021/12/30
- [elpa] externals/mct fb177ace70 18/64: Keep "next or mini" intact (we'll use another fn), ELPA Syncer, 2021/12/30
- [elpa] externals/mct f3d86fe28a 06/64: Rename internal function, ELPA Syncer, 2021/12/30