all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71533: 30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail.
@ 2024-06-13 10:33 Ashwin Kafle
  2024-06-15 11:02 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Ashwin Kafle @ 2024-06-13 10:33 UTC (permalink / raw)
  To: 71533

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]


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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-calc-trail-here-for-first-line-of-trail.patch --]
[-- Type: text/x-patch, Size: 898 bytes --]

From ea1822bf39aa5236368567f067064b1a2c2c6361 Mon Sep 17 00:00:00 2001
From: Ashwin Kafle <ashwin@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


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


Cheers!



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#71533: 30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail.
  2024-06-13 10:33 bug#71533: 30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail Ashwin Kafle
@ 2024-06-15 11:02 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-06-15 11:02 UTC (permalink / raw)
  To: Ashwin Kafle; +Cc: 71533-done

> From: Ashwin Kafle <ashwin@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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-15 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 10:33 bug#71533: 30.0.50; [PATCH] Calc: fix calc-trail-here on initial line of trail Ashwin Kafle
2024-06-15 11:02 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.