1. 16
    emacscalc show emacs dev.xkqr.org
  1.  

  2. 3
    1. 5

      That’s how this started – but it launched very slowly without -Q, but then it launched with a lot of unnecessary UI, so I had to add Emacs Lisp to disable some UI modes, and then I discovered some platform inconsistencies… and so on.

      But the primary reason to create this script is actually to massage calc-mode into being slightly more user-friendly for non-Emacs users.

      1. 3

        full-calc is what the script is calling, after some setup.

        1. 2

          I don’t think full-calc has a postfix mode. Postfix can be useful for incremental calculations.

        2. 2

          If RPN’s what you’re after, I’ve also used and quite liked qalculate in RPN mode, which has a nice GTK+ interface.

          1. 2

            While it might not be the best, xcalc -rpn is also relatively nice (especially with the Debian Xresources).

          2. 2

            I love emacs cals and use it a lot, but it does not seem to have programmers in mind. Maybe that can be fixed, though.

            I often have to paste hexadecimal numbers (often addresses) and perform some operations on them. First, to reliably do so, this requires me to go into algebraic mode (’) and paste the number into the modeline. Then, calc does not recognize the now ubiquitous 0x prefix, wanting me to replace it with its “16#…” prefix instead. Same with binary (0b…/2#…).

            Finally, I don’t remember the keyboard commands that I often need well (shift left/right, binary AND, OR, NOT…), but I guess I would get used to them if the previous problems were not happening.

            Instead, I now mostly just fire up the python repl, where I can paste the numbers prefixed with 0x into anywhere in the terminal, and directly type in stuff like “(0xf00f1234 >> 20) & 0xffffffffc”.

            1. 3

              If you turn on the C mode (calc-c-language, d C) you can enter hexadecimal numbers in the algebraic entry that start with 0x, btw. I guess that this could be patched so that entering 0x with calc-c-language turn on would real a hexadecimal number…

              1. 2

                The existence of calc-c-language is a revelation already. I will revisit now that I know it exists, thanks.

            2. [Comment removed by author]

              1. 5

                This is an interesting comment, but I’m not sure it belongs here. Perhaps it should be its own post.