From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#56613: 29; minibuffer-complete-history throws an error for minibuffer-history-variable=t Date: Mon, 18 Jul 2022 10:24:55 +0300 Organization: LINKOV.NET Message-ID: <86wncayjaw.fsf@mail.linkov.net> References: <86bktna9zo.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24234"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , 56613@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 18 09:26:18 2022 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 1oDL8z-00068Q-80 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 09:26:17 +0200 Original-Received: from localhost ([::1]:60610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDL8w-0001q7-AM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 03:26:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDL8k-0001pz-W9 for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 03:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDL8k-0007CM-NZ for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 03:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDL8k-0001tw-HD for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 03:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jul 2022 07:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56613 X-GNU-PR-Package: emacs Original-Received: via spool by 56613-submit@debbugs.gnu.org id=B56613.16581291517289 (code B ref 56613); Mon, 18 Jul 2022 07:26:02 +0000 Original-Received: (at 56613) by debbugs.gnu.org; 18 Jul 2022 07:25:51 +0000 Original-Received: from localhost ([127.0.0.1]:49099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDL8Y-0001tV-NX for submit@debbugs.gnu.org; Mon, 18 Jul 2022 03:25:50 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDL8V-0001tG-OP for 56613@debbugs.gnu.org; Mon, 18 Jul 2022 03:25:49 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2ECC240010; Mon, 18 Jul 2022 07:25:37 +0000 (UTC) In-Reply-To: (Daniel Mendler's message of "Sun, 17 Jul 2022 22:10:04 +0200") 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:237328 Archived-At: > In order to disable sorting from the side of the completion table, it is > better to use the completion metadata. This way the sort function will > also be picked up by all the alternative completion UIs. > > (completion-in-region > (minibuffer--completion-prompt-end) (point-max) > (lambda (str pred action) > (if (eq action 'metadata) > '(metadata (display-sort-function . identity) > (cycle-sort-function . identity)) > (complete-with-action action completions str pred)))) Thanks for the suggestion, now fixed as well. Stefan added this comment in minibuffer-complete-history: ;; FIXME: Can we make it work for CRM? But I can't find a function that would return the current completion boundaries to use instead of hard-coding minibuffer--completion-prompt-end and point-max. Then completing-read-multiple should set locally such a function that will use crm-separator and return a cons (BEG . END).