unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22919: calc should use square root symbol to denote square root
@ 2016-03-06  3:02 Zephyr Pellerin
  2016-03-06  5:58 ` Alexis
  0 siblings, 1 reply; 7+ messages in thread
From: Zephyr Pellerin @ 2016-03-06  3:02 UTC (permalink / raw)
  To: 22919

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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-sqrt-compose-should-use-the-square-root-symbol.patch --]
[-- Type: text/x-patch; name="0001-sqrt-compose-should-use-the-square-root-symbol.patch", Size: 666 bytes --]

From 52abdb12d360a8b9c53fe09e215e9a1781d1db46 Mon Sep 17 00:00:00 2001
From: zv <zv@nxvr.org>
Date: Sat, 14 Nov 2015 15:37:08 -0800
Subject: sqrt-compose should use the square root symbol

Signed-off-by: zv <zv@nxvr.org>
---
 lisp/calc/calccomp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 81a035d..821d1b8 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -1017,7 +1017,7 @@
 		    (make-string (+ w 2) ?\_))
 	    (list 'horiz
 		  (if (= h 1)
-		      "V"
+		      "√"
 		    (append (list 'vleft (1- a))
 			    (make-list (1- h) " |")
 			    '("\\|")))
-- 
2.5.0


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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-06  3:02 bug#22919: calc should use square root symbol to denote square root Zephyr Pellerin
@ 2016-03-06  5:58 ` Alexis
  2016-03-07 16:46   ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Alexis @ 2016-03-06  5:58 UTC (permalink / raw)
  To: Zephyr Pellerin; +Cc: 22919


Whilst i like the aesthetics of using the actual square root 
symbol
rather than 'V', i use character sets and fonts that make this 
character available. Not everyone does, however, and this change 
would result in
those people getting something like the equivalent of the Unicode 
REPLACEMENT CHARACTER, � (0xFFFD), or a blank space. So i would 
like to suggest this patch not be applied without also either 
adding a way to customise which character gets used as the square 
root symbol, or logic to only display a square root glyph when 
it's certain it's available.


Alexis.





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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-06  5:58 ` Alexis
@ 2016-03-07 16:46   ` Glenn Morris
  2016-03-07 17:22     ` Eli Zaretskii
  2020-09-15 16:04     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2016-03-07 16:46 UTC (permalink / raw)
  To: Alexis; +Cc: Zephyr Pellerin, 22919

Alexis wrote:

> to suggest this patch not be applied without also either adding a way
> to customise which character gets used as the square root symbol, or
> logic to only display a square root glyph when it's certain it's
> available.

See eg ruler-mode-fill-column-char and how it uses char-displayable-p.





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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-07 16:46   ` Glenn Morris
@ 2016-03-07 17:22     ` Eli Zaretskii
  2016-03-08  7:22       ` Glenn Morris
  2020-09-15 16:04     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-03-07 17:22 UTC (permalink / raw)
  To: Glenn Morris; +Cc: flexibeast, zephyr.pellerin, 22919

> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 07 Mar 2016 11:46:25 -0500
> Cc: Zephyr Pellerin <zephyr.pellerin@gmail.com>, 22919@debbugs.gnu.org
> 
> Alexis wrote:
> 
> > to suggest this patch not be applied without also either adding a way
> > to customise which character gets used as the square root symbol, or
> > logic to only display a square root glyph when it's certain it's
> > available.
> 
> See eg ruler-mode-fill-column-char and how it uses char-displayable-p.

That might not work well on a TTY, though.





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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-07 17:22     ` Eli Zaretskii
@ 2016-03-08  7:22       ` Glenn Morris
  2016-03-08 16:07         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2016-03-08  7:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: flexibeast, zephyr.pellerin, 22919

Eli Zaretskii wrote:

>> See eg ruler-mode-fill-column-char and how it uses char-displayable-p.
>
> That might not work well on a TTY, though.

In the sense that on a tty char-displayable-p may return nil when the
answer is actually t? If so, I don't think that matters.
Or vice versa? Then just throw in an "(and (display-graphic-p) ..."
We're just talking about a default, after all.

BTW, there's probably more symbols that square-root that this applies
to, so maybe a list of (symbol . character) rather than an individual
option for each one?





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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-08  7:22       ` Glenn Morris
@ 2016-03-08 16:07         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-03-08 16:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: flexibeast, zephyr.pellerin, 22919

> From: Glenn Morris <rgm@gnu.org>
> Cc: flexibeast@gmail.com,  zephyr.pellerin@gmail.com,  22919@debbugs.gnu.org
> Date: Tue, 08 Mar 2016 02:22:39 -0500
> 
> Eli Zaretskii wrote:
> 
> >> See eg ruler-mode-fill-column-char and how it uses char-displayable-p.
> >
> > That might not work well on a TTY, though.
> 
> In the sense that on a tty char-displayable-p may return nil when the
> answer is actually t? If so, I don't think that matters.
> Or vice versa?

The latter.  On a TTY, that function can only check whether the
terminal encoding supports the character, but it has no way of knowing
whether the terminal emulator will find a glyph in its font for the
particular character.





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

* bug#22919: calc should use square root symbol to denote square root
  2016-03-07 16:46   ` Glenn Morris
  2016-03-07 17:22     ` Eli Zaretskii
@ 2020-09-15 16:04     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-15 16:04 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Alexis, Zephyr Pellerin, 22919

Glenn Morris <rgm@gnu.org> writes:

> Alexis wrote:
>
>> to suggest this patch not be applied without also either adding a way
>> to customise which character gets used as the square root symbol, or
>> logic to only display a square root glyph when it's certain it's
>> available.
>
> See eg ruler-mode-fill-column-char and how it uses char-displayable-p.

There was then some worry whether that would work on ttys...  but I
think that's perhaps a too-obscure use case to hinder this change, so I
went ahead and applied the patch (with Glenn's suggestions) to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-09-15 16:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-06  3:02 bug#22919: calc should use square root symbol to denote square root Zephyr Pellerin
2016-03-06  5:58 ` Alexis
2016-03-07 16:46   ` Glenn Morris
2016-03-07 17:22     ` Eli Zaretskii
2016-03-08  7:22       ` Glenn Morris
2016-03-08 16:07         ` Eli Zaretskii
2020-09-15 16: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).