From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 9ecebcdded: * lisp/simple.el (next-completion): Handle first completion specially. Date: Fri, 13 Jan 2023 15:37:36 +0200 Message-ID: <83bkn2a733.fsf@gnu.org> References: <167354569613.4370.3805904095626587994@vcs2.savannah.gnu.org> <20230112174816.7E88BC00A7F@vcs2.savannah.gnu.org> <87o7r2eh04.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1468"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, gregory@heytings.org, juri@linkov.net To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 13 18:47:26 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGO9G-000AWq-AU for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Jan 2023 18:47:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGKFY-0006Jl-Oi; Fri, 13 Jan 2023 08:37:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGKFX-0006JZ-L7 for emacs-devel@gnu.org; Fri, 13 Jan 2023 08:37:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGKFW-0004Ur-GP; Fri, 13 Jan 2023 08:37:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rN5HPyexeCK4QLrs6N2O3gG7yrfaMEIkY/BKnXjnNiA=; b=UpzAA9PDuk+K J9w4rlnLJbGXiey8RahheDDAf5su4adG867hiyheoDWrjwuNstGvJHn/8jiV2EpglhQaL1OgLO7zp 9bOlu1d29Dkml77xWLKQBNrng8PE69VPJJSAoT55wofnCEJhF/U0AK8zicgZGxCYiw4jH4R0DsaYo +nk6+R+F7VEwPqxMyaKcgLvzPDWrGYPYu+/BZGf6h0JCDp5aT6aqY4Eo3FpYYQKbeccYujV0jauJ0 hwd912RRmmvcV0YiglcI9MM2Uh0zCq2ts/GrSBnk8hPgY4lvtrlV6y5Ri1+LL0tmv6hSbl6lXDlSq DbvDrCB9wGhFh4XvV+FM5Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGKFV-0007b2-L4; Fri, 13 Jan 2023 08:37:37 -0500 In-Reply-To: <87o7r2eh04.fsf@gmail.com> (message from Robert Pluim on Fri, 13 Jan 2023 13:49:47 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302398 Archived-At: > From: Robert Pluim > Cc: Gregory Heytings , Juri Linkov > Date: Fri, 13 Jan 2023 13:49:47 +0100 > > >>>>> On Thu, 12 Jan 2023 12:48:16 -0500 (EST), Juri Linkov said: > > Juri> branch: emacs-29 > Juri> commit 9ecebcdded157e1efc2f51b67967fd101797f225 > Juri> Author: Gregory Heytings > Juri> Commit: Juri Linkov > > Juri> * lisp/simple.el (next-completion): Handle first completion specially. > > Juri> When completions-header-format is nil and completion-show-help is nil, > Juri> the first completion is at the beginning the buffer, so 'M-' > Juri> missed it and moved to the second completion. Handle this case by > Juri> setting/checking the special text-property 'first-completion' that > Juri> is nil at the first call (bug#60411). > > This causes the following test failure for me: > > Making completion list... > > Test completions-header-format-test backtrace: > signal(ert-test-failed (((should (equal "ac" (get-text-property (poi > ert-fail(((should (equal "ac" (get-text-property (point) 'completion > #f(compiled-function () #)() > minibuffer-setup() > read-from-minibuffer("Prompt: " nil (keymap (menu-bar keymap (minibu > completing-read-default("Prompt: " ("aa" "ab" "ac") nil nil nil nil > completing-read("Prompt: " ("aa" "ab" "ac")) > #f(compiled-function () #)() > ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test > ert-run-test(#s(ert-test :name completions-header-format-test :docum > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m > ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n > ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) ( > ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un > eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( > command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/minibuffer-tests" "- > command-line() > normal-top-level() > Test completions-header-format-test condition: > (ert-test-failed > ((should > (equal "ac" > (get-text-property ... ...))) > :form > (equal "ac" > #("ab" 0 1 > (face ...) > 1 2 > (face ...))) > :value nil :explanation > (array-elt 1 > (different-atoms > (99 "#x63" "?c") > (98 "#x62" "?b"))))) > FAILED 25/25 completions-header-format-test (0.000478 sec) at lisp/minibuffer-tests.el:414 Fixed. It's a clear case of a test that adapted the results to what the code produced, not to the desired/expected value.