* bug#42825: 26.2; Calculator Trail display fuzziness
@ 2020-08-12 9:36 Rolf Ade
2020-10-17 8:04 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Rolf Ade @ 2020-08-12 9:36 UTC (permalink / raw)
To: 42825
By default, calc starts with the *Calc Trail* buffer displayed:
emacs -Q
M-x calc RET
There is a variable to customize this:
C-h v calc-display-trail RET
Though, things are not that simple and clear:
emacs -Q
C-x 3
M-x calc RET
doesn't display the *Calc Trail* buffer, although calc-display-trail has
the (default) value t.
There's this code in calc:
(with-current-buffer (calc-trail-buffer)
(and calc-display-trail
(= (window-width) (frame-width))
(calc-trail-display 1 t)))
Display of the *Calc Trail* buffer depends on calc-trail-display *and*
the window isn't splitted with split-window-right.
Nowadays we enjoy large Monitors. It's easily possible to have four
buffers displayed side by side each with a (window-width) > 80. I, for
example, use by default a frame-width of 180 and have plenty of room for
other windows left and right.
I don't see why I don't can see the Calculator trail even if the
(window-width) of the buffer has plenty of room for it. And emacs rates
displaying the Calculator Trail importantly enough displayed it by
default.
I suppose something like this would improve emacs behaviour in this
detail:
From d259f101202d086a00b7906ff584015544cea702 Mon Sep 17 00:00:00 2001
From: Rolf Ade <rolf@pointsman.de>
Date: Wed, 12 Aug 2020 11:15:46 +0200
Subject: [PATCH] Suppress Calculator Trail only, if window is too small.
If the user want to see the Calculator Trail (calc-display-trail non
nil) suppress display of the Calculator Trail only if the window width
of the buffer is below the value of the new variable
calc-display-trail-threshold.
* lisp/calc/calc (calc): New Calculator Trail buffer display logic.
Copyright-paperwork-exempt: yes
---
lisp/calc/calc.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 09b4962107..ad962e6b40 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -738,6 +738,9 @@ calc-window-height
(defcalcmodevar calc-display-trail t
"If non-nil, M-x calc creates a window to display Calculator trail.")
+(defcalcmodevar calc-display-trail-threshold 80
+ "Minimum windows width to display Calculator trail window.")
+
(defcalcmodevar calc-show-selections t
"If non-nil, selected sub-formulas are shown by obscuring rest of formula.
If nil, selected sub-formulas are highlighted by obscuring the sub-formulas.")
@@ -1433,7 +1436,7 @@ calc
(pop-to-buffer (current-buffer)))))))
(with-current-buffer (calc-trail-buffer)
(and calc-display-trail
- (= (window-width) (frame-width))
+ (>= (window-width) calc-display-trail-threshold)
(calc-trail-display 1 t)))
(message "Welcome to the GNU Emacs Calculator! Press `?' or `h' for help, `q' to quit")
(run-hooks 'calc-start-hook)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#42825: 26.2; Calculator Trail display fuzziness
2020-08-12 9:36 bug#42825: 26.2; Calculator Trail display fuzziness Rolf Ade
@ 2020-10-17 8:04 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-17 8:04 UTC (permalink / raw)
To: Rolf Ade; +Cc: 42825
Rolf Ade <rolf@pointsman.de> writes:
> doesn't display the *Calc Trail* buffer, although calc-display-trail has
> the (default) value t.
>
> There's this code in calc:
>
> (with-current-buffer (calc-trail-buffer)
> (and calc-display-trail
> (= (window-width) (frame-width))
> (calc-trail-display 1 t)))
This has been changed in Emacs 28:
(with-current-buffer (calc-trail-buffer)
(and calc-display-trail
(calc-trail-display 1 t)))
So now it always heeds the variable, no matter what the frame width.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-17 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 9:36 bug#42825: 26.2; Calculator Trail display fuzziness Rolf Ade
2020-10-17 8:04 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).