From unknown Sat Jun 21 10:43:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46091: ido: Add support for tab completion using an alist collection. Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jan 2021 02:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46091@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161154281527470 (code B ref -1); Mon, 25 Jan 2021 02:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jan 2021 02:46:55 +0000 Received: from localhost ([127.0.0.1]:37593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3ru3-000790-0U for submit@debbugs.gnu.org; Sun, 24 Jan 2021 21:46:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:58676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3ru1-00078s-JJ for submit@debbugs.gnu.org; Sun, 24 Jan 2021 21:46:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3ru1-0005gq-Ba for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 21:46:53 -0500 Received: from gateway21.websitewelcome.com ([192.185.45.147]:16925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3rty-0004Hh-JY for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 21:46:52 -0500 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id B531D400CE93B for ; Sun, 24 Jan 2021 20:46:34 -0600 (CST) Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id 3rtilHQXiDT643rtilEaLl; Sun, 24 Jan 2021 20:46:34 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc: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=wiBej64Dux7NVNcBi63yqkAfkJ2ci3fg4Hq9klwDYgc=; b=caQVgrv1p2bUMR+5BrkXyN5nwq lvJwCCpFBbU48Muup5D7Wo+7ejdOU/L75HuWSH0grbfiUXv/TBwl/KQPAwqnY10DYAXLiUFofN9oL hiaHBNwYgOenk8aa13qOVTNC4EqwNIQwE7VVDNeFNPW4MfhUX/DVReVfiDlM3odm3P0clTxR9Eecv BwyIj2FqOfidTVAgHZYLyj08Mr7ayVMl/Sp8ENMmHRn11+qg9NGkrDSUoi28acpCFQuMclEP21AbH 1xMniPho6q5sSrCJrcWtuQC9jX2v/ehpt9E609q+25VePJv6m/G+klLCn4Pav2jC4jvwYwX1Z6ZKt hdn9zrDg==; Received: from cpe-45-48-245-70.socal.res.rr.com ([45.48.245.70]:51090 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l3rth-002Bpi-Ti for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 20:46:34 -0600 Date: Sun, 24 Jan 2021 18:46:33 -0800 Message-ID: From: Keith David Bershatsky MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.245.70 X-Source-L: No X-Exim-ID: 1l3rth-002Bpi-Ti X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-245-70.socal.res.rr.com (server.local) [45.48.245.70]:51090 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes Received-SPF: pass client-ip=192.185.45.147; envelope-from=esq@lawlist.com; helo=gateway21.websitewelcome.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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 (--) Currently, ido does not support tab completion using an alist collection. (require 'ido) (let* ((alist '(("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds"))) (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) (cdr (assoc choice alist))) ;;; Debugger entered--Lisp error: (wrong-type-argument listp "seeds") ;;; ido-no-final-slash(("maple" . "seeds")) ;;; ido-file-lessp(("maple" . "seeds") ("oak" . "acorns")) ;;; sort((("pine" . "cones")) ido-file-lessp) ;;; ido-completion-help() ;;; funcall-interactively(ido-completion-help) ;;; call-interactively(ido-completion-help) ;;; ido-complete() ;;; funcall-interactively(ido-complete) ;;; call-interactively(ido-complete nil nil) ;;; command-execute(ido-complete) ;;; read-from-minibuffer("CHOOSE: " nil (keymap keymap (4 . ido-magic-delete-char) (6 . ido-magic-forward-char) (2 . ido-magic-backward-char) (63 . ido-completion-help) (left . ido-prev-match) (right . ido-next-match) (0 . ido-restrict-to-matches) (27 keymap (32 . ido-take-first-match)) (67108896 . ido-restrict-to-matches) (26 . ido-undo-merge-work-directory) (20 . ido-toggle-regexp) (67108908 . ido-prev-match) (67108910 . ido-next-match) (19 . ido-next-match) (18 . ido-prev-match) (16 . ido-toggle-prefix) (13 . ido-exit-minibuffer) (10 . ido-select-text) (32 . ido-complete-space) (9 . ido-complete) (5 . ido-edit-input) (3 . ido-toggle-case) (1 . ido-toggle-ignore) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward m enu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (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-history-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil n il) ;;; ido-read-internal(list "CHOOSE: " nil nil confirm nil) ;;; ido-completing-read("CHOOSE: " (("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds")) nil confirm) ;;; (let* ((alist '(("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds"))) (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) (cdr (assoc choice alist))) ;;; (progn (let* ((alist '(("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds"))) (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) (cdr (assoc choice alist)))) ;;; eval((progn (let* ((alist '(("pine" . "cones") ("oak" . "acorns") ("maple" . "seeds"))) (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) (cdr (assoc choice alist)))) 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) Here is a draft proof concept that adds limited support for an alist collection using ido. This is not intended to be a plug-in solution, but is rather intended to give the Emacs team some ideas regarding possible solutions. (setq completions-format nil) (defun ido-file-lessp (a b) ;; Simple compare two file names. (string-lessp (ido-no-final-slash (if (listp a) (car a) a)) (ido-no-final-slash (if (listp b) (car b) b)))) (defun completion--insert-strings (strings) "Insert a list of STRINGS into the current buffer. Uses columns to keep the listing readable but compact. It also eliminates runs of equal strings." (when (consp strings) (let* ((length (apply 'max (mapcar (lambda (s) (if (consp s) (+ (string-width (car s)) (if (listp (cdr s)) ;;; Add 3: " " "[" "]" (+ 3 (string-width (cadr s))) ;;; Add 3: " " "[" "]" (+ 3 (string-width (replace-regexp-in-string "\n" "\\\\n" (cdr s)))))) (string-width s))) strings))) (window (get-buffer-window (current-buffer) 0)) (wwidth (if window (1- (window-width window)) 79)) (columns (min ;; At least 2 columns; at least 2 spaces between columns. (max 2 (/ wwidth (+ 2 length))) ;; Don't allocate more columns than we can fill. ;; Windows can't show less than 3 lines anyway. (max 1 (/ (length strings) 2)))) (colwidth (/ wwidth columns)) (column 0) (rows (/ (length strings) columns)) (row 0) (first t) (laststring nil)) ;; The insertion should be "sensible" no matter what choices were made ;; for the parameters above. (dolist (str strings) (unless (equal laststring str) ; Remove (consecutive) duplicates. (setq laststring str) ;; FIXME: `string-width' doesn't pay attention to `display' properties. (let ((length (if (consp str) (+ (string-width (car str)) (if (listp (cdr str)) ;;; Add 3: " " "[" "]" (+ 3 (string-width (cadr str))) ;;; Add 3: " ", "[", "]" (+ 3 (string-width (replace-regexp-in-string "\n" "\\\\n" (cdr str)))))) (string-width str)))) (cond ((eq completions-format 'vertical) ;; Vertical format (when (> row rows) (forward-line (- -1 rows)) (setq row 0 column (+ column colwidth))) (when (> column 0) (end-of-line) (while (> (current-column) column) (if (eobp) (insert "\n") (forward-line 1) (end-of-line))) (insert " \t") (set-text-properties (1- (point)) (point) `(display (space :align-to ,column))))) ((eq completions-format 'horizontal) ;; Horizontal format (unless first (if (< wwidth (+ (max colwidth length) column)) ;; No space for `str' at point, move to next line. (progn (insert "\n") (setq column 0)) (insert " \t") ;; Leave the space unpropertized so that in the case we're ;; already past the goal column, there is still a space displayed. ;; We can't just set tab-width, because completion-setup-function will kill all local variables :-( (set-text-properties (1- (point)) (point) `(display (space :align-to ,column)))))) (t (when (> row 0) (insert "\n")))) (setq first nil) (if (not (consp str)) (add-text-properties (point) (progn (insert str) (point)) (list 'mouse-face 'highlight 'the-completion-text-property str 'face 'completions-choices-face)) (add-text-properties (point) (progn (insert (car str)) (point)) (list 'mouse-face 'highlight 'the-completion-text-property (car str) 'face 'completions-choices-face)) (let ((beg (point)) (end (progn (if (listp (cdr str)) (insert " [" (replace-regexp-in-string "\n" "\\\\n" (cadr str)) "]") (insert " [" (replace-regexp-in-string "\n" "\\\\n" (cdr str)) "]")) (point)))) (add-text-properties beg end (list 'mouse-face nil 'the-completion-text-property (if (listp str) (car str) str))) (font-lock-prepend-text-property beg end 'face 'completions-annotations-face))) (cond ((eq completions-format 'vertical) ;; Vertical format ;; (if (> column 0) ;; (forward-line) ;; (insert "\n")) (insert-char ?\n 2) (setq row (1+ row))) ((eq completions-format 'horizontal) ;; Horizontal format ;; Next column to align to. ;; Round up to a whole number of columns. (setq column (+ column (* colwidth (ceiling length colwidth))))) (t (setq row (1+ row)))))))))) (defun choose-completion (&optional event) "Choose the completion at point. If EVENT, use EVENT's position to determine the starting position." (interactive (list last-nonmenu-event)) ;; In case this is run via the mouse, give temporary modes such as ;; isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (with-current-buffer (window-buffer (posn-window (event-start event))) (let ((buffer completion-reference-buffer) (base-size completion-base-size) (base-position completion-base-position) (insert-function completion-list-insert-choice-function) (choice (save-excursion (goto-char (posn-point (event-start event))) (get-text-property (point) 'the-completion-text-property)))) (unless (buffer-live-p buffer) (error "Destination buffer is dead")) (when (null choice) (let ((debug-on-quit nil)) (signal 'quit '("choose-completion: Please try again!")))) (quit-window nil (posn-window (event-start event))) (with-current-buffer buffer (choose-completion-string choice buffer (or base-position (when base-size ;; Someone's using old completion code that doesn't know ;; about base-position yet. (list (+ base-size (field-beginning)))) ;; If all else fails, just guess. (list (choose-completion-guess-base-position choice))) insert-function))))) From unknown Sat Jun 21 10:43:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46091: ido: Add support for tab completion using an alist collection. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Jun 2022 19:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Keith David Bershatsky Cc: 46091@debbugs.gnu.org Received: via spool by 46091-submit@debbugs.gnu.org id=B46091.16551470851847 (code B ref 46091); Mon, 13 Jun 2022 19:05:02 +0000 Received: (at 46091) by debbugs.gnu.org; 13 Jun 2022 19:04:45 +0000 Received: from localhost ([127.0.0.1]:60400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0pMj-0000Tj-7w for submit@debbugs.gnu.org; Mon, 13 Jun 2022 15:04:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0pMh-0000TN-PC for 46091@debbugs.gnu.org; Mon, 13 Jun 2022 15:04:44 -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=XIDZyszFKI4toMhnMp+aH2tG3yA4iZwZGDakJntQgCc=; b=pvppdslhYeOnNbS7DzEVf59ofX VyVkVKw8WYKqfVyQ3aXaPGWe7zRgLtcdBYJk84j2YZEMOs1sySBFjDlx971URGHD/GWsdEpC4+78B Esn/emo5Xk/EH14kUFwJ+EiGm4I2I6BkDxP8mPYNzGUyYcuMd3Z2a55x2vZQov4Aysxk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0pMX-0003kg-W9; Mon, 13 Jun 2022 21:04:36 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Cabaret Voltaire's _Shadow Of Fear_: "Vasto" Date: Mon, 13 Jun 2022 21:04:31 +0200 In-Reply-To: (Keith David Bershatsky's message of "Sun, 24 Jan 2021 18:46:33 -0800") Message-ID: <87fsk8peps.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Keith David Bershatsky writes: > Currently, ido does not support tab completion using an alist collection. > > (require 'ido) > > (let* ((alist '(("pine" . "cones") > ("oak" . "acorns") > ("maple" . "seeds"))) > (choice (ido-comple [...] 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-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 (---) Keith David Bershatsky writes: > Currently, ido does not support tab completion using an alist collection. > > (require 'ido) > > (let* ((alist '(("pine" . "cones") > ("oak" . "acorns") > ("maple" . "seeds"))) > (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) > (cdr (assoc choice alist))) > > ;;; Debugger entered--Lisp error: (wrong-type-argument listp "seeds") > ;;; ido-no-final-slash(("maple" . "seeds")) > ;;; ido-file-lessp(("maple" . "seeds") ("oak" . "acorns")) (I'm going through old bug reports that unfortunately weren't resolved at the time.) You say "currently", but not what Emacs version this was about. I tried evaling the form above in Emacs 25.1 and Emacs 29, and it didn't fail in either of those cases, but perhaps there's something missing in the recipe? Or has this gone away since whateve version you say this in? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 13 15:04:55 2022 Received: (at control) by debbugs.gnu.org; 13 Jun 2022 19:04:55 +0000 Received: from localhost ([127.0.0.1]:60403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0pMp-0000U5-Gf for submit@debbugs.gnu.org; Mon, 13 Jun 2022 15:04:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0pMn-0000Tf-KA for control@debbugs.gnu.org; Mon, 13 Jun 2022 15:04:49 -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=eKTw4xd1RerF4i9+gKKyu552kmOkUmpO4PIWyL2zFI0=; b=j1ijyn2B6HW0junXKX87ZqdLhj cMBT0RUTkS7SQy/G3G6yPfjRfcAOcKVUN4CAj3WFdWPBngZlf9B2zY2lgzBWE3S1tq9iy4+GU6OyW QWiDt7/ao0BDdqkiCAarcVsZ5LLmxENn/aV8vfr7nh65q92c4R5y/OivcUoybLEUKt8Y=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0pMf-0003kp-V7 for control@debbugs.gnu.org; Mon, 13 Jun 2022 21:04:44 +0200 Date: Mon, 13 Jun 2022 21:04:39 +0200 Message-Id: <87edzspepk.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46091 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 46091 + moreinfo 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 46091 + moreinfo quit From unknown Sat Jun 21 10:43:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46091: ido: Add support for tab completion using an alist collection. References: In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Jun 2022 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Lars Ingebrigtsen Cc: 46091@debbugs.gnu.org Received: via spool by 46091-submit@debbugs.gnu.org id=B46091.165515417723142 (code B ref 46091); Mon, 13 Jun 2022 21:03:02 +0000 Received: (at 46091) by debbugs.gnu.org; 13 Jun 2022 21:02:57 +0000 Received: from localhost ([127.0.0.1]:60604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0rD7-00061C-7N for submit@debbugs.gnu.org; Mon, 13 Jun 2022 17:02:57 -0400 Received: from omta035.useast.a.cloudfilter.net ([44.202.169.34]:38300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0rD2-00060s-GF for 46091@debbugs.gnu.org; Mon, 13 Jun 2022 17:02:56 -0400 Received: from eig-obgw-5020a.ext.cloudfilter.net ([10.0.29.203]) by cmsmtp with ESMTP id 0iDIoOpI4zKIH0rCxod71t; Mon, 13 Jun 2022 21:02:47 +0000 Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with ESMTP id 0rCwoHdfgn3GB0rCwoX5gn; Mon, 13 Jun 2022 21:02:47 +0000 X-Authority-Analysis: v=2.4 cv=FeIkeby6 c=1 sm=1 tr=0 ts=62a7a5f7 a=rBgtZlU+0z8E5/GFQ55d2w==:117 a=rBgtZlU+0z8E5/GFQ55d2w==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=q-e_w-wVrh_5UYZV:21 a=kj9zAlcOel0A:10 a=JPEYwPQDsx4A:10 a=sQynR911rQIA:10 a=OocQHUDgAAAA:8 a=B4EZ5n07AAAA:8 a=mDV3o1hIAAAA:8 a=q3zKF6JNhuAmjwPeedgA:9 a=CjuIK1q_8ugA:10 a=B2tb0RpXjXeyiAlSLzXE:22 a=xUZTl98r3Qw_uB5NK3jt:22 a=R7ekuFvn7p7HQpfoSC_o:22 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To: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=bXGJStQwPAZ02e2jCgOonywd/lncFb9G0UB2fN1amT8=; b=FpcdXjZGNV2YW4HaCNbYtcPRk1 HoXb7pr2/XK/C3kmKkgL+SJh33HiNvGFpymqkzqb2LNnSp1LX87hdfI9vx6+wDn6AX3fGpF54CnOF YqOGcokmp90IX8zBVFKpMx8RRD8c3b4+CSb5wC8CHw8XKWr5Q592h5mxtwokTbvYE9XSFp+7+105n +pLweFzf2+MxeJi62YgsbJmGZP2MiIRHAtixQIST1Tscgw9QS6CCV9/dUeNMRnwNN1/d61j2PksO9 Fi1q0UrJ/3b4ORZS+SZrA1HYEK5w5dLCDQIG84BThCu5ikoYEEac0vbAKd5vYgqEWJTOIR4VqM9LM iEsGqu9A==; Received: from cpe-45-48-245-70.socal.res.rr.com ([45.48.245.70]:54106 helo=mp-capitan.local) by gator3053.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0rCv-000Whp-V2; Mon, 13 Jun 2022 16:02:46 -0500 Date: Mon, 13 Jun 2022 14:02:45 -0700 Message-ID: From: Keith David Bershatsky MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.245.70 X-Source-L: No X-Exim-ID: 1o0rCv-000Whp-V2 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-245-70.socal.res.rr.com (mp-capitan.local) [45.48.245.70]:54106 X-Source-Auth: lawlist X-Email-Count: 2 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-CMAE-Envelope: MS4xfPMlwQr143M0bhoWJgVw8TQyLpIhX3Re6/zcx6T/N5S4FqJ/9RMmwW0fSRie5f0nn993UpZACqAdpDJA9CIB6Akr5dU7EEcKKvqDzrnOandu4adLU336 TFGO8h9DUznNTi/k+FeYzYJsZVIo4jVrLX0/4aibHZiwiRdWv2j86RE5LkQnPwY2mloLaiWCudrrNqn6xjkafwZpZ8/7U+xfpLI= X-Spam-Score: -0.0 (/) 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: -1.0 (-) Thanks for having a look at this particular issue. After evaluating the snippet, press the TAB key. An error will occur in all recent versions of Emacs. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [06-13-2022 12:04:31] <13 Jun 2022 21:04:31 +0200> > From: Lars Ingebrigtsen > To: Keith David Bershatsky > Cc: 46091@debbugs.gnu.org > Subject: Re: bug#46091: ido: Add support for tab completion using an alist collection. > > Keith David Bershatsky writes: > > > Currently, ido does not support tab completion using an alist collection. > > > > (require 'ido) > > > > (let* ((alist '(("pine" . "cones") > > ("oak" . "acorns") > > ("maple" . "seeds"))) > > (choice (ido-completing-read "CHOOSE: " alist nil 'confirm))) > > (cdr (assoc choice alist))) > > > > ;;; Debugger entered--Lisp error: (wrong-type-argument listp "seeds") > > ;;; ido-no-final-slash(("maple" . "seeds")) > > ;;; ido-file-lessp(("maple" . "seeds") ("oak" . "acorns")) > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > You say "currently", but not what Emacs version this was about. > > I tried evaling the form above in Emacs 25.1 and Emacs 29, and it didn't > fail in either of those cases, but perhaps there's something missing in > the recipe? Or has this gone away since whateve version you say this in? From unknown Sat Jun 21 10:43:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46091: ido: Add support for tab completion using an alist collection. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jun 2022 12:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Keith David Bershatsky Cc: 46091@debbugs.gnu.org Received: via spool by 46091-submit@debbugs.gnu.org id=B46091.16552090871901 (code B ref 46091); Tue, 14 Jun 2022 12:19:01 +0000 Received: (at 46091) by debbugs.gnu.org; 14 Jun 2022 12:18:07 +0000 Received: from localhost ([127.0.0.1]:33324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o15Ul-0000Ub-HA for submit@debbugs.gnu.org; Tue, 14 Jun 2022 08:18:07 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o15Uj-0000Tf-Qd for 46091@debbugs.gnu.org; Tue, 14 Jun 2022 08:18:06 -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=ccaIJUEd+B3V/fq8mb92pywXHQeAZdl9qZN4KUZrjg4=; b=mkqzfnoC0XPil6g540SUgS9Pzx 1/1U5tkOLcUgNusSzlmiKcM6Xzrj8r1AuMfGCryNFa4VuuMUgmv3UHz6cllbbQglH93muQzHf+jXa X4j4RrkCRgW9iEzLEh470E1avqx2aY+mwiXMbQVrNTlBxE/ijtWYeGkG2+xIN1g8DR0g=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o15UZ-0006Ch-OE; Tue, 14 Jun 2022 14:17:58 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Coil's _Heartworms_: "Lost Rivers Of London" Date: Tue, 14 Jun 2022 14:17:54 +0200 In-Reply-To: (Keith David Bershatsky's message of "Mon, 13 Jun 2022 14:02:45 -0700") Message-ID: <87edzro2vh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Keith David Bershatsky writes: > Thanks for having a look at this particular issue. > > After evaluating the snippet, press the TAB key. An error will occur > in all recent versions of Emacs. 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-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 (---) Keith David Bershatsky writes: > Thanks for having a look at this particular issue. > > After evaluating the snippet, press the TAB key. An error will occur > in all recent versions of Emacs. Thanks; with that I'm able to reproduce the problem, and I've now fixed it in Emacs 29 (by just adjusting ido-completion-help, and not touching the central completion functions, which didn't seem necessary). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 08:18:11 2022 Received: (at control) by debbugs.gnu.org; 14 Jun 2022 12:18:12 +0000 Received: from localhost ([127.0.0.1]:33327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o15Up-0000Ut-Ni for submit@debbugs.gnu.org; Tue, 14 Jun 2022 08:18:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o15Un-0000US-OA for control@debbugs.gnu.org; Tue, 14 Jun 2022 08:18:09 -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=s4lcGYlDJvqmh7/TLHuviTy0WK7Hoj357SjkCPbDHTM=; b=RFWY54t+tHvaU+PGcX9fVUbfVP s7GuvPpBrQ0Wy5YcWySfOZuhRhpP1UCH0fqlZmFspq3qUzfQmzWaaxINgNj0ItQFuQt6UGIOMuoq5 QMmxWjiix8vdZ2Chont3pYkqQIxIl+/YzQlRMzmZyOgwHwPJ2hXO1a4IUBPLhYsE76vM=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o15Ug-0006Co-0c for control@debbugs.gnu.org; Tue, 14 Jun 2022 14:18:04 +0200 Date: Tue, 14 Jun 2022 14:18:00 +0200 Message-Id: <87czfbo2vb.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46091 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: close 46091 29.1 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 (---) close 46091 29.1 quit