GNU bug report logs - #71533
30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail.

Previous Next

Package: emacs;

Reported by: Ashwin Kafle <ashwin <at> ashwink.com.np>

Date: Thu, 13 Jun 2024 11:01:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71533 in the body.
You can then email your comments to 71533 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71533; Package emacs. (Thu, 13 Jun 2024 11:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ashwin Kafle <ashwin <at> ashwink.com.np>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Jun 2024 11:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ashwin Kafle <ashwin <at> ashwink.com.np>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail.
Date: Thu, 13 Jun 2024 10:33:20 +0000
[Message part 1 (text/plain, inline)]
Hello,

On Calc-trail, you cannot access the first element of trail using ``t
['' or going to the first line and doing (calc-trail-here). This is
because the check of empty buffer has small error.

Attached is a simple fix for that.
[0001-Fix-calc-trail-here-for-first-line-of-trail.patch (text/x-patch, inline)]
From ea1822bf39aa5236368567f067064b1a2c2c6361 Mon Sep 17 00:00:00 2001
From: Ashwin Kafle <ashwin <at> ashwink.com.np>
Date: Thu, 13 Jun 2024 16:06:38 +0545
Subject: [PATCH] Fix calc-trail-here for first line of trail.

* lisp/calc/calc.el(calc-trail-here): change 'or' to 'and'
since (bobp) return true even if the buffer is not empty.
---
 lisp/calc/calc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index e6448625cee..f92e4958e33 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2184,7 +2184,7 @@ calc-trail-here
 	(beginning-of-line)
 	(if (eobp)
             (forward-line -1))
-	(if (or (bobp) (eobp))
+	(if (and (bobp) (eobp))
 	    (setq overlay-arrow-position nil)   ; trail is empty
 	  (set-marker calc-trail-pointer (point) (current-buffer))
 	  (setq calc-trail-overlay (concat (buffer-substring (point)
-- 
2.45.1

[Message part 3 (text/plain, inline)]
Cheers!



Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 15 Jun 2024 11:03:02 GMT) Full text and rfc822 format available.

Notification sent to Ashwin Kafle <ashwin <at> ashwink.com.np>:
bug acknowledged by developer. (Sat, 15 Jun 2024 11:03:02 GMT) Full text and rfc822 format available.

Message #10 received at 71533-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ashwin Kafle <ashwin <at> ashwink.com.np>
Cc: 71533-done <at> debbugs.gnu.org
Subject: Re: bug#71533: 30.0.50;
 [PATCH] Calc: fix calc-trail-here on initial line of trail.
Date: Sat, 15 Jun 2024 14:02:04 +0300
> From: Ashwin Kafle <ashwin <at> ashwink.com.np>
> Date: Thu, 13 Jun 2024 10:33:20 +0000
> 
> On Calc-trail, you cannot access the first element of trail using ``t
> ['' or going to the first line and doing (calc-trail-here). This is
> because the check of empty buffer has small error.
> 
> Attached is a simple fix for that.

Thanks, installed on the master branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 Jul 2024 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.