From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kevin Vigouroux via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50583: 27.2; test-completion should return non-nil Date: Tue, 14 Sep 2021 15:25:49 +0200 Message-ID: <87ilz3p9uq.fsf@laposte.net> Reply-To: Kevin Vigouroux Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37624"; mail-complaints-to="usenet@ciao.gmane.io" To: 50583@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 14 15:34:16 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 1mQ8Zj-0009Yo-6Y for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Sep 2021 15:34:15 +0200 Original-Received: from localhost ([::1]:55490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQ8Zh-0001d5-Uz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Sep 2021 09:34:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ8Sk-0007BB-PR for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 09:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQ8Sk-0007rm-Fy for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 09:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQ8Sk-00038C-5f for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 09:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Vigouroux Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Sep 2021 13:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50583 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.163162597411977 (code B ref -1); Tue, 14 Sep 2021 13:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2021 13:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:48017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ8Rx-000376-Gd for submit@debbugs.gnu.org; Tue, 14 Sep 2021 09:26:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ8Rv-00036y-92 for submit@debbugs.gnu.org; Tue, 14 Sep 2021 09:26:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ8Rv-00051M-0Z for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 09:26:11 -0400 Original-Received: from smtp-outgoing-1702.laposte.net ([160.92.124.100]:35901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ8Rr-00072J-4U for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 09:26:10 -0400 X-mail-filterd: {"version":"1.3.1", "queueID":"4H83y94Kgfz14K0c", "contextId":"91d93eb1-52c4-4150-9146-81e9f17342f3"} Original-Received: from outgoing-mail.laposte.net (localhost.localdomain [127.0.0.1]) by mlpnf0109.laposte.net (SMTP Server) with ESMTP id 4H83y94Kgfz14K0c for ; Tue, 14 Sep 2021 15:25:53 +0200 (CEST) X-mail-filterd: {"version":"1.3.1", "queueID":"4H83y92D33z14K0Z", "contextId":"97537899-8991-421f-8ee7-60c1d1b0a202"} X-lpn-mailing: LEGIT X-lpn-spamrating: 50 X-lpn-spamlevel: not-spam X-lpn-spamcause: OK, (0)(0000)gggruggvucftvghtrhhoucdtuddrgedvtddrudegledgiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecunfetrffquffvgfdpqfgfvfdpggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttddtjeenucfhrhhomhepmfgvvhhinhcugghighhouhhrohhugicuoehkvgdrvhhighhouhhrohhugieslhgrphhoshhtvgdrnhgvtheqnecuggftrfgrthhtvghrnheptdeukeegfedthedugeevgfefkeegfffhheelveeludeukeejvddvkeeffffhtdfhnecukfhppedutdelrddvudekrdduvdelrdduudegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddtledrvddukedruddvledruddugedphhgvlhhopegrrhgrghhoghdpmhgrihhlfhhrohhmpehkvgdrvhhighhouhhrohhugieslhgrphhoshhtvgdrnhgvthdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg Original-Received: from aragog (arennes-653-1-290-114.w109-218.abo.wanadoo.fr [109.218.129.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mlpnf0109.laposte.net (SMTP Server) with ESMTPSA id 4H83y92D33z14K0Z for ; Tue, 14 Sep 2021 15:25:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=laposte.net; s=lpn-wlmd; t=1631625954; bh=ZqEa2ctT7cq3mZ1pEuwAC8gQOxdlYRUo/8lAQ/L7vP8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UVlKf9+Ca0vQNDZi8kjeR5XFKU89p3k2DLNUzDiLkSJxiUj/kX9Qtt9F2Ti+uiq1v6jKRld0ojGhz9J1XcpopFgvoFVmUwbhpTkQ847LaiVjjt/boAxEtpjTdRcpY28mxWudtmph0x+mDLVjp1vEx070ay7WlPVbuVuUpTmKCfCI3QXLfT4OHr3ELpQU5JNbUUUjjc6BdJK6zoZHrQAtuZKiO0OvFcdx1pe9zIbLUHHOqaF5o0pHCeLNZO0UPcJwr4MkYv5T+nOFYunY9ZVwj5U8f+iBnyivFnKIVgJ4HUYsFuz07YPgnLxEKV2vzc3f1FRLl/CafnjBbKces4Lv9Q==; Received-SPF: pass client-ip=160.92.124.100; envelope-from=ke.vigouroux@laposte.net; helo=smtp-outgoing-1702.laposte.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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:214309 Archived-At: In the following code, I assume that `test-completion' should return a non-=E2=80=98nil=E2=80=99 value because "foo" is a valid completion alterna= tive. (test-completion "foo" '("foobar" "bar" "barfoo")) =3D> nil (try-completion "foo" '("foobar" "bar" "barfoo")) =3D> "foobar" #+begin_quote=20 -- Function: test-completion string collection &optional predicate This function returns non-=E2=80=98nil=E2=80=99 if STRING is a valid c= ompletion alternative specified by COLLECTION and PREDICATE. The arguments are the same as in =E2=80=98try-completion=E2=80=99. For instance, if= COLLECTION is a list of strings, this is true if STRING appears in the list and PREDICATE is satisfied. This function uses =E2=80=98completion-regexp-list=E2=80=99 in the sam= e way that =E2=80=98try-completion=E2=80=99 does. If PREDICATE is non-=E2=80=98nil=E2=80=99 and if COLLECTION contains s= everal strings that are equal to each other, as determined by =E2=80=98compare-strings=E2=80=99 according to =E2=80=98completion-ign= ore-case=E2=80=99, then PREDICATE should accept either all or none of them. Otherwise, the return value of =E2=80=98test-completion=E2=80=99 is essentially unpre= dictable. If COLLECTION is a function, it is called with three arguments, the values STRING, PREDICATE and =E2=80=98lambda=E2=80=99; whatever it ret= urns, =E2=80=98test-completion=E2=80=99 returns in turn. #+end_quote In GNU Emacs 27.2 (build 1, aarch64-unknown-linux-gnu, GTK+ Version 3.24.27= , cairo version 1.17.4) of 2021-03-26 built on leming Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Manjaro ARM Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit Mark set [2 times] Making completion list... Quit nil "foobar" nil Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz 'CFLAGS=3D-march=3Darmv8-a -O2 -pipe -fno-plt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: fr_FR.UTF-8 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 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 modus-operandi-theme pcase modus-themes gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win smtpmail sendmail message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr wid-edit info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv 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 lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 163236 36337) (symbols 48 13579 1) (strings 32 33525 2404) (string-bytes 1 1125620) (vectors 16 17161) (vector-slots 8 210976 13280) (floats 8 159 47) (intervals 56 372 69) (buffers 1000 13))