As a format string, you are practically limited in the bases that you can display:
% d means print as a decimal number (% o octal,% x hexa).
% X, like% x, but uses uppercase.
You can use calc library to manage this for you:
(require 'calc-bin) (let ((calc-number-radix 20)) (math-format-radix 39)) "1J" (let ((calc-number-radix 20)) (math-format-radix #20r1j)) "1J"
As with the read syntax used, valid calc-number-radix
values range from 2 to 36.
source share