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 16:57:12 +0200 Message-ID: <837cxqa3ef.fsf@gnu.org> References: <167354569613.4370.3805904095626587994@vcs2.savannah.gnu.org> <20230112174816.7E88BC00A7F@vcs2.savannah.gnu.org> <87o7r2eh04.fsf@gmail.com> <83bkn2a733.fsf@gnu.org> <87k01qedvv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26991"; 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 16:02:45 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 1pGLZt-0006IV-D7 for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Jan 2023 16:02:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGLUc-0002YD-P9; Fri, 13 Jan 2023 09:57:18 -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 1pGLUb-0002XQ-Bu for emacs-devel@gnu.org; Fri, 13 Jan 2023 09:57:17 -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 1pGLUa-00045e-E0; Fri, 13 Jan 2023 09:57:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Q6668gomr4OfDNogsK7lms3Y/uqIoHzYWgCXUGa70m4=; b=nnOcpjMl7rroTpAnsKZI vxFoBtD4DAVX2q769TxC33xDaroYbjjbd0VRGwe+Cwh4tfYLB0EDfstcTwx2IBSke0HsjwjLqnMU+ jwM0SVm/2kQaCaJUPoQZvZ+69A1J6sDAIx2uQlZkOxxVy9rj944AzujZaIDl67NnRjAowZXM6WFsO pp+NQn1LkpVHM4Y/HCwDKicesOkn+OWGRP96g/ta6HeZT11mFNIXBonxvOwWK66Vf3ztWZEqxuR6e L9qMPrOl9S1J9u8MMA4RSfowvgMrnG9PYCo65XVosIIGH+F+nASeiTHcZZND1xkvOvCNHPtpr7zeQ 5TifPbI9i24vuQ==; 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 1pGLUZ-0005u4-TS; Fri, 13 Jan 2023 09:57:16 -0500 In-Reply-To: <87k01qedvv.fsf@gmail.com> (message from Robert Pluim on Fri, 13 Jan 2023 14:57:08 +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:302396 Archived-At: > From: Robert Pluim > Cc: emacs-devel@gnu.org, gregory@heytings.org, juri@linkov.net > Date: Fri, 13 Jan 2023 14:57:08 +0100 > > >>>>> On Fri, 13 Jan 2023 15:37:36 +0200, Eli Zaretskii said: > > Eli> Fixed. It's a clear case of a test that adapted the results to what > Eli> the code produced, not to the desired/expected value. > > Itʼs fixed, but Iʼll admit that I donʼt understand why: > > (should (equal "aa" (get-text-property (point) 'completion--string))) > (next-completion 3) > (should (equal "ac" (get-text-property (point) 'completion--string))) > (previous-completion 2) > (should (equal "aa" (get-text-property (point) 'completion--string))) > > So we go forward 3 from "aa" to get to "ac", but then to get back to > "aa" itʼs back 2? Because the first next-completion goes to "aa". The original "position" is _before_ the first candidate: that's what the commit that you blamed was about.