From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dario Gjorgjevski Newsgroups: gmane.emacs.bugs Subject: bug#42149: Substring and flex completion ignore implicit trailing =?UTF-8?Q?=E2=80=98any=E2=80=99?= Date: Mon, 28 Dec 2020 11:22:18 +0100 Message-ID: References: <87k0znsdjb.fsf@gmail.com> <87sgbsv7gg.fsf@gmail.com> <871rfal18a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42149@debbugs.gnu.org, Stefan Monnier To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 28 11:23:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktpgM-0005Ww-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Dec 2020 11:23:18 +0100 Original-Received: from localhost ([::1]:44322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktpgL-0001Ct-3K for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Dec 2020 05:23:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktpg8-0001CT-CW for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 05:23:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktpg5-0005HD-TY for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 05:23:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ktpg5-0006ME-Q2 for bug-gnu-emacs@gnu.org; Mon, 28 Dec 2020 05:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dario Gjorgjevski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Dec 2020 10:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42149-submit@debbugs.gnu.org id=B42149.160915094724377 (code B ref 42149); Mon, 28 Dec 2020 10:23:01 +0000 Original-Received: (at 42149) by debbugs.gnu.org; 28 Dec 2020 10:22:27 +0000 Original-Received: from localhost ([127.0.0.1]:34258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktpfX-0006L7-Ao for submit@debbugs.gnu.org; Mon, 28 Dec 2020 05:22:27 -0500 Original-Received: from mail-ej1-f45.google.com ([209.85.218.45]:41517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktpfU-0006Ks-Q1 for 42149@debbugs.gnu.org; Mon, 28 Dec 2020 05:22:25 -0500 Original-Received: by mail-ej1-f45.google.com with SMTP id ce23so13573124ejb.8 for <42149@debbugs.gnu.org>; Mon, 28 Dec 2020 02:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=DhxKrL1CVPPsdRTFJb8FqPWPe2rAgdLNmgJbKZt3EAE=; b=sR4+lQinjI2Rf/H2CNU34Wvf4yFi1Xi8gk0lycDWgZeUelrRoQPk4UCwDCmugRkvsQ 3Bc/6oHCx6tsKQ1UbAooYKebIBlB/nKKrczI5ffCm/6fiw+Ug0aJ8KeobWIjtbMJBYvg AowCRU9eZyolYRxe8QKp9pefLcsAeLkg84lbPxOGpUWu1caeSJ/UUQnvp+Lmj300nIQA eQN0jV8X4LvobIcb9QUDOuNZnrMXx762bq8xYZf8E5rVxhqY+BHsoO0CXiMLOQ7c7bgh a0gXnWLstGuOQSPPwNKC4SPusdUpL0+nsq9wFby4lh7qInWWSalILHf6sbZgwOaZZwpO dFaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=DhxKrL1CVPPsdRTFJb8FqPWPe2rAgdLNmgJbKZt3EAE=; b=J5nq3SNJIm96wtDe1Hxs7nGx4OMZ5YDNuzQKSXTEuFt5gSEfy5V9x6BwF/NxuNvnuk Vff2glReD+kPZryIjjz7jxNYeNr2Yvp4BICBUkHx5QY+dcA7uhdqeNjgcvMe8Xz8nfGT rcMdljN0uoab2Gx50U/uL7UzADHeBuF7y0O8P8nP7xddAt6u+Ordvhn1zRVNvnH7S57R pAjX7cG7RauN3rv+TOlrKcLwWqIqeGs11lt9ZWi1wpAH1c4vkO4xxPyjfq2UgMj0e6Y3 MZgU+av31f22j2N61FTJdJtGS6L70ixhHo60rFGfpB3yOOhasyGleWn0uHhDNyWv5szc 6FTw== X-Gm-Message-State: AOAM530c1m4trBl1BUy+9rQpXLS2sbkMht0PM1u3sOhTI9yTXlBdo+aS jprrD35SCIpOlACDzMTirPcASHVVvTY= X-Google-Smtp-Source: ABdhPJxMdXPcxEU3yItwYfy3zdAe7E8QLJ3N8HEaw45/xIAQfDmFv9/9akeF11jLAcAUYz73ZPGqMw== X-Received: by 2002:a17:907:9614:: with SMTP id gb20mr29441838ejc.406.1609150938998; Mon, 28 Dec 2020 02:22:18 -0800 (PST) Original-Received: from ZALANDO-31298 ([79.140.114.243]) by smtp.gmail.com with ESMTPSA id ga37sm16099187ejc.96.2020.12.28.02.22.18 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Dec 2020 02:22:18 -0800 (PST) In-Reply-To: <871rfal18a.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 28 Dec 2020 09:38:13 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196857 Archived-At: Hi Jo=C3=A3o, > Indeed, I'm very sorry to be a kill-joy here, the patch doesn't look > very good to me. It=E2=80=99s all fine, however... > Last time I looked it was too complex for me to follow, touches many > lines, and created unnecessary consing. I'm convinced the current > algorithm in completion-pcm--hilit-commonality is fine for these > 1-char edge cases, given that the assumptions hold. I very much disagree with this due to 1. the test cases and 2. the previous reply to Stefan where I tried to explain the shortcomings of the current implementation of completion-pcm--hilit-commonality. Also, could you point to the unnecessary consing? If anything, I believe my patch is faster than the current implementation. > I'm not aware that it's not sound, but I do believe it's too complex and > not well understood. In constrast, I can understand the three-line fix > I did earlier and which covers all of Darios's test cases for the flex > completion style. Previously it was failing 7 cases, now it is only > failing these 3. Making the `any' explicit was also the very first thing I suggested, but further testing pointed to problems it doesn=E2=80=99t solve, which are ind= eed parts of the tests that are failing. I can add more tests if you think that would help. Best regards, Dario --=20 $ keyserver=3Dhkps://hkps.pool.sks-keyservers.net $ keyid=3D744A4F0B4F1C9371 $ gpg --keyserver $keyserver --search-keys $keyid