From unknown Sun Aug 17 00:59:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50781 <50781@debbugs.gnu.org> To: bug#50781 <50781@debbugs.gnu.org> Subject: Status: 27.2; completing-read with a vector Reply-To: bug#50781 <50781@debbugs.gnu.org> Date: Sun, 17 Aug 2025 07:59:05 +0000 retitle 50781 27.2; completing-read with a vector reassign 50781 emacs submitter 50781 Al Haji-Ali severity 50781 normal tag 50781 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 24 10:04:01 2021 Received: (at submit) by debbugs.gnu.org; 24 Sep 2021 14:04:01 +0000 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 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 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 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 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) 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) User-agent: mu4e 1.7.0; emacs 27.2 From: Al Haji-Ali To: bug-gnu-emacs@gnu.org Subject: 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 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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)) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 24 22:15:23 2021 Received: (at 50781) by debbugs.gnu.org; 25 Sep 2021 02:15:23 +0000 Received: from localhost ([127.0.0.1]:59853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxDn-0003qL-Cl for submit@debbugs.gnu.org; Fri, 24 Sep 2021 22:15:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxDl-0003jp-92 for 50781@debbugs.gnu.org; Fri, 24 Sep 2021 22:15:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SZ9PhD2nijrg8+lMydrpo/1+NG4egQbCrAkBadbrzzA=; b=mJuZhp2rSmjdcVw6dEmxjOf4RR D5//+8F6x9ybzMbbw0La83/7mkQCjvvFw0s0sq3wYpkYhCZ1QAg7kkCIRdoSWjJtoyJruXAvmjvuN RYQr83DrDA3A34/nsRpioiqHLtH5O+M3jYxf+b78aIi8ieRftnRAclkru1r5WlsOYn+U=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTxDc-0008TI-SA; Sat, 25 Sep 2021 04:15:15 +0200 From: Lars Ingebrigtsen To: Al Haji-Ali Subject: Re: bug#50781: 27.2; completing-read with a vector References: X-Now-Playing: Bertine Zetlitz's _Beautiful So Far_: "Everything I Want" Date: Sat, 25 Sep 2021 04:15:12 +0200 In-Reply-To: (Al Haji-Ali's message of "Fri, 24 Sep 2021 14:49:51 +0100") Message-ID: <87fsttpfin.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Al Haji-Ali writes: > I am not sure if `completing-read` is supposed to accept a vector but > an error is not thrown on this usage (incidentally helpful uses > `completing-read` in this way). > > However, starting from ` [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50781 Cc: 50781@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Al Haji-Ali writes: > I am not sure if `completing-read` is supposed to accept a vector but > an error 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. The documentation here says: COLLECTION can be a list of strings, an alist, an obarray or a hash table. So using a vector isn't really supported, but works in some instances by chance. > On the other hand, executing > (completing-read "Test: " [1 2 3]) > and then pressing shows the error `(error "Bad data in guts of obarray")` It interprets all vectors as obarrays, and an obarray is just a vector of symbols. But numbers aren't symbols, which is what it's complaining about. We could make `completing-read' iterate over all the elements in the vector to see whether it's valid, and signal an error earlier, but it would make common usages slower. So I don't think there's an error in Emacs here -- feeding a (non-obarray) vector to `completing-read' is not supported, and is an error in the code that does it. So I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 24 22:15:28 2021 Received: (at control) by debbugs.gnu.org; 25 Sep 2021 02:15:28 +0000 Received: from localhost ([127.0.0.1]:59856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxDs-0003wE-Ks for submit@debbugs.gnu.org; Fri, 24 Sep 2021 22:15:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTxDr-0003oy-3j for control@debbugs.gnu.org; Fri, 24 Sep 2021 22:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+JAgaG0IKWKJ4372UuSqn4zUCMieqnlZ5Q6p3LDe7Ww=; b=lGVyKcGNCnnLY9ooz3ZnQjcoak r7cv6LWFEDpnII55htMt8Ew7A3xBjGLo48OkF+4u8jgMbw2CiKyHsl9Y4xvaOuVtCibynwtLr2OpX QRLGhaEYIAzNQ4YNE2I9BVVL5CbYBkASFC6eH4eOsALpd5eJ7PYyDm+oPOzsTmfrlaM4=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTxDj-0008TQ-1M for control@debbugs.gnu.org; Sat, 25 Sep 2021 04:15:21 +0200 Date: Sat, 25 Sep 2021 04:15:17 +0200 Message-Id: <87ee9dpfii.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50781 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 50781 notabug close 50781 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 50781 notabug close 50781 quit From unknown Sun Aug 17 00:59:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Oct 2021 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator