Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@artem If you can find "C-x h" using where-is-internal on help-map, it probably means you have 'bound' help-map by making it a command (assigning the help-map to its function cell). From emacs -q you can try (where-is-internal 'help-command) and it will return some non-nil value, while doing it for help-map returns nil. If you inspect where-is then you will find that it uses where-is-internal 'internally'. A weird thing is that replacing where-is with where-is-internal in the answer's code returns nil. But probably the reason for that can be found by further inspection.
That's a nice 'round-up' of the answer/question. Of course the IEEE-float-2-hex function also switches from number to string representation, it would be nice to just modify that function directly to make it return numbers instead of the hex string. But indeed it is probably not worth the extra time if you have the working solution already.
@JohnKitchin Would it be okay to simply use that python code and read it back into Emacs (i.e. pass it to a python script and read its output)? That is a very easy solution, I would already have the code ready for you. Or do you really prefer a pure elisp implementation? E.g. those numbers you get in python using the following line print(' '.join([f'{b:d}' for b in pack('f', 3.14)]) + '\n'). The script reads from stdin and prints to stdout.
The best way to format the code, is by formatting it while writing it. You can do this by opening the code block in a 'special edit buffer'. With the cursor on the code block, press C-c C-' to open it in the special edit buffer, press it again to update and jump back to the src-block. This answer gives a few more tricks. Of course, it should not be too difficult to fully automate this if you know some lisp, but I am not aware of an existing solution yet.
Ah, I did not realize that I had to configure the radix first using M-x calc-binary-radix (or M-x calc-hex-radix if you prefer). Calc and its documentation is somewhat of a black box to me.