bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66944: 30.0.50; [PATCH] make calc parse fractions written using U+20


From: Eli Zaretskii
Subject: bug#66944: 30.0.50; [PATCH] make calc parse fractions written using U+2044 FRACTION SLASH
Date: Sat, 27 Jan 2024 11:09:03 +0200

> Cc: 66944@debbugs.gnu.org
> From: Daniel Brooks <db48x@db48x.net>
> Date: Sat, 13 Jan 2024 08:11:27 -0800
> 
> Stefan Kangas <stefankangas@gmail.com> writes:
> 
> > Daniel Brooks <db48x@db48x.net> writes:
> >
> >> Fractions written as `2:3', `2÷3', and `⅔' are all parsed as rational
> >> fractions; `2⁄3' ought to do the same.
> >
> > Thanks, but was the intention here to attach a patch?
> >
> > I can't see one attached, so maybe you missed it.
> 
> /me facepalms
> 
> Yea, dunno how that happened. Let me try again, this time with my tongue
> held at just the right angle…

Thanks, and apologies for a delay in reviewing the patch.

I have some minor comments below, but I also see that we have no
copyright assignment from you, and without that we will be unable to
accept contributions from you after this one.  Would you like to start
the paperwork of assigning the copyright to the FSF at this time, so
we could accept contributions from you in the future?

> --- a/doc/misc/calc.texi
> +++ b/doc/misc/calc.texi
> @@ -10571,6 +10571,12 @@ Fractions
>  @samp{@var{radix}#@var{num}:@var{denom}} (or in the analogous three-part
>  form).  The numerator and denominator always use the same radix.
>  
> +Fractions may also be entered with @kbd{⁄} (U+2044 FRACTION SLASH) in
> +place of any @kbd{:}. Precomposed fraction characters from @kbd{½}
> +(U+00BD VULGAR FRACTION ONE HALF) through @kbd{⅞} (U+215E VULGAR
> +FRACTION SEVEN EIGHTHS) as supported as well. Thus @samp{2:3},
> +@samp{2⁄3}, and @samp{⅔} are all equivalent.

Please try rewriting these to avoid non-ASCII characters in Texinfo
source files, since processing those with TeX could cause problems.
Where possible, please use the special Texinfo commands described in
the "Insertions" chapter of the Texinfo manual and its sections.  If
some character cannot be written using ASCII characters as described
in that section, please just name it, as in "U+2044 FRACTION SLASH",
but don't include it verbatim.

Also, our conventions are to leave two spaces between sentences in
documentation and comments (this is relevant to the NEWS entry as
well).

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -983,7 +983,12 @@ URIs are now prefixed with "https://"; instead.
>  +++
>  *** New command 'customize-dirlocals'.
>  This command pops up a buffer to edit the settings in ".dir-locals.el".
> -
> +** Calc
> +*** Calc parses fractions written using U+2044 FRACTION SLASH
> +Fractions of the form 123⁄456 are handled as if written 123:456. Note
> +in particular the difference in behavior from U+2215 DIVISION SLASH
> +and U+002F SOLIDUS, which result in division rather than a rational
> +fraction.

This entry should be marked with "+++", as the necessary manual
changes were made.  Also, this doesn't mention the precomposed
fractions; I think it should.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]