Ticket #211 (new 不具合)

Opened 3 years ago

Last modified 3 years ago

completing-read-multiple での不具合

Reported by: kaoru-fj Assigned to:
Priority: major Milestone:
Component: Emacs Lisp Version: 2.11 (開発中)
Keywords: Cc:

Description

Meadow 2.11 で Wanderlust の CVS HEAD (2005-09-24 以降) を使用すると、以下の問題が発生します。

wl:13779

>  CVS HEAD を Meadow 2.11 (Emacs 21.4) で使用していますが、S 押下後に
> mini buffer へ表示されるプロンプト

>  Sort by (date): 

> へ何を入力しても [No match] と表示され、C-g で抜けるしかなくなります。

Meadow 2.11 かベースにした Emacs 21.4 のバグだと思われます. 確認の
為以下の式を評価して, 補完入力出来るかどうか試してみて下さい.

(completing-read-multiple
 "Test: " '(("foo") ("bar") ("baz")) nil t nil nil "foo")

確認のための Lisp 式を実行したところ、表示されたプロンプトに何を入力しても [No match] と表示されますので、Wanderlust ではなく Meadow/Emacs の障害ではないかと思います。

Attachments

Change History

2005年10月20日 11時36分30秒 changed by kaoru-fj

wl:13783

> Meadow 2.11 かベースにした Emacs 21.4 のバグだと思われます. 確認の
> 為以下の式を評価して, 補完入力出来るかどうか試してみて下さい.

> (completing-read-multiple
>  "Test: " '(("foo") ("bar") ("baz")) nil t nil nil "foo")

そう言えば, こっちで補完入力は出来てますか?

(completing-read-multiple
 "Test: " '(("foo") ("bar") ("baz")) nil nil nil nil "foo")

こちらの Lisp 式では、補完も入力もできます。 Emacs 22 と 21 の仕様の違いなんでしょうか?

2005年10月20日 12時42分44秒 changed by gotoh

meadow 2.00 でも、debian の emacs 21.4 でも、 [No match] となって補完が出来ませんでしたので、 オリジナルでの問題ですね。require-matchがtだとダメ、nilならOKという。

試しにmeadow3のcrm.elを使用すると現象は出なくなりましたので、 21.x での lisp/emacs-lisp/crm.el の問題ですね。

2005年10月20日 13時57分57秒 changed by anonymous

meadow3 の crm.el に差し替えればいいと思いますが、 meadow3 の crm.el でも少しバグが残っています。

(completing-read-multiple
 "Test: " '(("foo") ("bar") ("baz")) nil t nil nil "foo")

に対して b,foof,bar を入力して確定しようとするとわかります。

  • crm.el.org

    old new  
    419419returned if verification was unsuccessful.  This number represents the 
    420420position in SEPARATED-STRING up to where completion was successful." 
    421421  (let ((strings (split-string separated-string crm-separator)) 
    422         ;; buffers start at 1, not 0 
    423         (current-position 1) 
     422        ;; buffers start at (minibuffer-prompt-end), not 0 
     423        (current-position (minibuffer-prompt-end))  
    424424        current-string 
    425425        result 
    426426        done) 
    427427    (while (and strings (not done)) 
    428428      (setq current-string (car strings) 
    429             result (try-completion current-string 
    430                                    minibuffer-completion-table 
    431                                    minibuffer-completion-predicate)) 
    432       (if (eq result t) 
     429            result (all-completions current-string 
     430                                    minibuffer-completion-table 
     431                                    minibuffer-completion-predicate)) 
     432      (if (member current-string result) 
    433433          (setq strings (cdr strings) 
    434434                current-position (+ current-position 
    435435                                    (length current-string) 
    436436                                    ;; automatically adding 1 for separator 
    437437                                    ;; character 
    438438                                    1)) 
    439         ;; still one more case of a match 
    440         (if (stringp result) 
    441             (let ((string-list 
    442                    (all-completions result 
    443                                     minibuffer-completion-table 
    444                                     minibuffer-completion-predicate))) 
    445               (if (member result string-list) 
    446                   ;; ho ho, code duplication... 
    447                   (setq strings (cdr strings) 
    448                         current-position (+ current-position 
    449                                             (length current-string) 
    450                                             1)) 
    451                 (progn 
    452                   (setq done t) 
    453                   ;; current-string is a partially-completed string 
    454                   (setq current-position (+ current-position 
    455                                             (length current-string)))))) 
    456           ;; current-string cannot be completed 
    457           (let ((completable-substring 
    458                  (crm-find-longest-completable-substring current-string))) 
    459             (setq done t) 
    460             (setq current-position (+ current-position 
    461                                       (length completable-substring))))))) 
     439        (setq done t) 
     440        ;; current-string is a partially-completed string 
     441        (setq current-position (+ current-position 
     442                                  (length current-string))))) 
    462443    ;; return our result 
    463444    (if (null strings) 
    464445        t 

Add/Change #211 (completing-read-multiple での不具合)




Change Properties
Action