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:45:56 +0300 Message-ID: <83sfqj6dxn.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> <83y20b6es8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54800@debbugs.gnu.org To: tiga.arenz@web.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 11 13:46:11 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 1ndsUl-0000jH-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 13:46:11 +0200 Original-Received: from localhost ([::1]:44228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndsUj-0004QI-Tm for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 07:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndsUc-0004Pu-Fj for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndsUc-0004kg-74 for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ndsUc-0001gU-4j for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 07:46: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:46: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.16496775606467 (code B ref 54800); Mon, 11 Apr 2022 11:46:02 +0000 Original-Received: (at 54800) by debbugs.gnu.org; 11 Apr 2022 11:46:00 +0000 Original-Received: from localhost ([127.0.0.1]:42868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndsUa-0001gF-Lt for submit@debbugs.gnu.org; Mon, 11 Apr 2022 07:46:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndsUZ-0001g0-Bm for 54800@debbugs.gnu.org; Mon, 11 Apr 2022 07:45:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndsUT-0004i6-UQ; Mon, 11 Apr 2022 07:45:53 -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=KUVccT6MwOCvfbtNZVfWlQM+kY6JZZItZ20o87pSxJ0=; b=V2XyKF8aAE9D VV07/PLBayX25rh7gJFyJB6CWa/3Ah0JNz1j1UaXoDSh1UKIkrj+28JW65BRYH3OdDPfuHUuhDoNF +S1sqZsSO98MHOk3wZ+XGa7ln0/SnGoSSvhduHLCcQtLiGHiPPj3qGu+aR8dP1/l7PhQHCHteJeeY VMJIEiwtI5b/nOF926o7YK5ghLUi9SCDf3xb+4T883x7qi/2u1kVssG10nhEBzJWCz226Qb4aOKmS Ao8GFu5LOmLtVRsBB+Vr0OO4JJgFEkxNfwy/u6QmhTZ2S0HoiBdJlFFH47KaJpwT2ETKUelGo6ZBm yoAPUKa9z0dwzFdpiqmu0A==; Original-Received: from [87.69.77.57] (port=1587 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 1ndsUT-0000iW-De; Mon, 11 Apr 2022 07:45:53 -0400 In-Reply-To: <83y20b6es8.fsf@gnu.org> (message from Eli Zaretskii on Mon, 11 Apr 2022 14:27:35 +0300) 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:229716 Archived-At: > Date: Mon, 11 Apr 2022 14:27:35 +0300 > From: Eli Zaretskii > Cc: 54800@debbugs.gnu.org > > > 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? And while at that, would the below fix the problem in the rare cases where you saw them? (vertical-motion (- 3 (window-height win 'ceiling))) That is, ask window-height to produce the smallest integer number greater than the window's height (in case the height in line units is not integer)?