GNU bug report logs - #21648
25.0.50; [PATCH] Add ability to specify radix for the yanked number in calc-yank

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Thu, 8 Oct 2015 15:10:01 UTC

Severity: wishlist

Tags: patch

Found in version 25.0.50

Done: Kaushal Modi <kaushal.modi <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: jay.p.belanger <at> gmail.com
Cc: 21648 <at> debbugs.gnu.org
Subject: bug#21648: 25.0.50; [PATCH] Add ability to specify radix for the yanked number in calc-yank
Date: Thu, 8 Oct 2015 12:19:35 -0400
[Message part 1 (text/plain, inline)]
Thanks for the review!

I will work out these kinks by the time we can add in more features.
I'll update this thread then.


--
Kaushal Modi

On Thu, Oct 8, 2015 at 12:08 PM, Jay Belanger <jay.p.belanger <at> gmail.com>
wrote:

>
> Hi Kaushal,
>
> > I read this question of emacs.stackexchange
> > ( http://emacs.stackexchange.com/q/13451/115)
> > where the user needed to specify the radix of the number he was
> > pasting in calc.
> >
> > If the calc default radix is decimal and if a user pastes 1000, it
> > will be pasted as decimal 1000. But what if the user meant to paste
> > binary 1000 (decimal 8)?
> >
> > My patch below enables doing that using numeric prefixes.
> >
> > Please advise if merging this patch to calc-yank is a good idea or if
> > needs improvement/bug fixes before the merging.
>
> There's a feature freeze on right now, so it shouldn't be added to Emacs
> right away.  But it looks useful.
>
> With the patch, if the yanked number already has the radix prefix, there
> is an error.  It might make more sense to have Calc do an appropriate
> conversion. Also, the number of radixes in the patch is less than Calc
> allows.
> It might make more sense to have calc-yank use the current Calc's
> current radix rather than a prefix radix.
> I don't recall the policy on using cl- functions, but cond could
> easily be used instead of cl-case.
>
> But this should be brought up again after the feature freeze.
>
> Jay
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 224 days ago.

Previous Next


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