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#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error Date: Fri, 22 Mar 2024 17:36:31 +0200 Message-ID: <8634si1dog.fsf@gnu.org> References: <87il1enx4z.fsf@rub.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20798"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69943@debbugs.gnu.org To: Stephen Berman , Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 22 16:37:31 2024 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 1rngxX-0005CU-0h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Mar 2024 16:37:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rngxP-0001kZ-6L; Fri, 22 Mar 2024 11:37:23 -0400 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 1rngxN-0001kQ-JX for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 11:37:21 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rngxN-00009y-Ac for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 11:37:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rngy1-0003Nn-T7 for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 11:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Mar 2024 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69943 X-GNU-PR-Package: emacs Original-Received: via spool by 69943-submit@debbugs.gnu.org id=B69943.171112184512879 (code B ref 69943); Fri, 22 Mar 2024 15:38:01 +0000 Original-Received: (at 69943) by debbugs.gnu.org; 22 Mar 2024 15:37:25 +0000 Original-Received: from localhost ([127.0.0.1]:32829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rngxR-0003Lf-2O for submit@debbugs.gnu.org; Fri, 22 Mar 2024 11:37:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rngxQ-0003LJ-4o for 69943@debbugs.gnu.org; Fri, 22 Mar 2024 11:37:24 -0400 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 1rngwe-0008TQ-7l; Fri, 22 Mar 2024 11:36:36 -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=4d8X8qjld7ameRUpvbONOleRQusUQi43cnyq5DnwVo8=; b=avbW5W1ImIfP 2CiRkn1X/msEnsUjU9Iujoyc3u5AfYoYdguV9vk9Wx15XpixXQ0p0Urw3AJanYqLBxw7kNAhPcOJe aG0y6SPkzpnExLPnEygWVxfJnvwO3XPrB92qqdYSLf3bLZa8ho88Jw65SuyyvkJzprPJeH5GFElVV loEWiZzAEr2kYAG+G4vD1Frr9x3i4BJ37S4DbPuulluy8L2FDKPtzAiPEYn/M1sJ8v8L35CRuYTuv awBhwuFnkYqKSGy3B5f1S4NTcEjV58HnKGQoQXDVbauuJA4PK46vC6PXJX0LbTmhtOelz3OwtovQl WpAsDTBfsGx7u3nLTYhTng==; In-Reply-To: <87il1enx4z.fsf@rub.de> (bug-gnu-emacs@gnu.org) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281948 Archived-At: > Date: Fri, 22 Mar 2024 15:45:16 +0100 > From: Stephen Berman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > 0. emacs -Q > > 1. Evaluate the following sexp: > > (let ((buf (get-buffer-create "*Widget Test*"))) > (switch-to-buffer buf) > (dolist (el '("First" "Second" "Third")) > (widget-create 'push-button el)) > (use-local-map widget-keymap) > (widget-setup) > (goto-char (point-min))) > > Now the current buffer is *Widget Test* containing three push-button > widgets labeled "First", "Second", and "Third", and point is at the > start of the first widget, at BOB. > > 2. Hit the TAB key (bound to widget-forward) three times: this moves > point successively from "First" to "Second" to "Third" and then back to > "First" -- but on returning to the initial position after the third TAB, > a beginning-of-buffer error is also signaled. > > 3. Likewise, hitting S-TAB (bound to widget-backward) three times moves > backwards across the widgets, from "Third" to "Second" to "First", again > signaling a beginning-of-buffer error after the last S-TAB. > > These beginning-of-buffer errors are due to widget-move (the workhorse > behind widget-forward and widget-backward) calling backward-char in a > loop without checking for BOB. The attached patch fixes this. The > patch also includes additions to widget-test-widget-move (from which > most of the above sexp was taken) that test moving to a widget at BOB. > (If the patch is acceptable, whoever commits it should use the correct > bug# before pushing it, or I can do that myself.) Mauro, any comments to the proposed patch? Thanks.