0

I customized org-tag-alist using the built-in customization interface. This stored the values in ("tag") . <ascii key value>) pairs like this:

  ("ez" . 90)
  ("pin" . 73)
  ("per" . 61)
  ("inprog" . 78)
  ("maybe" . 66)

Is there any way to view this data with the ascii codes converted to characters, like this?

  ("ez" . ?Z)
  ("pin" . ?I)
  ("per" . ?=)
  ("inprog" . ?N)
  ("maybe" . ?B)
Max Pfleger
  • 101
  • 8
  • 2
    Not sure whether it makes a difference in this case, but you might want a character and *not* a string: `("ez" . ?Z) ...` – NickD Oct 05 '21 at 15:08
  • What @NickD said. If you really want strings, please edit your question, including its title, to reflect that it's not about chars but about strings. – Drew Oct 05 '21 at 15:51
  • Do you actually use single-character abbreviations for 200 tags? – NickD Oct 05 '21 at 16:19
  • @NickD Yes, I want characters. I've corrected the the question. No, I don't have keys assigned for all 200 tags. – Max Pfleger Oct 05 '21 at 19:34

1 Answers1

2

Just a replace regexp :

M-x query-replace-regexp \([[:digit:]]\{2\}\) → \,(format "?%c" (string-to-number \1))

instead of (string-to-number \1)you could prefer \#1 .

gigiair
  • 2,124
  • 1
  • 8
  • 14
  • 1
    See my comment on the question: you might need to change the format. – NickD Oct 05 '21 at 15:13
  • That character regexp is exactly what I was looking for. Using 'format' with 'string-to-number' was the missing piece of the puzzle for me. – Max Pfleger Oct 05 '21 at 19:41