From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Al Haji-Ali Newsgroups: gmane.emacs.bugs Subject: bug#50781: 27.2; completing-read with a vector Date: Fri, 24 Sep 2021 14:49:51 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23889"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.0; emacs 27.2 To: 50781@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 16:04:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTloM-0005y1-HZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 16:04:22 +0200 Original-Received: from localhost ([::1]:44600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTloL-0008OX-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 10:04:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTlo2-000882-KT for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTlo2-0001mf-BW for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTlo2-0006bS-4q for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Al Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Sep 2021 14:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50781 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163249224125369 (code B ref -1); Fri, 24 Sep 2021 14:04:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2021 14:04:01 +0000 Original-Received: from localhost ([127.0.0.1]:58943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTlo0-0006b2-BA for submit@debbugs.gnu.org; Fri, 24 Sep 2021 10:04:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTlnj-0006aa-Mo for submit@debbugs.gnu.org; Fri, 24 Sep 2021 10:03:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTlnj-0007fJ-H4 for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:03:43 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:33537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTlnd-0001Im-E4 for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:03:43 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id t18so27953231wrb.0 for ; Fri, 24 Sep 2021 07:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=lzeXkajgFQizEA4WrybvaMyolTCjz4FMzDJHn5P+eas=; b=McifV3ruA6gCdSOWcP/HazeBZR5CoLXxKWRdn+m3poPc1UChW32tbb+2jmTiB3NF0G 9B8FjgQjX2J0u9kKudTexR+0AnN/ig9TG7b/WkJUx6JMumEBRxoQyYkHtse6GnDAkCuP EhS6TaSBLsmmugDFKGFsqR10UtpTUz4+YVcmrorzrQvnU+613kHWeyg0VoP3O7JjxHF+ iaGe3B7wSVzfnzaKREt6dL9txYiN35xcFK3KCLDlj/GGIznzfetN5HtKTx6Xi02aBY3Y wZJTYwh9kI7Y5oklNsy9Dnzf1xAd0UJQx+UuA5srsH0cr8Rwl1qYasAYY3ABIDjRwM5F aFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=lzeXkajgFQizEA4WrybvaMyolTCjz4FMzDJHn5P+eas=; b=kHq44BzYv7vWTaVVQ9ngVgAk+aO143Iz0nqslRGmK2uXDWkXNtK0uI1BWwtuMLEiGN x8XyxqMSk3LWTan/wUc1MkrOrhxT3gr2cb/eFGj6lctMxkucxxEBtI7JrW0mzl7Ti10a xeZTIQjL3FviK0sD223SkL289eUeb60cKOboihsyBVBw4gqQbZWyYIfhATYVxV7SLhEF MnuOzM/nDRNIZ8/rOzNFjecb/sgDzlhqa0MmgRAIExOgwY3rQqexncNEuei01JS21awY hzSrU+XArjRd+J9Id/pS2gfuKFcKRlM/NmaElPcmQZLjD7H3GL6BS82Q326J01ww4ryJ ag7Q== X-Gm-Message-State: AOAM531peuJtp+OdOQ4xLy6pQ9N9FsNfgTS4zDUdOUD45w+SHUZhh0op pKH6jEIOOv+C4ormYwbK1oH7G5y2cLE= X-Google-Smtp-Source: ABdhPJyJy6g6Daj3CKCI9fL3JNvmu1w52oyaAB/NRn9GhEoHkWDtPo8xYM/OpMpLYHqLHpu4R4qJ4A== X-Received: by 2002:a5d:58ef:: with SMTP id f15mr11836266wrd.160.1632492213835; Fri, 24 Sep 2021 07:03:33 -0700 (PDT) Original-Received: from lxstaff02.gmail.com ([137.195.26.27]) by smtp.gmail.com with ESMTPSA id d24sm8282032wmb.35.2021.09.24.07.03.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Sep 2021 07:03:33 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215303 Archived-At: I am not sure if `completing-read` is supposed to accept a vector but an er= ror is not thrown on this usage (incidentally helpful uses `completing-read= ` in this way). However, starting from `emacs -Q` and executing the following code (completing-read "Test: " [A B C]) works but then pressing for auto-completion shows objects beside A, B= and C. On the other hand, executing (completing-read "Test: " [1 2 3]) and then pressing shows the error `(error "Bad data in guts of obarra= y")` with the following call stack ,---- | Debugger entered--Lisp error: (error "Bad data in guts of obarray") | try-completion("" [1 2 3] nil) | completion-basic-try-completion("" [1 2 3] nil 0) | #f(compiled-function (style) #)(basic) | completion--some(#f(compiled-function (style) #) (ba= sic partial-completion emacs22)) | completion--nth-completion(1 "" [1 2 3] nil 0 (metadata)) | completion-try-completion("" [1 2 3] nil 0 (metadata)) | completion--do-completion(7 7) | completion--in-region-1(7 7) | #f(compiled-function (start end collection predicate) #)(7 7 [1 2 3] nil) | apply(#f(compiled-function (start end collection predicate) #) (7 7 [1 2 3] nil)) | #f(compiled-function (funs global args) #)(nil nil (= 7 7 [1 2 3] nil)) | completion--in-region(7 7 [1 2 3] nil) | completion-in-region(7 7 [1 2 3] nil) | minibuffer-complete() | funcall-interactively(minibuffer-complete) | call-interactively(minibuffer-complete nil nil) | command-execute(minibuffer-complete) | read-from-minibuffer("Test: " nil (keymap (menu-bar keymap (minibuf "Mi= nibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete= as far as possible") (space menu-item "Complete Word" minibuffer-complete-= word :help "Complete at most one word") (63 menu-item "List Completions" mi= nibuffer-completion-help :help "Display all possible completions") "Minibuf= ")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completion= s) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . m= inibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (prev= ious menu-item "Previous History Item" previous-history-element :help "Put = previous minibuffer history element in the min...") (next menu-item "Next H= istory Item" next-history-element :help "Put next minibuffer history elemen= t in the minibuf...") (isearch-backward menu-item "Isearch History Backward= " isearch-backward :help "Incrementally search minibuffer history backward"= ) (isearch-forward menu-item "Isearch History Forward" isearch-forward :hel= p "Incrementally search minibuffer history forward") (return menu-item "Ent= er" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit min= ibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input an= d exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffe= r) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 .= self-insert-command) (XF86Back . previous-history-element) (up . previous-= line-or-history-element) (prior . previous-history-element) (XF86Forward . = next-history-element) (down . next-line-or-history-element) (next . next-hi= story-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . prev= ious-matching-history-element) (115 . next-matching-history-element) (112 .= previous-history-element) (110 . next-history-element))) nil nil nil nil) | completing-read-default("Test: " [1 2 3] nil nil nil nil nil nil) | completing-read("Test: " [1 2 3]) | (progn (completing-read "Test: " [1 2 3])) | eval((progn (completing-read "Test: " [1 2 3])) t) | elisp--eval-last-sexp(nil) | eval-last-sexp(nil) | funcall-interactively(eval-last-sexp nil) | call-interactively(eval-last-sexp nil nil) | command-execute(eval-last-sexp) `---- In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cair= o version 1.15.12) of 2021-05-18 built on lxstaff02 Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6 Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --prefix=3D$HOME/.local/ --with-json --with-modules --with-harfbuzz --with-compress-install --with-threads --with-included-regex --with-zlib --with-sound=3Dalsa --without-gconf --with-mailutils --with-xft --with-xml2 --with-cairo --with-gconf --with-xwidgets --without-toolkit-scroll-bars 'CFLAGS=3D-O3 -mtune=3Dnative -march=3Dnative -fomit-frame-pointer -I/usr/lib/gcc/x86_64-linux-gnu/9/include/ -L/usr/lib/gcc/x86_64-linux-gnu/9' PKG_CONFIG_PATH=3D$HOME/.local/lib/pkgconfig:/usr/lib64/pkgconfig/:/usr/sh= are/pkgconfig/ CPPFLAGS=3D-I$HOME/.local/include LDFLAGS=3D-L$HOME/.local/lib' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS PDUMPER GMP Important settings: value of $LANG: en_GB.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 52982 7459) (symbols 48 6420 1) (strings 32 17020 2200) (string-bytes 1 561499) (vectors 16 10092) (vector-slots 8 133817 11898) (floats 8 22 43) (intervals 56 705 1) (buffers 1000 13) (heap 1024 11972 1101))