From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 10:45:13 2020 Received: (at submit) by debbugs.gnu.org; 7 Feb 2020 15:45:13 +0000 Received: from localhost ([127.0.0.1]:50156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j05of-0007VG-4L for submit@debbugs.gnu.org; Fri, 07 Feb 2020 10:45:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:44063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j05od-0007V6-Ha for submit@debbugs.gnu.org; Fri, 07 Feb 2020 10:45:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45198) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j05oc-0006Ao-ID for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 10:45:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j05ob-0004zA-Iu for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 10:45:10 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:43147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j05ob-0004wz-9N for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 10:45:09 -0500 Received: by mail-pg1-x535.google.com with SMTP id u131so1318217pgc.10 for ; Fri, 07 Feb 2020 07:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Kh91yJzxIlvod0gV17j5cp7ttr7hzWwgUh52tgBVqVY=; b=JEP8x3CAoaaOGqCd7/CLD/3RAqE7dxtU42fQLgGsi/ocTpdbCtOuEcGyWoRsI7+iiN MwjyJZaZvJJNwsqTwMY6QlUq3liRW8zHXgc9EgVLvRqkozzLjG2CL4CgY6KPB9Z+Tm7C m/NPBBsPhg/W97bmbyNKk5OCYL3eYs3Rg4FWg7Wd/CS4xfq/7C1FNeA6JzdtHBGxcMpc UG1RZRGkSLhxUykILWON3ZZ+Z9gB/OBEgKgQImmHPg1KDpxiC/ZqKUij8AXGIYz+gnGz Piu4Chaf6w8/50v4iBOakVC6IcRHD6QBP/E9b3ey2mGWQQWc8wRm9jVOmeCrtTreqF/z 2O9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Kh91yJzxIlvod0gV17j5cp7ttr7hzWwgUh52tgBVqVY=; b=PGywmxsC2AAQL3bUu4x4bPMMs2BbU8OXhvDijRqvUKkkOxcE3bBa8CxFgd7XKyMAtP HYbuUT5g4DyFhjs2pXNLBpbSyGorY+Q6G7zIJTf5L3Eg/ZnJxOz5BsA+gp0S+PCruyp9 ixbGqxaarHwGjl1yjRidS86mZISYkrrRRdDra2ZQxFmRz+0Be5O83BoDjFqKEr/JHVSU 4xHqgGB0VYq1fltczhbACA02sud48XkHVcr1KYMvSsEHFMeCmfxX4i6/CdOkosGSLnDI FkOn7Li4r+vOhz9eEECHzii2Orm4V2II+7VZbUxVYq2Cj7PhdfWnmYrjbLHvYyGPopHx GBZg== X-Gm-Message-State: APjAAAVID4ZHStNK9+AL0wLPoWBNb9YJNDT8+S+O5SC+4+uVnGQZuTtQ Ma023TJaGkWvTdohiYjafk/YT1Ub X-Google-Smtp-Source: APXvYqy10XuNvx9ywTUE7Dl+to1qTJJ5MKm5Gtasgdw0cJU4aEheAkD+FJdZf01WfsZiul1wpD6b6A== X-Received: by 2002:a63:fb57:: with SMTP id w23mr58990pgj.231.1581090307609; Fri, 07 Feb 2020 07:45:07 -0800 (PST) Received: from [10.81.100.134] ([50.206.120.10]) by smtp.googlemail.com with ESMTPSA id f127sm3642800pfa.112.2020.02.07.07.45.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Feb 2020 07:45:06 -0800 (PST) To: bug-gnu-emacs@gnu.org From: Wanrong Lin Subject: 26.3; try-completion bug Message-ID: Date: Fri, 7 Feb 2020 10:44:57 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::535 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: try-completion does not work as expected when completion-ignore-case is t. Examples: (let ((completion-ignore-case t))        (try-completion "xy" '("XyzD" "XyzAbc"))        ) ==> "Xyz" Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wrglin[at]gmail.com) 2.0 SPOOFED_FREEMAIL No description available. 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: -0.7 (/) try-completion does not work as expected when completion-ignore-case is t. Examples: (let ((completion-ignore-case t))        (try-completion "xy" '("XyzD" "XyzAbc"))        ) ==> "Xyz" Expected. The return value has uppercase "X", since the return value should be the maximum substring among all the *candidates*. (let ((completion-ignore-case t))        (try-completion "xyz" '("XyzD" "XyzAbc"))        ) ==> "xyz" *Unexpected*. Should be "Xyz". Thanks for looking into this. Wanrong From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 14:42:48 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 18:42:48 +0000 Received: from localhost ([127.0.0.1]:45848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXTvk-0006O3-LK for submit@debbugs.gnu.org; Tue, 27 Oct 2020 14:42:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXTvj-0006Nn-RE for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 14:42:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=wfNzEpMSB2MkLck/Aad/qk5wYbauQj99mz+togsFBrs=; b=UUYoj2rOGCuDyyj/APngf9XGqJ 3lB9SoQi3I6RrqaR8ez5BsEWkjuNL0uuckx6eVXphR7P8jAvlnPg6bGExw1bUNY8/b9GD2bjc8yzN 30DmZv0IdNT1IDPzY3rIDvchNs6dfE3JYOXwGxERULj5BvzPe3zLrEBYwbU2Z9iZoIZk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXTva-0002aC-IQ; Tue, 27 Oct 2020 19:42:41 +0100 From: Lars Ingebrigtsen To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug References: X-Now-Playing: Zola Jesus's _Live at Roadburn_: "Dangerous Days" Date: Tue, 27 Oct 2020 19:42:37 +0100 In-Reply-To: (Wanrong Lin's message of "Fri, 7 Feb 2020 10:44:57 -0500") Message-ID: <874kmf1peq.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Wanrong Lin writes: > (let ((completion-ignore-case t)) >        (try-completion "xyz" '("XyzD" "XyzAbc")) >        ) > ==> "xyz" > > *Unexpected*. Should be "Xyz". That is somewhat odd, especially considering: 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: 0.0 (/) X-Debbugs-Envelope-To: 39484 Cc: Stefan Monnier , 39484@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: -1.0 (-) Wanrong Lin writes: > (let ((completion-ignore-case t)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (try-completion "xyz" '("XyzD" "XyzA= bc")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ) > =3D=3D> "xyz" > > *Unexpected*. Should be "Xyz". That is somewhat odd, especially considering: (let ((completion-ignore-case t)) (try-completion "xyz" '("XyzaD" "Xyzabc"))) =3D> "Xyza" Stefan? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 15:09:04 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 19:09:04 +0000 Received: from localhost ([127.0.0.1]:45872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXULA-0002o0-6Q for submit@debbugs.gnu.org; Tue, 27 Oct 2020 15:09:04 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXUL8-0002nY-2X for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 15:09:02 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLLph132zz1qs3d; Tue, 27 Oct 2020 20:08:59 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLLpg5yCyz1qqkx; Tue, 27 Oct 2020 20:08:59 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wYVepdEXAorj; Tue, 27 Oct 2020 20:08:58 +0100 (CET) X-Auth-Info: 0TgupuL291XTWGEq6STNTIlzD0+tJMwLoV/G34+1BxQEjH5zvzrVhAFk1BtesEfc Received: from igel.home (ppp-46-244-161-64.dynamic.mnet-online.de [46.244.161.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 27 Oct 2020 20:08:58 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 625B52C1C4A; Tue, 27 Oct 2020 20:08:58 +0100 (CET) From: Andreas Schwab To: Lars Ingebrigtsen Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> X-Yow: Are we THERE yet?? Date: Tue, 27 Oct 2020 20:08:58 +0100 In-Reply-To: <874kmf1peq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 27 Oct 2020 19:42:37 +0100") Message-ID: <87361zbi5x.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.4 (-) On Okt 27 2020, Lars Ingebrigtsen wrote: > Wanrong Lin writes: > >> (let ((completion-ignore-case t)) >>        (try-completion "xyz" '("XyzD" "XyzAbc")) >>        ) >> ==> "xyz" >> >> *Unexpected*. Should be "Xyz". > > That is somewhat odd /* If we are ignoring case, and there is no exact match, and no additional text was supplied, don't change the case of what the user typed. */ Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 15:17:45 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 19:17:45 +0000 Received: from localhost ([127.0.0.1]:45904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXUTY-00032s-Ns for submit@debbugs.gnu.org; Tue, 27 Oct 2020 15:17:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:32770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXUTW-00032g-J4 for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 15:17:43 -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=avL3wyuzoc82T8U4civLHidsMhhDrlNDGAHSDRiyfuA=; b=MIVRDHW/xiCOiBz4DeFfUthjsp Z007jT23c+MG/tEpj81d3XIPlvRLyteIfc/YwctItn8+KY2uK5nL2CbxJCTC6PZxHUPJMR0KJQsxA gkUJN/I2DBGTkVJqkMg+5efNkoJJ72cBBqSrAl0s9Ki36juWRkXoS6TxGvsU1VwJCPt0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXUTM-0003RN-Hy; Tue, 27 Oct 2020 20:17:35 +0100 From: Lars Ingebrigtsen To: Andreas Schwab Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEUNCgkvLCpQTUxx bm2Oi4oiHh3JxsViX12sqahBQD5BPTyCfnyCgH7////cAm+xAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+QKGxMEEOsS80IAAAFrSURBVDjLjdIxT8JAFAfwttg46ND/1UtRF65YZcQeBBIXKRCQiZI06KiL jhYGjHExwTC4iN9AEz8Am6uTX8ubiPQeCW/r++Xa/3tXw9igTLEGXFmgwW81yL7N3BsaPDlbc2Ia 0d+Af0pDHJfXAO7J/hVosEZAhZrQ7QDuNRFWyDn4lIDUfRS87mhgCowmIq8HNsGZ5LWFDgHgs/C4 r6VdACdP4d55FgZhDM87RZqFQ8nBvRZWFmzz2Cip+eDW/Bc7Mf8lgt0N0xjD6KGsHpbDxODWXTgG WLPbNpEskyVxYnZ/iypw51u9anUjr5OiAIvq2c3n2mcVgeFFMbusnDiSAYY/79nJLcHkF1iKLNjT iVSp5lxbYj4UasKDQAOrofrss6pfYXNfyUdBh1KqAARcPqt+7Ohg3QJ80NfBcAN1IwZVgoPs21X0 SVD/CQ3b0ndI2On2aNjqrTmxO2M0WK3ojQRjXKP7hukYG9QfraA5OGr6jiQAAAAldEVYdGRhdGU6 Y3JlYXRlADIwMjAtMTAtMjdUMTk6MDQ6MTYrMDA6MDD8NUtGAAAAJXRFWHRkYXRlOm1vZGlmeQAy MDIwLTEwLTI3VDE5OjA0OjE2KzAwOjAwjWjz+gAAAABJRU5ErkJggg== X-Now-Playing: Zola Jesus's _Live at Roadburn_: "Exhumed" Date: Tue, 27 Oct 2020 20:17:31 +0100 In-Reply-To: <87361zbi5x.fsf@igel.home> (Andreas Schwab's message of "Tue, 27 Oct 2020 20:08:58 +0100") Message-ID: <87h7qfzdf8.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: Andreas Schwab writes: > /* If we are ignoring case, and there is no exact match, > and no additional text was supplied, > don't change the case of what the user typed. */ Should this be mentioned in the doc string? 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: 0.0 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.0 (-) Andreas Schwab writes: > /* If we are ignoring case, and there is no exact match, > and no additional text was supplied, > don't change the case of what the user typed. */ Should this be mentioned in the doc string? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 16:17:53 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 20:17:53 +0000 Received: from localhost ([127.0.0.1]:46024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVPk-0006fX-RY for submit@debbugs.gnu.org; Tue, 27 Oct 2020 16:17:53 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:34589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVPi-0006fI-LA for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 16:17:51 -0400 Received: by mail-pf1-f179.google.com with SMTP id o129so1588345pfb.1 for <39484@debbugs.gnu.org>; Tue, 27 Oct 2020 13:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=SFqUbCp45kGCYjK3qveCyWizLqxVCGmagE7DO+Etb58=; b=c7KzmuXmsMQTwpvp4ohpx388tLG3t6n3JYW1e21DhDmN0PZYBqThJ1oGPOI+91u/MT N4qHnF38jWvV203Sobs6QhWnW6Q91BXP19Szz1Vi0clBElUCUB/L+pKiJaH/eCgkso2h oH40HInhWRBuNQUbRYSE/geFhte0sD9ClhyulwHy+1UAuvX8iRUnDb6uLxYZwY9SJAzX Bnf9vYhmdeMOHBJmpBi1+pfx3X/DTTEMfAuSV05UO3bLZrrlbQwH3VVkEiP9KSCyjcUS 2nTO1vLz1g+afyhUuFEy2wMxZeSuaHMoVTPVgNJJJoIh3ravZjeiGViH+MSJFOTdsPeI lA6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=SFqUbCp45kGCYjK3qveCyWizLqxVCGmagE7DO+Etb58=; b=AP7DarethautL72nxQOB+zwrsevHiGgzT41NpANOW1OF6AWpSAblgKMXeehokBVPgl z5a8l/qU6P6/AKpdMxJ+h6za7zD68r3xpM0ygMZ6O6d4Q4us/UBL+XslL3C1ez7wKPWw UZajS8I1PitI+KUL3K9mQKiJO9q43qQfh4NdVomuYnG44Wn5VvpoBcio2DUNZ2t/kVlk PQBsDHnOj5xDxKZenPZlIytSC5BoCJBBqsIZBzhlpG1weZLXPYyQi3B1pDNqKUNwuLnl IQByPsI10sZNwAXT7PLXDkiq+tKrCwNtJekBO6KK9XHDJNm5lP9it/ONZqL8p4HVvUV3 uXHw== X-Gm-Message-State: AOAM530xKtHEdi84JJcz4pn0srSSiaIy56pK3Xj2QKXZpnFm3lloidO/ FMhAa7pKCAej0lJTIA0j3CxnLeIYyzkIjg== X-Google-Smtp-Source: ABdhPJzwtUgpoDJsY8wFQ9Y4VuAppdHAh0XnVRa7l4UxYBmfR/dqyH6UeWulAFhm0sRS6Fzl/ZbJdw== X-Received: by 2002:a63:5466:: with SMTP id e38mr3380763pgm.23.1603829864643; Tue, 27 Oct 2020 13:17:44 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id ev5sm410723pjb.2.2020.10.27.13.17.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 13:17:43 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug To: Lars Ingebrigtsen , Andreas Schwab References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> From: Wanrong Lin Message-ID: Date: Tue, 27 Oct 2020 16:17:35 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <87h7qfzdf8.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 39484 Cc: Stefan Monnier , 39484@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.2 (---) I am curious what is the rationale behind this behavior? I remember this behavior gives me problem in "ido" trying to expand the user input to the max common matched text among all candidates, because as you can see, the "expansion" using this method may end up returning something that is not common at all for all the candidates. On 10/27/2020 3:17 PM, Lars Ingebrigtsen wrote: > Andreas Schwab writes: > >> /* If we are ignoring case, and there is no exact match, >> and no additional text was supplied, >> don't change the case of what the user typed. */ > Should this be mentioned in the doc string? > From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 16:28:40 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 20:28:40 +0000 Received: from localhost ([127.0.0.1]:46042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVaC-0006wH-6k for submit@debbugs.gnu.org; Tue, 27 Oct 2020 16:28:40 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:46019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVaA-0006w9-Rh for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 16:28:39 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLNZX4v4hz1rsMj; Tue, 27 Oct 2020 21:28:36 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLNZX2VMRz1qxgj; Tue, 27 Oct 2020 21:28:36 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id OLCer8rhC0K7; Tue, 27 Oct 2020 21:28:35 +0100 (CET) X-Auth-Info: wE/KdhCde4LOy26kAHlF0H77OlZLxDyuXdLWhtaVDImhrbVTfmztS2OAaQeMfSnx Received: from igel.home (ppp-46-244-161-64.dynamic.mnet-online.de [46.244.161.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 27 Oct 2020 21:28:35 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 96FED2C1C4A; Tue, 27 Oct 2020 21:28:34 +0100 (CET) From: Andreas Schwab To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> X-Yow: Awright, which one of you hid my PENIS ENVY? Date: Tue, 27 Oct 2020 21:28:34 +0100 In-Reply-To: (Wanrong Lin's message of "Tue, 27 Oct 2020 16:17:35 -0400") Message-ID: <87y2jr9zwt.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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: -1.4 (-) On Okt 27 2020, Wanrong Lin wrote: > I remember this behavior gives me problem in "ido" trying to expand the > user input to the max common matched text among all candidates, because > as you can see, the "expansion" using this method may end up returning > something that is not common at all for all the candidates. It isn't? "xyz" surely is a common prefix of "XyzD" and "XyzAbc", ignoring case. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 16:44:36 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 20:44:36 +0000 Received: from localhost ([127.0.0.1]:46085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVpc-0007MB-1i for submit@debbugs.gnu.org; Tue, 27 Oct 2020 16:44:36 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:37354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVpZ-0007Lw-CO for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 16:44:34 -0400 Received: by mail-pj1-f42.google.com with SMTP id lt2so1356162pjb.2 for <39484@debbugs.gnu.org>; Tue, 27 Oct 2020 13:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=DNuL0CjKTyIpN8OWa2gHXHubKCUCIiw1Cyw7u3F70DY=; b=XpQPRPMSI13qAd89GBqZOVBQvF7RaIiunkHeYGOF1lxjOt44cDaUSQXDIVi4vUs5AL ADCoGR/C2LPbWFadNyLD/A6hXN4P3OhJoEVJQ+1ONZugLaZ8oO+MrOsSNJ4+v6WNtmJp R4T8CPzBJaIV4Ri3Dc5jtVJLXkZzXYpAIFdIWVNU7p+PXHDFEXB7q1FaZEcvh130UqTX vmVjf3OPhiYXFqlXgpaODeTXD8ZNils5FEXDf8NrhYpXPrPgnEXaczreUgIesXzpFclm pPASsPzpgln9gmajMb0uYyZYVFFLvlF14nARGjBakvL0CYvCB+VMB6AifmXWcJuyM1Pi W1Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=DNuL0CjKTyIpN8OWa2gHXHubKCUCIiw1Cyw7u3F70DY=; b=oaIHqlczln/7Ke66rwBm8A1oaUdCIgE90U9ecWRzfB5TDlHnEyiQisCvJ5SW4qVYnK XRce7vBOPEOYKdCIfoq5voikCGa1cyznhis6MiYYbemsAmwrbuhoc9BDTmPt25HkTZP0 pL2QvC9jhDNCmy3YIV+dBfcUzBXSKPwD3SS+ZW2Iya7OfalVU2E7QRGLCHJIIZMoM4Ar 3SciOW6W7ceUDP/U4KRgdLmC56BXBkYKI9eREeAR2h/Ycys9yOcYYKfa5CeIYbKDdgq2 KFhQV3VUVSOldtSPR628iBoyhCvTZfB4S38nxjnIfRfzpkxMym4UFXMVdqDeUApG2NrM 6tww== X-Gm-Message-State: AOAM532PX8YE0wdQST9u7Q98yKAETshhmlSMQWYs86LPmixpzScxUUP0 2vHApJ/YlLIhWMZ4goo8BmQoDnEorEDP7g== X-Google-Smtp-Source: ABdhPJzsseTupaSqfkS7jJjFqy1PHrUmu0ufCHN6OlV3GBEWMDByRt7fp30qLxIDN3XMaDMWZ3zP8g== X-Received: by 2002:a17:90a:e615:: with SMTP id j21mr3661299pjy.66.1603831467223; Tue, 27 Oct 2020 13:44:27 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id 17sm3153556pfj.49.2020.10.27.13.44.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 13:44:26 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug To: Andreas Schwab References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> From: Wanrong Lin Message-ID: <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> Date: Tue, 27 Oct 2020 16:44:25 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <87y2jr9zwt.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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.2 (---) My understanding is: "ignoring case" here applies to the comparison part, not the returning part. What makes me think so: 1. That variable name is "completion-ignore-case", meaning, complete as much as possible ignoring case in comparison. But still, the action is to "complete", and "complete" should use the original candidate text when possible. 2.  the first example did return the original text in the candidate instead of the user input. (let ((completion-ignore-case t))        (try-completion "xy" '("XyzD" "XyzAbc"))        ) ==> "Xyz" I am not saying other behaviors are "wrong", but not ideal in my view, and there should be some rationale (performance?) behind it. Wanrong On 10/27/2020 4:28 PM, Andreas Schwab wrote: > On Okt 27 2020, Wanrong Lin wrote: > >> I remember this behavior gives me problem in "ido" trying to expand the >> user input to the max common matched text among all candidates, because >> as you can see, the "expansion" using this method may end up returning >> something that is not common at all for all the candidates. > It isn't? "xyz" surely is a common prefix of "XyzD" and "XyzAbc", > ignoring case. > > Andreas. > From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 17:21:31 2020 Received: (at 39484) by debbugs.gnu.org; 27 Oct 2020 21:21:31 +0000 Received: from localhost ([127.0.0.1]:46184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXWPL-0008KY-Hv for submit@debbugs.gnu.org; Tue, 27 Oct 2020 17:21:31 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:36467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXWPJ-0008KI-UF for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 17:21:30 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLPlX46knz1rtZb; Tue, 27 Oct 2020 22:21:28 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLPlX3Zkkz1qxgn; Tue, 27 Oct 2020 22:21:28 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ncg5nXyCD-nk; Tue, 27 Oct 2020 22:21:27 +0100 (CET) X-Auth-Info: FJPhkd0oGBF8OcKw+VaM64fo9/kIDr4ZJMqA4jje6POr6fxes5Smnev54NwXbTpM Received: from igel.home (ppp-46-244-161-64.dynamic.mnet-online.de [46.244.161.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 27 Oct 2020 22:21:27 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id C0A932C1C4A; Tue, 27 Oct 2020 22:21:26 +0100 (CET) From: Andreas Schwab To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> X-Yow: You mean you don't want to watch WRESTLING from ATLANTA? Date: Tue, 27 Oct 2020 22:21:26 +0100 In-Reply-To: <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> (Wanrong Lin's message of "Tue, 27 Oct 2020 16:44:25 -0400") Message-ID: <87tuuf9xgp.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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: -1.4 (-) So what should (try-completion "abc" '("Abcde" "aBcdf" "abCdg")) return? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 20:45:06 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 00:45:06 +0000 Received: from localhost ([127.0.0.1]:46425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZaL-0006vM-Vf for submit@debbugs.gnu.org; Tue, 27 Oct 2020 20:45:06 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:32947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZaL-0006uY-3J for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 20:45:05 -0400 Received: by mail-pj1-f52.google.com with SMTP id g19so514501pji.0 for <39484@debbugs.gnu.org>; Tue, 27 Oct 2020 17:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=B4Ip0pqioAk//Npa7sclrw85m2NlK1o746FuOOmI/3A=; b=NnoQ6itUv8C4hOBZQAq6jKvGEW6vZ7Ypyvm6HqyU3wr/qJHX80U13vBUDFiVk5/XzT vK959SeK/iL53cKojFv8gpCu7jWcI23OGNR7rlSL2hLTE8l8y8h1DwucTCDODNNRlUms yMz77o3+6YCDSH7SA90E2G+n1mm6mDt2HFqQrzShhZgAKr1R2iy+qrHjrnE3q25xZ3HJ fxxbelcOkW9842jL+T602wHlr5kUiPL8CwH8e5JvV6aFuikyGwmJxINdtNelzX2Kywx6 BVq0fl4DFm6ObUppsVJN6wsw8XUost6XsDjJ4XSPTKmQ1dYcjYMsx8/+wmCL4p5f2Kk3 sshg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=B4Ip0pqioAk//Npa7sclrw85m2NlK1o746FuOOmI/3A=; b=r4vBKczwSPfBBfzKGHsgu1i8e0h5s/f7TE+fCIm8eDGSqW7thJsnXnoP+j49wA5pAd xD6r9Io4XtIWih64GV+VrBkm/1LT3qj9G4lo78WHP2Miy8PNigWRZtArQ6wfjfJQrKLf v69MdJNCwFJkjEhdmOlgEKq38OgfBIayvCgCkPu5kCtElSLwCYai1N7N3HQWg4uGEsg7 +9w73RXM2aqvxb3C3T4p0AsTjI7UWtvWoqCGqSbtNnMSqA9GvL/u5/zPoARJTIadLlar BlKdGHAeVP08wb9XzrCmaEubcVCyXRLTXo1lOqx+Py66WYnzb6/KEdx45hrO8cncVyVH NPfw== X-Gm-Message-State: AOAM533xVGmPSZDC4Biujy2+w13VtZbpGnQwq1gQn9mZEu7Bw826L+s5 w/L1HtsUCPpp+3IpKrKV/qHV8tb2nXsGow== X-Google-Smtp-Source: ABdhPJyaZsdgmFcNA/DPkCe5CDBhOcSsx6nyPe9uTxBZx2laEmLzlKZCVA+b01DsDFuyYnkkqnoyaw== X-Received: by 2002:a17:902:9042:b029:d5:eef1:c9c8 with SMTP id w2-20020a1709029042b02900d5eef1c9c8mr5073526plz.0.1603845898892; Tue, 27 Oct 2020 17:44:58 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id a10sm3022438pjq.17.2020.10.27.17.44.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 17:44:58 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug To: Andreas Schwab References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> From: Wanrong Lin Message-ID: Date: Tue, 27 Oct 2020 20:44:56 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <87tuuf9xgp.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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.2 (---) For this case, "abc" might be OK, unless you think there is another better answer. But in the example I gave, don't you think "Xyz" is obviously a better answer than "xyz"? The argument here is for some examples, the function does not return the best answer, and also, does not seem to be consistent to me (for those two examples I gave). There might be a reason behind this "compromise", or, it might be just an arbitrary decision as documented in the comments you gave. If it is the latter, can we improve on it? I think those are valid questions. Wanrong On 10/27/2020 5:21 PM, Andreas Schwab wrote: > So what should (try-completion "abc" '("Abcde" "aBcdf" "abCdg")) return? > > Andreas. > From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 20:47:40 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 00:47:40 +0000 Received: from localhost ([127.0.0.1]:46429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZcq-0006zE-EO for submit@debbugs.gnu.org; Tue, 27 Oct 2020 20:47:40 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:45125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZcp-0006z2-AD for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 20:47:39 -0400 Received: by mail-pl1-f174.google.com with SMTP id z1so210025plo.12 for <39484@debbugs.gnu.org>; Tue, 27 Oct 2020 17:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=rdGOxnnFX7pa2OiXyKeLg+KhovCwIGmuO9rldm/7xM0=; b=F9C6kdblihQvSZ7/zNSNdS0KmfrI8z0nyLsV7nXdJCiAeD/K2Hi51c9kijAS4qe9oa qht4B46F8/kmvzHgcnY2HC53/+O1gXc/YlBpNRgOwQuOUpUfKQL4pmVgdcHfrTmlvKaC T/q0DDfgh2h+pmHcmWwrTEhT21WTii9M1cPqY+uxgEu2Iq4p7LRJrTQbxIFZE4O1MPry y4ZHZtfhWP3QlW/d1N425WvGr4PsU6/9wKA2bLJnzfjXO+Dvz+AZ+OyzDdXggh78UAKg xachRf9YRg0M28dqtBqjhFtzzWtvmLTyANizF0VG1zqno5Uqzb5w4Ooi8iVdwwg0KCgN fuIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=rdGOxnnFX7pa2OiXyKeLg+KhovCwIGmuO9rldm/7xM0=; b=rY/HCTnnk4DIhY91jfTWGVFj5XvBJXMnZfVahCU7yylROL+2HvBL0dBNHG8DzsHMuf U/FazNXZfplg3wkHqROEl402oJChYGCW8u76glynwvctBuDUFazZPaJHm51CVtBMiIhI ueOZ5xcyIO0Lj/iaba5Oii/qE9aDJXeNCdYngdH3VymNxVAJdt/gvjflzGlcy7vZJkZC Hk+Oxxl77F8tGpJavKoVQfs80TK5Sz5sTLVeMq0L/NWL0b7f1elO9DzGHLOdehDp4Ma3 oh6nruVknp0RKi/V5oSFoUXuqrNRASme1O5CCXC9cBCsaULgxAYV5KpUDs4p447pH3Jl QcOw== X-Gm-Message-State: AOAM530RWVPQgJQA9FGIXkOpOsKJmtmm32uDbmhaRMNI2RPCgRHyJb2K ix0Hx5cZpthdYBiGM7lS2I7OaZRxGg8NJw== X-Google-Smtp-Source: ABdhPJx6dCx6Zb6mMD6qvlGpxaolITUELn5ng6erX+WFptyj+2hflcjdO25Caa7eRVtkxTeRsFQZOg== X-Received: by 2002:a17:902:eac3:b029:d6:fa8:75d6 with SMTP id p3-20020a170902eac3b02900d60fa875d6mr4743234pld.19.1603846053350; Tue, 27 Oct 2020 17:47:33 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id q11sm3145334pgm.79.2020.10.27.17.47.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 17:47:32 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug From: Wanrong Lin To: Andreas Schwab References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> Message-ID: Date: Tue, 27 Oct 2020 20:47:31 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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.2 (---) Sorry,  I meant "abcd" as the answer for your example. On 10/27/2020 8:44 PM, Wanrong Lin wrote: > For this case, "abc" might be OK, unless you think there is another > better answer. But in the example I gave, don't you think "Xyz" is > obviously a better answer than "xyz"? > > The argument here is for some examples, the function does not return > the best answer, and also, does not seem to be consistent to me (for > those two examples I gave). There might be a reason behind this > "compromise", or, it might be just an arbitrary decision as documented > in the comments you gave. If it is the latter, can we improve on it? I > think those are valid questions. > > Wanrong > > On 10/27/2020 5:21 PM, Andreas Schwab wrote: >> So what should (try-completion "abc" '("Abcde" "aBcdf" "abCdg")) return? >> >> Andreas. >> > From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 20:57:40 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 00:57:41 +0000 Received: from localhost ([127.0.0.1]:46437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZmW-0007DB-NX for submit@debbugs.gnu.org; Tue, 27 Oct 2020 20:57:40 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:37121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXZmV-0007Cw-1x for 39484@debbugs.gnu.org; Tue, 27 Oct 2020 20:57:39 -0400 Received: by mail-pj1-f47.google.com with SMTP id lt2so1629798pjb.2 for <39484@debbugs.gnu.org>; Tue, 27 Oct 2020 17:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=udf3mD/u0IbIrSTlelf3/vY4mo4KazqxUPl+FF1yFbE=; b=vVUirPzXJ2Jlf0tk9rjJdxqVXxdvYXhryvdj42nZdblHOQw2cgpva9/X5qoi+Q8Z5m wccyBettEMI70nRuZQYKKaM+PMPcdJVtIkNYT+6OizqKxvN1rQZGd/qGzrLqd1XQD0tF 7dwdqwk7qI+tFhx0V1u8q4G4YbYS4UVRr0EzSxNz0rNOqG3S1kKLRUyK2G81Wsf/3zF0 GO+A6yx4Kxr1BgLCM5gP0iIusZ4lldjzQGzCf9ltHCNUmxdnI9OHewlxTkTucpj7GjGR 5a9WGTK8OJHi2bsDI/6jWg8LSISr+5iSY51e6LEfGPForH8Ua+6wonN77g3hhkjjkMul fj8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=udf3mD/u0IbIrSTlelf3/vY4mo4KazqxUPl+FF1yFbE=; b=nnObu0P2J1I78ZGxVt9qFtzfhxxBuOy9aOyOqRiY5pGRfEnFXThka37vob4sZvPdDG 4PFVLe3yJg1j3OMRDt0UFL12I0sI6aHKcuNuuDr9ttaYsMMU7OsXKIUnodyg0FQT3QIo lpKV3M4DnIOwowYOKVMGHepY8ft3mJDoLnkK67tINrMtVWPZPzJtuYQe6YGRtt4A6P2c ZUy5nCmQub/PcoI6c5TE0JZRXMh0GmelM1kYvB5SOS4hlYisQKpHSFUO6WwxuW8bziMK SceJuT2Nz+fybb1geUgW2sIdLHzUTm+46K36rrxKTPeFSIbpVxXfiTF8sF4rvFNNv++X JRug== X-Gm-Message-State: AOAM530PUv0J9n7kALMArSnYuuj6cMstaWUEhOj3+mP5e/37Z55X5MRa 4+YiTyzYa7RKNCWnMURywXPDWNseMRUC+w== X-Google-Smtp-Source: ABdhPJzFUJUyahb9jT3AIV85Ji2Ra0yQLLq2jHUJIMxTOkn1WbWwoKE8fWieUszST40LoBn9r6XxiA== X-Received: by 2002:a17:902:bc43:b029:d6:711c:1a77 with SMTP id t3-20020a170902bc43b02900d6711c1a77mr844487plz.43.1603846652802; Tue, 27 Oct 2020 17:57:32 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id q189sm3588777pfc.94.2020.10.27.17.57.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 17:57:32 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug From: Wanrong Lin To: Andreas Schwab References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> Message-ID: Date: Tue, 27 Oct 2020 20:57:30 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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.2 (---) I just tried this in Emacs 26.3: (let ((completion-ignore-case t))   (try-completion "abc" '("Abcde" "aBcdf" "abCdg"))) -> "Abcd" The answer is not bad, matching at least one of the candidates. That makes the answer to my original example even more odd: (let ((completion-ignore-case t))        (try-completion "xyz" '("XyzD" "XyzAbc"))        ) ==> "xyz" Why does it matter whether any additional chars follow the user input in the match? Wanrong On 10/27/2020 8:47 PM, Wanrong Lin wrote: > Sorry, I meant "abcd" as the answer for your example. > > On 10/27/2020 8:44 PM, Wanrong Lin wrote: >> For this case, "abc" might be OK, unless you think there is another >> better answer. But in the example I gave, don't you think "Xyz" is >> obviously a better answer than "xyz"? >> >> The argument here is for some examples, the function does not return >> the best answer, and also, does not seem to be consistent to me (for >> those two examples I gave). There might be a reason behind this >> "compromise", or, it might be just an arbitrary decision as >> documented in the comments you gave. If it is the latter, can we >> improve on it? I think those are valid questions. >> >> Wanrong >> >> On 10/27/2020 5:21 PM, Andreas Schwab wrote: >>> So what should (try-completion "abc" '("Abcde" "aBcdf" "abCdg")) >>> return? >>> >>> Andreas. >>> >> > From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 03:51:22 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 07:51:22 +0000 Received: from localhost ([127.0.0.1]:46932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXgEs-0000bE-FM for submit@debbugs.gnu.org; Wed, 28 Oct 2020 03:51:22 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:47226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXgEq-0000b6-Q0 for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 03:51:22 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLgkG4WT0z1rvxy; Wed, 28 Oct 2020 08:51:18 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLgkG23dXz1qy5b; Wed, 28 Oct 2020 08:51:18 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id BcKnrvKTMfYW; Wed, 28 Oct 2020 08:51:17 +0100 (CET) X-Auth-Info: GV3nF970ylmTpCQUJVj8GGG6xTaI6At/2/NKWM4t4KzuilodwwW3y5lbO4N9Na6P Received: from igel.home (ppp-46-244-182-148.dynamic.mnet-online.de [46.244.182.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 28 Oct 2020 08:51:17 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 587512C082A; Wed, 28 Oct 2020 08:51:16 +0100 (CET) From: Andreas Schwab To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> X-Yow: .. I don't know why but, suddenly, I want to discuss declining I.Q. LEVELS with a blue ribbon SENATE SUB-COMMITTEE! Date: Wed, 28 Oct 2020 08:51:16 +0100 In-Reply-To: (Wanrong Lin's message of "Tue, 27 Oct 2020 20:57:30 -0400") Message-ID: <87ft5y3i17.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Stefan Monnier , 39484@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: -1.4 (-) On Okt 27 2020, Wanrong Lin wrote: > The answer is not bad, matching at least one of the candidates. That makes > the answer to my original example even more odd: > (let ((completion-ignore-case t)) >        (try-completion "xyz" '("XyzD" "XyzAbc")) >        ) > ==> "xyz" That also matches one of the candidates (since case doesn't matter). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 05:35:19 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 09:35:19 +0000 Received: from localhost ([127.0.0.1]:47186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhrT-0001Sk-4P for submit@debbugs.gnu.org; Wed, 28 Oct 2020 05:35:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhrQ-0001SV-Pf for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 05:35:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=3BJQOgINgpjPAG5HRTD3dFLrZKyw1aJkgfDGSUuxb0k=; b=amYyxytYZG3yOaDlLN3/COmsu2 8LbvboKPODZjkbrprZdodYoajSrO66DwfBSIAJxMVHzA7fOSmvXMngEy6xd9zmzw1iilrk2K8nbAg 5J7jssC6yclHgmNT3qy6yWV/qCE8j936iAMUd0SMKfd3TwDK/5WjR+1NNH554M1IdetI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXhrG-0006Jy-K7; Wed, 28 Oct 2020 10:35:09 +0100 From: Lars Ingebrigtsen To: Andreas Schwab Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXT0caPWlY4Mir/ //9kTWJkAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKHAkHFEs0eocAAAGkSURBVCjPVdLBjtowEAbg sVUilVO3otHCfQ/kKcKhHHIKVSba+LSHBRU/BSAt0va0IIi0ObGVE+H/KTsGVLU+JP408cS/E6Lb UIAP96dwGf2L5IYvfyuDG6KAnzdcGmDNzGlvzmgmhA2MI7JoKiXoG2XdV2zuBXtTSNvcvhSK/BSM ZTdknytKNfgTUaHa9ILiWTMPjoKBxsyVZZWXpOi7rg3asuKp4NRtIciKTFAkGXAsp0+xwBgA62X2 thfIFF4tss1v/U6hcK++ZdFH31OvDz+k+LXX0DCkcqM8PozOpCWVPfi8fyhdAC92j7NsVbt4RtHu GY958qM+htirB+MHdsvGL2hFw0nZtEMueELryYtyy/mSWcLhzWtvAS5URTjNowWatuIlCB9pjFr2 1HrQeXYcQc4WRyuVXCX4bOGZjbyHEh9bzJkbQkrReYQz0ZgJRNpZnCh9uKIDnMauJPl2etuE8Dt7 AW7jf8iaGLDmCnWqW2APEx7THrWv3bgJiBpYX6J/xS+P9g5rWUhoEPnOYWXDgRiYtmu799CgGpeJ /BYsu+Y/5JjZYM8ec9AAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMjhUMDk6MDc6MjArMDA6 MDDpuETQAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTI4VDA5OjA3OjIwKzAwOjAwmOX8bAAA AABJRU5ErkJggg== X-Now-Playing: He Said's _Take Care_: "Halfway House" Date: Wed, 28 Oct 2020 10:35:05 +0100 In-Reply-To: <87ft5y3i17.fsf@igel.home> (Andreas Schwab's message of "Wed, 28 Oct 2020 08:51:16 +0100") Message-ID: <87tuuevgl2.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Andreas Schwab writes: > On Okt 27 2020, Wanrong Lin wrote: > >> The answer is not bad, matching at least one of the candidates. That makes >> the answer to my original example even more odd: >> (let ((completion-ignore-cas [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.0 (-) Andreas Schwab writes: > On Okt 27 2020, Wanrong Lin wrote: > >> The answer is not bad, matching at least one of the candidates. That mak= es >> the answer to my original example even more odd: >> (let ((completion-ignore-case t)) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (try-completion "xyz" '("XyzD" "Xyz= Abc")) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ) >> =3D=3D> "xyz" > > That also matches one of the candidates (since case doesn't matter). It does, but it's weird. I mean, this pair of return values don't make sense on any level: (let ((completion-ignore-case t)) (try-completion "xyz" '("XyzaD" "XyZabc"))) =3D> "Xyza" (let ((completion-ignore-case t)) (try-completion "xyz" '("XyZbD" "XyZabc"))) =3D> "xyz"=20=20 --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 05:42:57 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 09:42:57 +0000 Received: from localhost ([127.0.0.1]:47213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhyr-0001eQ-4h for submit@debbugs.gnu.org; Wed, 28 Oct 2020 05:42:57 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:56810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhyp-0001eH-8k for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 05:42:55 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLkC070MFz1rxYS; Wed, 28 Oct 2020 10:42:52 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLkC03Vgxz1qy5x; Wed, 28 Oct 2020 10:42:52 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ZseCtHyH8j1G; Wed, 28 Oct 2020 10:42:51 +0100 (CET) X-Auth-Info: ifm93CHL6uPsNI03daOLBf4RqQdMM3G990K5tEmXsPjtAMxv3Zt2IjkiLXxNw0Bq Received: from igel.home (ppp-46-244-182-148.dynamic.mnet-online.de [46.244.182.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 28 Oct 2020 10:42:51 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 46DA02C094B; Wed, 28 Oct 2020 10:42:51 +0100 (CET) From: Andreas Schwab To: Lars Ingebrigtsen Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> X-Yow: I will SHAVE and buy JELL-O and bring my MARRIAGE MANUAL!! Date: Wed, 28 Oct 2020 10:42:51 +0100 In-Reply-To: <87tuuevgl2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 28 Oct 2020 10:35:05 +0100") Message-ID: <87zh461yas.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.4 (-) On Okt 28 2020, Lars Ingebrigtsen wrote: > Andreas Schwab writes: > >> On Okt 27 2020, Wanrong Lin wrote: >> >>> The answer is not bad, matching at least one of the candidates. That makes >>> the answer to my original example even more odd: >>> (let ((completion-ignore-case t)) >>>        (try-completion "xyz" '("XyzD" "XyzAbc")) >>>        ) >>> ==> "xyz" >> >> That also matches one of the candidates (since case doesn't matter). > > It does, but it's weird. I mean, this pair of return values don't make > sense on any level: > > (let ((completion-ignore-case t)) > (try-completion "xyz" '("XyzaD" "XyZabc"))) > => "Xyza" > > (let ((completion-ignore-case t)) > (try-completion "xyz" '("XyZbD" "XyZabc"))) > => "xyz" It makes a whole lot sense. If the candidate is not modified, it should not receive any case changes either. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 05:50:38 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 09:50:38 +0000 Received: from localhost ([127.0.0.1]:47228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXi6H-0001qj-OZ for submit@debbugs.gnu.org; Wed, 28 Oct 2020 05:50:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXi6F-0001qV-9B for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 05:50:35 -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=/8k4aVa0SERSVbJK/XYfwTQ6Ub7pDMkL074ju79lgX0=; b=Agf5aFsdQVC4HtHKgI3FeRToFs 89T/zkue5tH3IEkLXXpgvp6N/4cdjgqAfVnlF4qrtJ2SRduljvR3YMD+6M/eoWI5+zW3b395Y462B XIxA1Tg9k0LrqnzJkh268KmRSZX3AkNkZMlIf6kSC5LezJt6JzycX5KzH0b0YYEyFIjY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXi64-0006XM-9z; Wed, 28 Oct 2020 10:50:29 +0100 From: Lars Ingebrigtsen To: Andreas Schwab Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXT0caPWlY4Mir/ //9kTWJkAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKHAkHFEs0eocAAAGkSURBVCjPVdLBjtowEAbg sVUilVO3otHCfQ/kKcKhHHIKVSba+LSHBRU/BSAt0va0IIi0ObGVE+H/KTsGVLU+JP408cS/E6Lb UIAP96dwGf2L5IYvfyuDG6KAnzdcGmDNzGlvzmgmhA2MI7JoKiXoG2XdV2zuBXtTSNvcvhSK/BSM ZTdknytKNfgTUaHa9ILiWTMPjoKBxsyVZZWXpOi7rg3asuKp4NRtIciKTFAkGXAsp0+xwBgA62X2 thfIFF4tss1v/U6hcK++ZdFH31OvDz+k+LXX0DCkcqM8PozOpCWVPfi8fyhdAC92j7NsVbt4RtHu GY958qM+htirB+MHdsvGL2hFw0nZtEMueELryYtyy/mSWcLhzWtvAS5URTjNowWatuIlCB9pjFr2 1HrQeXYcQc4WRyuVXCX4bOGZjbyHEh9bzJkbQkrReYQz0ZgJRNpZnCh9uKIDnMauJPl2etuE8Dt7 AW7jf8iaGLDmCnWqW2APEx7THrWv3bgJiBpYX6J/xS+P9g5rWUhoEPnOYWXDgRiYtmu799CgGpeJ /BYsu+Y/5JjZYM8ec9AAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMjhUMDk6MDc6MjArMDA6 MDDpuETQAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTI4VDA5OjA3OjIwKzAwOjAwmOX8bAAA AABJRU5ErkJggg== X-Now-Playing: He Said's _Take Care_: "A.B.C. Dicks Love (Soft)" Date: Wed, 28 Oct 2020 10:50:23 +0100 In-Reply-To: <87zh461yas.fsf@igel.home> (Andreas Schwab's message of "Wed, 28 Oct 2020 10:42:51 +0100") Message-ID: <87lffqvfvk.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: Andreas Schwab writes: >> It does, but it's weird. I mean, this pair of return values don't make >> sense on any level: >> >> (let ((completion-ignore-case t)) >> (try-completion "xyz" '("XyzaD" "XyZabc"))) >> => "Xyza" >> [...] 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: 0.0 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.0 (-) Andreas Schwab writes: >> It does, but it's weird. I mean, this pair of return values don't make >> sense on any level: >> >> (let ((completion-ignore-case t)) >> (try-completion "xyz" '("XyzaD" "XyZabc"))) >> => "Xyza" >> >> (let ((completion-ignore-case t)) >> (try-completion "xyz" '("XyZbD" "XyZabc"))) >> => "xyz" > > It makes a whole lot sense. If the candidate is not modified, it > should not receive any case changes either. But the case change in the modified case is essentially arbitrary, while the unmodified case has a unique, non-arbitrary match. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 05:56:12 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 09:56:13 +0000 Received: from localhost ([127.0.0.1]:47236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXiBg-0001z1-Lx for submit@debbugs.gnu.org; Wed, 28 Oct 2020 05:56:12 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:49546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXiBf-0001yt-97 for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 05:56:11 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLkVK3WBVz1rxYR; Wed, 28 Oct 2020 10:56:09 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLkVK2tqZz1qy5x; Wed, 28 Oct 2020 10:56:09 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wqrxFmAzw9N2; Wed, 28 Oct 2020 10:56:08 +0100 (CET) X-Auth-Info: pABzuVve6dPAN3zczBqx/9RUHu3yiIujWN7ks5n0xXuHEh64HEQT/BVRbV79n84j Received: from igel.home (ppp-46-244-182-148.dynamic.mnet-online.de [46.244.182.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 28 Oct 2020 10:56:08 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 3E4182C094B; Wed, 28 Oct 2020 10:56:08 +0100 (CET) From: Andreas Schwab To: Lars Ingebrigtsen Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> X-Yow: Everybody gets free BORSCHT! Date: Wed, 28 Oct 2020 10:56:08 +0100 In-Reply-To: <87lffqvfvk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 28 Oct 2020 10:50:23 +0100") Message-ID: <87v9eu1xon.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.4 (-) On Okt 28 2020, Lars Ingebrigtsen wrote: > Andreas Schwab writes: > >>> It does, but it's weird. I mean, this pair of return values don't make >>> sense on any level: >>> >>> (let ((completion-ignore-case t)) >>> (try-completion "xyz" '("XyzaD" "XyZabc"))) >>> => "Xyza" >>> >>> (let ((completion-ignore-case t)) >>> (try-completion "xyz" '("XyZbD" "XyZabc"))) >>> => "xyz" >> >> It makes a whole lot sense. If the candidate is not modified, it >> should not receive any case changes either. > > But the case change in the modified case is essentially arbitrary, while > the unmodified case has a unique, non-arbitrary match. The case always matches one of the candidates. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 07:16:57 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 11:16:57 +0000 Received: from localhost ([127.0.0.1]:47431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXjRp-0008LF-Lo for submit@debbugs.gnu.org; Wed, 28 Oct 2020 07:16:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXjRn-0008L1-Cj for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 07:16:56 -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=JyorFe2mCvdBdJk4n8HhZWSnVMG1xUoKH4PdCXIUykk=; b=EfmhmbJGMaBEMkWAQijyqs2yqu k+7pwyaITUF0xOq+lJ1AOC5OpvSCWF2tLMhlasrACBLxNA8RFZb19hd1ewU8rYfvyaS8lQWF2jbMd 13fNpoUqaXAbMGO/vsxXd6772qolJvOsjSNFrziHmhz6v0cNrlct6T9AaX9Ykk6fdsPs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXjRZ-0001Od-Vd; Wed, 28 Oct 2020 12:16:48 +0100 From: Lars Ingebrigtsen To: Andreas Schwab Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUmDhZZNDzMpHV8 g3HpvoerJDD////cCWDoAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QKHAooGFLYsJgAAAGySURBVDjL nZRBcsMgDEVhMt1boTmAhbMvyD2AQTlA0vr+V6kEJNhuV2XBGL/5kr6Qbcw/F5Q1Er07HI7kcici BzQcNKus+69Q9rLWBQfwfL+u+0BWXyFeNdpwFEzMnA7BbHvPfN1LRPDgunaSLmC+bWu2XZB4W5hE +m6Ap2uPpeam9ASbWCUFNhBTr2sHAvYkBVBJjSmcO9C+PmhKyOO8wFt3cikgsmfi0fwBNFawB7C2 5Mlf9gBLS2TLBxCj1iRbULvwqurhaeLFnTiB+XyB0sMQOYcTe+tuW4MCRMLiz8633hJtYiCpC30Y ztd+h3qBgYRQAM24BevdReQMYLd3q4cvEO+jzOkO1FiYA7jP3ZjY9YHZMXuYx+2UQERPTLI7/DAW nuQsXVqAc0xSmoAZKWi0U+kq6J7143D65AXMpd+Q5No9uKGdg7F1BkOei4/B1ovxNZI8ZDG4yAd3 eoGqSNmhGuzAVYAeIgcFaQ8SiZugOc71aFwbA6KiqLYkgCFsZclNJTVWwKQAi2ZxpXpj3mUqUIEs 1WTbwMz4AirJRrC2SIYYUwNx0mxz0v+LFSBe/Q8lTa9DjgYJPQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMC0xMC0yOFQxMDo0MDoyNCswMDowMFVo46YAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTAt MjhUMTA6NDA6MjQrMDA6MDAkNVsaAAAAAElFTkSuQmCC X-Now-Playing: New Fads's _Love It All_: "Souvenir" Date: Wed, 28 Oct 2020 12:16:40 +0100 In-Reply-To: <87v9eu1xon.fsf@igel.home> (Andreas Schwab's message of "Wed, 28 Oct 2020 10:56:08 +0100") Message-ID: <87tuuetxbb.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: Andreas Schwab writes: > The case always matches one of the candidates. Yes. An arbitrary candidate (well, the first one, but it's not documented, which means that it's arbitrary). 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: 0.0 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.0 (-) Andreas Schwab writes: > The case always matches one of the candidates. Yes. An arbitrary candidate (well, the first one, but it's not documented, which means that it's arbitrary). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 07:44:50 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 11:44:50 +0000 Received: from localhost ([127.0.0.1]:47519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXjso-0002pj-BW for submit@debbugs.gnu.org; Wed, 28 Oct 2020 07:44:50 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:47911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXjsm-0002pa-J2 for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 07:44:49 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CLmvf5Nldz1qsZn; Wed, 28 Oct 2020 12:44:46 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CLmvf1431z1qyX3; Wed, 28 Oct 2020 12:44:46 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ps53-Vfyo3T3; Wed, 28 Oct 2020 12:44:45 +0100 (CET) X-Auth-Info: nmk7QYjDJsoy4OzFSqGZ7LW8hp7OFO6G4w8Yr4OutMw3lAU80HoMQfwuhiVB0zHD Received: from igel.home (ppp-46-244-182-148.dynamic.mnet-online.de [46.244.182.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 28 Oct 2020 12:44:45 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id E055A2C0955; Wed, 28 Oct 2020 12:44:44 +0100 (CET) From: Andreas Schwab To: Lars Ingebrigtsen Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> X-Yow: I want another RE-WRITE on my CAESAR SALAD!! Date: Wed, 28 Oct 2020 12:44:44 +0100 In-Reply-To: <87tuuetxbb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 28 Oct 2020 12:16:40 +0100") Message-ID: <87lffq1snn.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 39484 Cc: Wanrong Lin , Stefan Monnier , 39484@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: -1.4 (-) On Okt 28 2020, Lars Ingebrigtsen wrote: > Andreas Schwab writes: > >> The case always matches one of the candidates. > > Yes. An arbitrary candidate (well, the first one, but it's not > documented, which means that it's arbitrary). It is not nessesary to document each and every implementation detail. That makes it difficult to change the implementation later, and it also unduly restricts the way a collection function can handle that situation. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 08:59:35 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 12:59:36 +0000 Received: from localhost ([127.0.0.1]:47648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXl39-0004gX-Ng for submit@debbugs.gnu.org; Wed, 28 Oct 2020 08:59:35 -0400 Received: from mail-pj1-f48.google.com ([209.85.216.48]:53709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXl37-0004gI-2u for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 08:59:33 -0400 Received: by mail-pj1-f48.google.com with SMTP id m17so1575454pjz.3 for <39484@debbugs.gnu.org>; Wed, 28 Oct 2020 05:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=CWBx8nyRhaZtAUOtY/vljbEwVr3dWrDJdz7o4D/ugmU=; b=bYdilpgb6Kos0REk1UD+3EjnbEOlhqR0/9Fx/lCZ3s/hCO1uoGQFV4tSNDolubCzp8 26T5jeKuQzkYaXTrTEKGf7bsc9xJGQKHMJ0X3Y98dS/QCZQSYhrh9rTqvZV3ilXFQXoI VniiNlqwCSpy1Fl6LIscRjzU9O9leZW7PZrDOC7rUqvuIgAEICmPxeDKUhuYeY7Tm0ce Q4WPBgHh/5iO3lwiLuZC0kZkwcaF7wZb7TSVFw21tnxwSnO0hev41gV4somW6n7Kbcg2 T/6rY7/xj9curRCLMx62YZ2dFv6R/R4Owcd3bSzCsu+2Kg/S+EukKYq/E4GHV4YrYhrL RPlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=CWBx8nyRhaZtAUOtY/vljbEwVr3dWrDJdz7o4D/ugmU=; b=tLDdw2CDUDlxBgTo0IOzUGXOIDVtB/BVcuxxSMxHwEZIIpooz7H0kzzxJPCuZDCsVe 6gA6uen3Beq9tPqmqKYn0NGfc7X8uzBeNPeMpaeCw363y6++/5xV4szicvgWrQoDaMex S9dwcYESaDv3zAlDl758BBCYH1mV1OjCSBabhb896FVsXQJVMgzKC46FlLbIQlDCA1kg UUVW2FGpCOwPnwynnswNJska+ASNqKTcsFx+If+8oL+Iy5z2bo2lSjck1IegXhqw7Aeu bOCTIRFH9ArcMh8F7m/gG/bOKR0ytbXP0M+v8t9petTFoU5zygJA+OAXpeKun54cA9aA jHkQ== X-Gm-Message-State: AOAM531udsX1ySnsEiQXByWdPIDC+o+hs20500nonIIhFAelVbRd/ncG Cjv1y95CQap6rS4I/5fMxsDlYhfMlkeZTQ== X-Google-Smtp-Source: ABdhPJyiFle8Zi+CnT9LVjxanz78jTllW/Xsri6qJJbvNjZ9rUnRcQybp0giZL0uZxlkV17UEerqYQ== X-Received: by 2002:a17:90a:7c03:: with SMTP id v3mr6677355pjf.233.1603889966893; Wed, 28 Oct 2020 05:59:26 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id 15sm5743006pgs.52.2020.10.28.05.59.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 05:59:26 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug To: Andreas Schwab , Lars Ingebrigtsen References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> <87lffq1snn.fsf@igel.home> From: Wanrong Lin Message-ID: <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> Date: Wed, 28 Oct 2020 08:59:24 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <87lffq1snn.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 39484 Cc: Stefan Monnier , 39484@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: -1.9 (-) This is not implementation detail. This is the interface of this function. User/caller should know exactly what are the rules for the return value. So in summary, my two points: 1. Return value is not ideal. You can argue it is still not wrong, but I think we can improve. 2. Even if we don't change anything here, we need to make this less-than-ideal behavior clear in the documentation (doc string). I hope I convinced at least some of you. Wanrong On 10/28/2020 7:44 AM, Andreas Schwab wrote: > On Okt 28 2020, Lars Ingebrigtsen wrote: > >> Andreas Schwab writes: >> >>> The case always matches one of the candidates. >> Yes. An arbitrary candidate (well, the first one, but it's not >> documented, which means that it's arbitrary). > It is not nessesary to document each and every implementation detail. > That makes it difficult to change the implementation later, and it also > unduly restricts the way a collection function can handle that > situation. > > Andreas. > From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 10:45:18 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 14:45:18 +0000 Received: from localhost ([127.0.0.1]:50046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmhS-0001YQ-AD for submit@debbugs.gnu.org; Wed, 28 Oct 2020 10:45:18 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmhQ-0001YD-5g for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 10:45:16 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6EB4C4408C8; Wed, 28 Oct 2020 10:45:10 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 34F5D440848; Wed, 28 Oct 2020 10:45:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603896309; bh=qNEHjRE1PVt/itshc63PkV85QUStd64vh/YgwAYKm2Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eFhDkb1fRsTWngHbhX49+r+raMUM3My1SvlePihU6mqTNa30QILCeg7zxvdizTXsB lIli9ELx4p6FiBmCFMQ0Py56kXm5prShNIcbkoljqMA4RRqe1SXJtJo/ab0RzmVh2b h/eJKMMlMhjPLUQEzUtdQDAdaDr6zYbWjxIgSxSEFk3T29pl8985RS+3XLK8StfmL2 H5Lan9jgTnULxODuapQ5yqoQt/1IRKhKzeXrM5Pmo2NZ6r6GhNboHuYeQU9QCaRVmc OOw4zp3NQvK9LbNyXVJvpOQE77wkW0TpAKnyeyw8MBBx9mjkaZ+70S0DDrJmonh1vr Jt/GigWNCurvg== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D5F5B12036E; Wed, 28 Oct 2020 10:45:08 -0400 (EDT) From: Stefan Monnier To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug Message-ID: References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> <87lffq1snn.fsf@igel.home> <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> Date: Wed, 28 Oct 2020 10:45:07 -0400 In-Reply-To: <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> (Wanrong Lin's message of "Wed, 28 Oct 2020 08:59:24 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.075 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Andreas Schwab , 39484@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 (---) > 1. Return value is not ideal. You can argue it is still not wrong, but > I think we can improve. Indeed, it can be improved, but we should not try to be too clever about it, because some choices might seem obvious in some circumstances but would result in rather poor answers in other cases. So rather than hypothetical cases like what we've seen here, I'm much more interested in real life situations. The current design is trying to be conservative, in the sense that it tries to avoid returning a poor result, at the cost of sometimes failing to return a better result. It does it by refraining from mix-and-match: either the whole result comes from the user input or the whole result comes from *one* of the candidates. There are cases where `completion-try-completion` (as opposed to `try-completion`) doesn't actually follow this rule correctly, and it's been a source of suboptimal results. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 11:47:53 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 15:47:53 +0000 Received: from localhost ([127.0.0.1]:50209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXng1-0003GT-8U for submit@debbugs.gnu.org; Wed, 28 Oct 2020 11:47:53 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:36981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXnfy-0003GG-N3 for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 11:47:51 -0400 Received: by mail-pf1-f171.google.com with SMTP id 126so3161808pfu.4 for <39484@debbugs.gnu.org>; Wed, 28 Oct 2020 08:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=zvzZl0c9n3iLuTHkTkhMI9iK4YRfUBchk70w9vxh85Q=; b=NHzoDAiMV6SuRX9roE5DNcV194RbBKThsv7qIW2rDegPv7S+ycBbGOijsf2eTW6Wvw xhtPXHZCBwBdAn1CdQNCaoRx4+vsnHgD3PMmQNJXA0awb0yX8iIcqwo0u5T384/KcvZE MeOjpVkiGrtrFTD6G7LyOTW7vFPg7l/7AeDbapGFQ/usvMtSdspp28b7ATtvpW1sxE2D rX4OpJ2S/0kCVLtTyZK/PwcaPPX39JUDzS0i3Ib61hxB1qddad5XaHJNFexV2wte7LE4 MrzlWKUnGEtF8Zhe+ciGJ9WwJAhxddgaqTzvmwVBxUoJ2e/yWZFXkb5me2LRn/2+WIHd HZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=zvzZl0c9n3iLuTHkTkhMI9iK4YRfUBchk70w9vxh85Q=; b=W0DnxQBlaDEzzpQomjM16mvaifT8zlbmBdvnTU/yrG7s+zifBsx2JOti8hZ2DGDQyv WjiCAqDPEHQskqnSlWPtfNdT+6p/ed5aXNWtQz6SPWok1yT8zQ5uBhPg7hek6tnLLHo6 aS3oDQ8a1pxPgcKQ6b/FnR/8lBl+45yzr3In+7hMT+hvB7mr6k9j8AY81NfSWk2uVe/0 76Y2tGB27hmZk1qgwQPVCIPZl84Gd6Lv36KdzOR846vv79yUKwyNYXN2VQb407H+daYn APZuFnVWdNkeZpZS1UVk/q+XKpSFNd1pC8EtlK5sZbeGhIalCn7tNLQTCjJRRRDZf9S2 vVaw== X-Gm-Message-State: AOAM530O6SVZL2YCpJ/SRgLn49bEHT4X9yB4FHsMuVblyCni1T5hp2YD KSWrLeYdu4zcEXgnlykcc+jgmPv9m5NZEg== X-Google-Smtp-Source: ABdhPJztz+eNz+y2uYo9kEdzEcFknXXQujEWm4k1PtUYsfuN95EyCeRZTSIvwHMkYF7mJFxZF8JhIQ== X-Received: by 2002:a63:4c55:: with SMTP id m21mr7228851pgl.305.1603900064463; Wed, 28 Oct 2020 08:47:44 -0700 (PDT) Received: from [192.168.2.19] (c-71-226-226-185.hsd1.nj.comcast.net. [71.226.226.185]) by smtp.googlemail.com with ESMTPSA id t15sm57055pjq.3.2020.10.28.08.47.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 08:47:43 -0700 (PDT) Subject: Re: bug#39484: 26.3; try-completion bug To: Stefan Monnier References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> <87lffq1snn.fsf@igel.home> <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> From: Wanrong Lin Message-ID: <962e72d1-451f-7725-a22c-e35b4a5784b1@gmail.com> Date: Wed, 28 Oct 2020 11:47:34 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Andreas Schwab , 39484@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: -1.9 (-) The examples I gave are real life situations. I discovered this issue from an unexpected behavior with ido. The "bug" has real negative consequences, at least for me. As for this: "It does it by refraining from mix-and-match: either the whole result comes from the user input or the whole result comes from *one* of the candidates." It still sounds quite arbitrary to me, as I failed to understand why it is bad if the whole result comes from *all* of the candidates if that happens to be possible. I will try to give a version which I think is better (up to debate, of course) For the user input x, return a string y (or nil if impossible) so that it satisfies all three conditions below: 1. x is a prefix of y, ignoring case. 2. y is the maximum common prefix, ignoring case, among all candidates 3. y is the *exact* (including case) prefix of at least one of the candidates Wanrong On 10/28/2020 10:45 AM, Stefan Monnier wrote: >> 1. Return value is not ideal. You can argue it is still not wrong, but >> I think we can improve. > Indeed, it can be improved, but we should not try to be too clever about > it, because some choices might seem obvious in some circumstances but > would result in rather poor answers in other cases. > > So rather than hypothetical cases like what we've seen here, I'm much > more interested in real life situations. > > The current design is trying to be conservative, in the sense that it > tries to avoid returning a poor result, at the cost of sometimes failing > to return a better result. It does it by refraining from mix-and-match: > either the whole result comes from the user input or the whole result > comes from *one* of the candidates. > > There are cases where `completion-try-completion` (as opposed to > `try-completion`) doesn't actually follow this rule correctly, and it's > been a source of suboptimal results. > > > Stefan > From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 12:34:10 2020 Received: (at 39484) by debbugs.gnu.org; 28 Oct 2020 16:34:10 +0000 Received: from localhost ([127.0.0.1]:50336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXoOn-0004WR-MB for submit@debbugs.gnu.org; Wed, 28 Oct 2020 12:34:10 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXoOm-0004W3-4D for 39484@debbugs.gnu.org; Wed, 28 Oct 2020 12:34:08 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9E229440B5C; Wed, 28 Oct 2020 12:34:02 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 52C00440AD7; Wed, 28 Oct 2020 12:34:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603902841; bh=fh4uZKVsO1btTZvYf3ZdoyS3KLqj2nCP6tzgC0r0v8k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=bWuR8Nl2OCHisFWxqsbun+VUvZka+Jm9sRtWdEArQZWJKFdMIkDQwh+RUswpW0cOU SzjhxNNRp1uNlG2Joy87c9ltsO2Q7mzmNWQ193nEvCqp2PNii5A8VdRDU9Dv+G5+tT 9pTt+8ntZDwn/XB7l+jYs/3fxo9FzNu6TgWGmG3EpdausWYWK2ha94hpzg9iPEp7v7 wFhMwMrT9+e3BvGfOeVM8h++iDeBe2GJIyJFlOgR3/h4HPaHV1p6FqhGcDLOKl+T6c Kiyz414OJdWGylUPFLFlzTIO0kZ61DS246MBJfFGhFbr6WCtZAyt3W9qxuMUHjIAkP sNHxqjaWuPXjw== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 10F62120298; Wed, 28 Oct 2020 12:34:01 -0400 (EDT) From: Stefan Monnier To: Wanrong Lin Subject: Re: bug#39484: 26.3; try-completion bug Message-ID: References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> <87lffq1snn.fsf@igel.home> <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> <962e72d1-451f-7725-a22c-e35b4a5784b1@gmail.com> Date: Wed, 28 Oct 2020 12:34:00 -0400 In-Reply-To: <962e72d1-451f-7725-a22c-e35b4a5784b1@gmail.com> (Wanrong Lin's message of "Wed, 28 Oct 2020 11:47:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.074 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39484 Cc: Lars Ingebrigtsen , Andreas Schwab , 39484@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 (---) > The examples I gave are real life situations. All the examples I see are of the "abcd" or "xyz", i.e. made up examples. I understand they are meant to illustrate real-life examples, but they are not themselves real life. > 1. x is a prefix of y, ignoring case. > 2. y is the maximum common prefix, ignoring case, among all candidates That's what is guaranteed by the semantics, so our code already does that (barring bugs). > 3. y is the *exact* (including case) prefix of at least one of the > candidates We could try that, indeed. It still satisfies the constraint I described as "conservative", and it wouldn't cost extra efforts either. If someone wants to try that, feel free to do so, but I personally would prefer if we only do that when all the matching candidates agree on the capitalization. BTW, we currently have the following tests in test/src/minibuffer-tests.el: (ert-deftest test-try-completion-ignore-case () (let ((completion-ignore-case t)) (should (equal (try-completion "bar" '("bAr" "barfoo")) "bAr")) (should (equal (try-completion "bar" '("bArfoo" "barbaz")) "bar")) (should (equal (try-completion "bar" '("bArfoo" "barbaz")) (try-completion "bar" '("barbaz" "bArfoo")))) ;; bug#11339 (should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'! (should (equal (try-completion "baz" '("bAz" "baz")) (try-completion "baz" '("baz" "bAz")))))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 09:17:23 2022 Received: (at 39484) by debbugs.gnu.org; 23 Apr 2022 13:17:23 +0000 Received: from localhost ([127.0.0.1]:55456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFdb-0006BH-77 for submit@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFdZ-00066H-Tl for 39484@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:22 -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=RuHinuLWvAY78w0KI8HZ8sF9DqtSsSTJB3LmldHxC1k=; b=LtRTXGrivAijRb+CwYyAs2LOHL pyH9AFwWEbD93kSDopVd9s6bbEsucJea+NNV3IgKvMVJAUKt+ZKqCIOU8LvhJb1Ytr1nEog4SFrWD lSeQG/97vEGINvTlt/+sv1nquguKZ3zeJouP53xk5p7OIysy6P4zOcCAQCbE33NqWQLA=; 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 1niFdO-0002oF-NF; Sat, 23 Apr 2022 15:17:13 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#39484: 26.3; try-completion bug References: <874kmf1peq.fsf@gnus.org> <87361zbi5x.fsf@igel.home> <87h7qfzdf8.fsf@gnus.org> <87y2jr9zwt.fsf@igel.home> <8fed8748-8331-5ca7-6c91-108c27945bb2@gmail.com> <87tuuf9xgp.fsf@igel.home> <87ft5y3i17.fsf@igel.home> <87tuuevgl2.fsf@gnus.org> <87zh461yas.fsf@igel.home> <87lffqvfvk.fsf@gnus.org> <87v9eu1xon.fsf@igel.home> <87tuuetxbb.fsf@gnus.org> <87lffq1snn.fsf@igel.home> <44009e48-c8b7-72c1-b505-4308d84c24e7@gmail.com> X-Now-Playing: The Style Council's _The Complete Adventures (5)_: "Can You Still Love Me?" Date: Sat, 23 Apr 2022 15:17:10 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 28 Oct 2020 10:45:07 -0400") Message-ID: <877d7gszvt.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: Stefan Monnier writes: > The current design is trying to be conservative, in the sense that it > tries to avoid returning a poor result, at the cost of sometimes failing > to return a better result. It does it by refraining [...] 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: 39484 Cc: Andreas Schwab , Wanrong Lin , 39484@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 (---) Stefan Monnier writes: > The current design is trying to be conservative, in the sense that it > tries to avoid returning a poor result, at the cost of sometimes failing > to return a better result. It does it by refraining from mix-and-match: > either the whole result comes from the user input or the whole result > comes from *one* of the candidates. I've now mentioned something like this in the doc string of the function in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 09:17:26 2022 Received: (at control) by debbugs.gnu.org; 23 Apr 2022 13:17:26 +0000 Received: from localhost ([127.0.0.1]:55459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFde-0006Dx-EY for submit@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFdb-00067e-Bp for control@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:23 -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=mqtUfiB9BP2Cokj92zxaQBdsQK1JvTB7x8ZmUGwbyGg=; b=SIVMp9wSs0gegJTaHvnQYvefgh xPtxTcFXJIpC49TsMxKx8b2pYozwCewmjnHdBvZlv6HFMfw1Bck63CO7NGCMoS00LFw5HUs28KKg6 TAxhxVchIXKJXfBTGg6KgEmnxnCBhEG+XBw/ho9LA4cvSlXMuwrGweDcHL95UinlW/OI=; 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 1niFdT-0002oO-PR for control@debbugs.gnu.org; Sat, 23 Apr 2022 15:17:17 +0200 Date: Sat, 23 Apr 2022 15:17:14 +0200 Message-Id: <875yn0szvp.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39484 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 39484 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 39484 29.1 quit From unknown Tue Sep 09 00:44:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 May 2022 11:24:09 +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