From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Stephen Berman via "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#69943: 30.0.50;
 Tabbing through widgets can signal beginning-of-buffer error
Date: Mon, 01 Apr 2024 17:20:04 +0200
Message-ID: <874jclw1nf.fsf@gmx.net>
References: <87il1enx4z.fsf@rub.de> <8634si1dog.fsf@gnu.org>
Reply-To: Stephen Berman <stephen.berman@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="23929"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cc: 69943@debbugs.gnu.org, Mauro Aranda <maurooaranda@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 17:21:28 2024
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rrJTT-0005xy-07
	for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 17:21:27 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1rrJT2-0008M1-8Q; Mon, 01 Apr 2024 11:21:00 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rrJT1-0008Lm-Kp
 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:20:59 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rrJT1-0001rc-CV
 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:20:59 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rrJT4-0003g9-IB
 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:21:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Stephen Berman <stephen.berman@gmx.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Mon, 01 Apr 2024 15:21:02 +0000
Resent-Message-ID: <handler.69943.B69943.171198482014055@debbugs.gnu.org>
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.171198482014055
 (code B ref 69943); Mon, 01 Apr 2024 15:21:02 +0000
Original-Received: (at 69943) by debbugs.gnu.org; 1 Apr 2024 15:20:20 +0000
Original-Received: from localhost ([127.0.0.1]:51371 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rrJSN-0003ed-Qi
 for submit@debbugs.gnu.org; Mon, 01 Apr 2024 11:20:20 -0400
Original-Received: from mout.gmx.net ([212.227.15.19]:42305)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@gmx.net>) id 1rrJSI-0003eM-UY
 for 69943@debbugs.gnu.org; Mon, 01 Apr 2024 11:20:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1711984805; x=1712589605; i=stephen.berman@gmx.net;
 bh=zp5lK/O1eB3h0rH8V7zDXiiFoJSXNlpccrtfEzaLq6g=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:
 Date;
 b=ROzgk/8RFZGYLTSHJ3eHFVa4T7i9a1D/RmAhLgMKcLL0dTErxt9Btbsye8ihH7UX
 60F4Nd/8fEHPFMSnBaw5v6L1UgV/UZmH9RjETsURBn3QILJyDOCqEvPjB15MW9cHg
 Ai0p7vaXQiF4P1rzUlBWQfPi/Iyhmq71X8cIDDtr1+NQPKbO4dPtuYlndY4DUxc7T
 dmHvDPFka8TogQqAw7GHpo2NWjFxJ50MCCRrolEGMd8HOxf9vit2M/2wY++u7rphb
 ZDyzdZPkgwhEgQM9zo1u0m/6tE1kFjsOo1ugiVFdwFBL9pEJwUyqF6Q7dIl6jitzs
 VKr5PhK8HnfKhjOGDA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Original-Received: from strobelfs ([94.134.95.171]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MN5eR-1sADui0IfF-00J4Hn; Mon, 01
 Apr 2024 17:20:05 +0200
In-Reply-To: <8634si1dog.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Mar
 2024 17:36:31 +0200")
X-Provags-ID: V03:K1:ekUXQoewxDEjRjJUGoO5fYI8Z+A4touuQXJFVDLAcu4u5+7MM2Y
 vYM4h1D44jvQNAlLYLM4g/ZaHlQ4aEjHg8FZbpsz8ezylO/T4vsyfQojPc1WhmdoPNh7yn8
 X6LXQPG2R0NwoZukciEBd9xL3vNP9L/HYk66Navb+xsz5TRDLKDRGhNKI/tHc8OkbAOuFFG
 QL01KdIioHxxDLffv8FSw==
UI-OutboundReport: notjunk:1;M01:P0:nDEXnUqPcVo=;207c9p1AiDqe8VrdnKd7k2jaLiV
 BPD7OQMTTl6yXz4zYun0Q4KxdHvFH+YjYaJH11NvkMZPM0G/mRQHs3U34dwsqK0MTsGC245pC
 eshvup+zSVu65XXsbIqLVtHy0VTUXBIxZoVoNkr8viMAnp1YtA3u/1FcAr3EvDGJjUgGDuFjY
 6+2CyQ0ZV5+tifSunOfnZhaaBUHI3yTbVWHDg70zpPGPIjKba0tvH1sgXMSM03FduR7oO3MCI
 w4x02sYlf0otwx0OV9lNjhn4t6jG4V0AZJTks/Pc4IvgOUsW007iUoICKu9YpCQmmP+A+6QBa
 Br3u94uBQwe6G0A1SD1Q0dkAMVB8L/f1Rg7QsLB9gjnsU/xOUg+XKDt4n3tLCkw5lm0hTulv3
 m50Bm96zLuk/4+RZnyzEf9YlInsl4b5wctvHuOUQ5sTfHhcrzt+zjKQ5Nhml0iufjft84y9MG
 u48zBe/kktiZiseER70cwRCqAG2UtfkmDT/yn1hFHig64AL2XzkPKkAcLfFkAWtCNJsg1GT9O
 0sHoK/NFvw74S9u3t4d/D2HuOFmtSIEmF7ts9tUVebhbBm//vLbFgkzeLKDCdp0rrejzJVuGW
 W0ouFu8qXMV+XaEdoccfxiSjzZ8NX/2xPh66HRbis9mJTVuWJHyKSp273Vudys8rOvpezNkbA
 UEhmOW0MrCjPrk+NcWnutT7+nnq91rkITacnjEezxBKFhDHxWc5ZU3EV0574OeEj1r3wVtDLs
 QYGYQ8iSLo82bSuNs6GwQ//CFseRL7VneC9pyrsZaJVl2gWIRURVaa05PbV/58tGq5iN1nTV 
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:282479
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/282479>

On Fri, 22 Mar 2024 17:36:31 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> 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" <bug-gnu-emacs@gnu.org>
>>
>> 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", agai=
n
>> 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?

No comments yet, or did I miss them?  If not, any objections to
installing the patch?

Steve Berman