From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Improvement proposals for `completing-read' Date: Thu, 08 Apr 2021 14:13:01 -0400 Message-ID: References: <0342c2d5-02dd-ad9e-5b8e-dfe52f6469c6@daniel-mendler.de> <264397e8-5a03-9eff-436c-639d76514775@daniel-mendler.de> <82c86e8f-06e7-a7ed-56c5-5f6766df591b@daniel-mendler.de> <2d5f6967-c950-d6f2-f8a8-fe4532b2207b@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16239"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 08 20:14:14 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lUZAU-00045f-8K for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Apr 2021 20:14:14 +0200 Original-Received: from localhost ([::1]:58596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUZAT-00083D-32 for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Apr 2021 14:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUZ9T-0007aa-1p for emacs-devel@gnu.org; Thu, 08 Apr 2021 14:13:11 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUZ9O-0007JQ-HF for emacs-devel@gnu.org; Thu, 08 Apr 2021 14:13:10 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 21B6644131E; Thu, 8 Apr 2021 14:13:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CE75C4409FE; Thu, 8 Apr 2021 14:13:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1617905582; bh=n5Fcs1fcsM2zOVuW9vVPum6oT2las45jcPS1mVxDQzw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Q4MUC1x2UZcn7ELgi+zOw+in3rI+hzwbalhxEfNNNeIwQQewLXmaJgj9nRpXNK771 46kIAqDdyipgMV9PXXxnsM/7VczZZPdNmMYZZLba2dDXxihzEx0BbDzopHeNOJWYqs kW8oFrVxv7sQzrB1pVociN661SZQGURkRcIcv7lfJ/GcP6UVm/9XFapUb3nFYsANvf SB9FA4mzXlGcrQuBnimzHnaZkXoivtMra9hDFy2WWX15frpcD1tge/dFD5gj4+ZkRj PgKFJ7AlTAwYv06hpEw9rDwrwgx1LM4j8YrchDmG2+el72pfwiK7GraKfjuN1aC+CW ywEZ/wd+DkRSg== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9BF00120189; Thu, 8 Apr 2021 14:13:02 -0400 (EDT) In-Reply-To: <2d5f6967-c950-d6f2-f8a8-fe4532b2207b@daniel-mendler.de> (Daniel Mendler's message of "Thu, 8 Apr 2021 19:57:50 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267647 Archived-At: > This is similar to what I am doing in my `consult-line` command, which is > a Swiper equivalent. There I encode the line number in Unicode characters of > some private plane and hide them with 'invisible or 'display. I can understand the `invisible` but I would have used plain `%s` or `number-to-string` rather than funny unicode chars. > If I could mark that part of the string as 'unmatchable I would be happy to! Fun fact: I use a locally-hacked isearch.el that lets me do `C-s NNNN` to go to line NNNN. > Maybe that's the cleaner solution? The nice advantage is that it would be > backward compatible. I could just start to mark my prefixes as 'unmatchable Why put it in the prefix rather than the suffix? > and the basic completion style would suddenly start to work. On older Emacs > versions everything would continue to work as is; the user is required to > use a completion style which matches substrings, If you put the line numbers in the suffix, then they won't bother anyone, even with the most basic completion scheme. Stefan