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.bugs Subject: bug#54374: 29.0.50; previous-completion fails at beginning of completions buffer Date: Mon, 14 Mar 2022 14:59:14 +0200 Message-ID: <83wngwk7vh.fsf@gnu.org> References: <86h782b3zk.fsf@mail.linkov.net> <871qz5k2na.fsf@posteo.net> <83bky9kyk2.fsf@gnu.org> <87wngx9c8i.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32845"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54374@debbugs.gnu.org, juri@linkov.net To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 14 14:00:43 2022 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 1nTkJX-0008QU-IZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 14:00:43 +0100 Original-Received: from localhost ([::1]:53740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTkJV-00046O-SQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 09:00:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTkIt-00043H-FQ for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTkIt-0002jv-2x for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTkIt-00007J-1m for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2022 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54374 X-GNU-PR-Package: emacs Original-Received: via spool by 54374-submit@debbugs.gnu.org id=B54374.1647262776378 (code B ref 54374); Mon, 14 Mar 2022 13:00:02 +0000 Original-Received: (at 54374) by debbugs.gnu.org; 14 Mar 2022 12:59:36 +0000 Original-Received: from localhost ([127.0.0.1]:44325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTkIS-000061-0W for submit@debbugs.gnu.org; Mon, 14 Mar 2022 08:59:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTkIQ-00005m-7w for 54374@debbugs.gnu.org; Mon, 14 Mar 2022 08:59:34 -0400 Original-Received: from [2001:470:142:3::e] (port=46968 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTkIK-0002cH-1d; Mon, 14 Mar 2022 08:59:28 -0400 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=1NlxD+GrEM0KONhemsk9w8+GPsoq8ri+t1cTZyIpOFM=; b=Iv8ZncC4vRZg P8PcOZfC4hcKrgc/Wd8IBMUIwl1BXXPLd1tPCdNP0xLZezimrYpRBbptFzWw0kyIEQnDg+5mF1lHp R2K62xm6I8xtUn1s7ju+5rIxvUnJe7BG8G90GsVNVKfDH+pY8vtUMBr3s/Ol/oeUh9p8cEfNCsgvi Yw0+h1inUIUuirADq9ZW378phxzS4xsplld0ZuOAHQMHvHfeZrlMn0PNnNsbw6FTrYh73VReVAWvG 29iNopXv2VILHtBu2+4X9DB2dhbmjr87kNQV9x0paP85Yb8ks5mz+ozo+uPB3bD75x3Nz8atTKjoh daKgzG0EPdoT12w40Csggw==; Original-Received: from [87.69.77.57] (port=4703 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 1nTkII-00014i-Pj; Mon, 14 Mar 2022 08:59:27 -0400 In-Reply-To: <87wngx9c8i.fsf@posteo.net> (message from Philip Kaludercic on Mon, 14 Mar 2022 08:20:29 +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:228353 Archived-At: > From: Philip Kaludercic > Cc: juri@linkov.net, 54374@debbugs.gnu.org > Date: Mon, 14 Mar 2022 08:20:29 +0000 > > Eli Zaretskii writes: > > >> From: Philip Kaludercic > >> Date: Sun, 13 Mar 2022 20:39:53 +0000 > >> Cc: 54374@debbugs.gnu.org > >> > >> - (while (< n 0) > >> + (while (and (< n 0) (< 1 (point))) > > > > Please always use point-min, never a literal 1. > > Can do, but does it make a difference in this case? The only reason the > comparison is made is so that (1- (point)) doesn't return an invalid > point value. Any buffer position outside of the accessible portion of the buffer is almost always invalid; the number of APIs which tolerate such values of buffer position is very small. Here, try this: emacs -Q M-: (narrow-to-region 20 (point-max)) RET M-: (get-text-property 1 'mouse-face) RET You will get the same args-out-of-range error. That's because get-text-property validates the position against the accessible portion of the buffer, not against some absolute values.