1

I am revamping an old Emacs / Gnus configuration dating from before unicode Emacs (21.3 or 22). In this configuration, I was using some unicode characters to show usenet threads:

  (setq gnus-sum-thread-tree-root "\x490a4 ")     ; "> "
  (setq gnus-sum-thread-tree-false-root "\x490a4 ") ; "> "
  (setq gnus-sum-thread-tree-indent " ") ; "  "
  (setq gnus-sum-thread-tree-single-indent "") ; ""
  (setq gnus-sum-thread-tree-leaf-with-other "\x4903c\x49020\x4904c\x490f9 ") ; "+-> "
  (setq gnus-sum-thread-tree-vertical "\x49022 ") ; "| "
  (setq gnus-sum-thread-tree-single-leaf "\x490b0\x49020\x490f9 "))   ; "\\-> "

But now with Emacs 23.2.1 I see empty squares instead of curved arrows. I suspect it can be either a fontset or an escaping problem related to unibyte / multibyte.

To exclude the escaping problem or solve it, how can I retrieve the unicode characters to use the \u1234 escaping instead of the \x12345 ? Thanks.

Edit: Thanks to an Emacs-22 I was able to insert those characters in a buffer and find their code with C-uC-x=.

The correspondance is

(setq gnus-sum-thread-tree-root "\u2564 "
        gnus-sum-thread-tree-false-root "\u2564 "
        gnus-sum-thread-tree-leaf-with-other "\u251c\u2500\u252c\25b9 "
        gnus-sum-thread-tree-vertical "\u2502 "
        gnus-sum-thread-tree-single-leaf "\u2570\u2500\u25b9 "))

...but the display is not as nice as it was at the time those unicode characters were chosen. It was on another system and I suppose that the font was nicer to display them.

Seki
  • 11,135
  • 7
  • 46
  • 70

2 Answers2

1

I suggest you fire an older Emacs (Emacs-22), make it display those strings so you get to see those nice curved arrows and then copy&paste them with the mouse (no need to use the \uNNN notation).

Stefan
  • 27,908
  • 4
  • 53
  • 82
  • I reinstalled an old Emacs-22 to be able to decode the characters correctly. As JSON mentioned my current Emacs cannot get them correctly. – Seki Oct 04 '13 at 13:58
1

In theory (decode-coding-string "\x490a4 " 'emacs-mule) should do what you want, but it doesn't seem to recognize that character, maybe because it was from an extension to MULE to support more Unicode characters.

I think the easiest solution will be to find visually the arrows you want, and replace those codes with their Unicode code points. See Arrows (Unicode block) in Wikipedia for a list of the potential candidates.

JSON
  • 4,487
  • 22
  • 26
  • thanks for the tip, I often use Emacs to deal with text encoding / converting but I do not know much about the internals. I confirm that my Emacs does not give correct result compared to an Emacs-22 with the escaped caracters in the ancient encoding. – Seki Oct 04 '13 at 14:01