GNU bug report logs - #43764
Calc shift right broken

Previous Next

Package: emacs;

Reported by: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>

Date: Fri, 2 Oct 2020 15:29:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, "43764 <at> debbugs.gnu.org" <43764 <at> debbugs.gnu.org>
Subject: bug#43764: Calc shift right broken
Date: Sat, 10 Oct 2020 18:24:39 +0200
9 okt. 2020 kl. 17.34 skrev Vincent Belaïche <vincent.b.1 <at> hotmail.fr>:

> What could be improved would be to add some more functions, like (some ideas) :
> 	• set bit width 0 would remove the automatic clipping meaning infinite width.

This seems both useful and straightforward to implement and understand. I've attached a patch (lacking documentation but otherwise complete) -- is it what you had in mind?

> 	• have the H prefix (Hyperbolic) not only for 'b l' but also for the other shifts operation, so that the width can be set on an operation by operation basis with the prefix argument.

Your wish has been granted! It already works that way, it's just not very well documented. Try it.

> 	• Maybe there could be some display mode in which when integers are wider that the bit width this is displayed somehow, e.g. the pipe in 16#12|34 would appear with a bit width of 8, 16#123|4 for a bit width of 7. Just to warn the user « beware the clip ».

It's not a bad suggestion, but since this is Calc, nothing is very simple. Let's give it some thought.






This bug report was last modified 4 years and 197 days ago.

Previous Next


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