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#54800: 28.1; calc: Cursor positioned at weird position in calc stack Date: Mon, 11 Apr 2022 14:27:35 +0300 Message-ID: <83y20b6es8.fsf@gnu.org> References: <4a0319d6-b533-b3d8-bf52-bb18d74757e1@web.de> <831qy6aewb.fsf@gnu.org> <3e3b4386-9720-60bb-1e54-fa7326191b7a@web.de> <83k0by8js0.fsf@gnu.org> <4792caf2-0ef7-d768-6b0a-c87f38cde558@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54800@debbugs.gnu.org To: Christoph Arenz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 11 13:28:25 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 1ndsDZ-0009O7-G1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 13:28:25 +0200 Original-Received: from localhost ([::1]:35058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndsDY-0005WH-67 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 07:28:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndsDC-0005MN-PY for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndsDC-0001kZ-Gf for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ndsDC-0007S1-DS for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:28:02 -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, 11 Apr 2022 11:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54800-submit@debbugs.gnu.org id=B54800.164967646228578 (code B ref 54800); Mon, 11 Apr 2022 11:28:02 +0000 Original-Received: (at 54800) by debbugs.gnu.org; 11 Apr 2022 11:27:42 +0000 Original-Received: from localhost ([127.0.0.1]:42796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndsCr-0007Qr-Ot for submit@debbugs.gnu.org; Mon, 11 Apr 2022 07:27:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndsCq-0007Qc-OZ for 54800@debbugs.gnu.org; Mon, 11 Apr 2022 07:27:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndsCl-0001gh-DW; Mon, 11 Apr 2022 07:27:35 -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=N7Fx5GVRTUSC/3HUw8bw5uHtbk7Ml8qlsZknqZe0/Vg=; b=A3LP86OWQLsQ bQkf5FAl3w/ayV+5q5S3EDf7tgwtJEPsdS/BJHGwVyes+VYYG25oYp2QTTN7JEAVzBfCyCImSKW5S gpqShUMajlSPo+E6uek48fQItOt6JnhkMLJ0/EXpEvwcoQwFPN1SvPArZl9YnDC528d1ZKY+KrSJ5 u35dPitELWI0oFPHBFP8gDexs8r3MubPJ7rici7+KhlTkEfVC5Iw/470MV0y3Xuwx8kRr7m2WY7xF DeKzBeC+CxyfP2Tea5n5Wj0pUtN82eZuc7ZH13hAseGSaealibpC/SVKXrkzF0wlbwb7htm/vgur6 hRqlw+xM2/9eOWDrnMtxyg==; Original-Received: from [87.69.77.57] (port=4416 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 1ndsCi-0003Y9-NW; Mon, 11 Apr 2022 07:27:35 -0400 In-Reply-To: <4792caf2-0ef7-d768-6b0a-c87f38cde558@web.de> (message from Christoph Arenz on Mon, 11 Apr 2022 12:25:24 +0200) 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:229713 Archived-At: > Date: Mon, 11 Apr 2022 12:25:24 +0200 > Cc: 54800@debbugs.gnu.org > From: Christoph Arenz > > On 09.04.22 15:32, Eli Zaretskii wrote: > >> Date: Sat, 9 Apr 2022 14:31:06 +0200 > >> Cc: 54800@debbugs.gnu.org > >> From: Christoph Arenz > >> > >>> I think the bug is actually off-by-one error, because the > >>> vertical-motion call doesn't take the header-line into account. So I > >>> suggest the following patch instead, please see if it solves the > >>> problem: > >> Your patch solves the problem and shows maximum content of the stack > >> in the window. > > Thanks, I installed the fix on the emacs-28 branch. > > > I noticed that while the patch fixes the problem in most cases, > depending on the height of the calc stack window, there can be the case > that the cursor is not positioned on the top-of-stack symbol `.' but one > line > above, at the beginning of the line with the first stack entry. > > This can be changed by using the number 4 instead of 3 in the patch. > Not sure if this is the best fix. > > (vertical-motion (- 4 (window-height win))) Can you show a reproducible recipe starting from "emacs -Q", so I could investigate? Thanks.