zkry/yaml.el

`yaml-encode`: problem with vectors.

joostkremers opened this issue · 0 comments

yaml-parse-string by default stores sequences as vectors, but these cannot be encoded by yaml-encode:

Elisp> (setq data (yaml-parse-string "options:\n- twosided\n- draft\n" :object-type 'alist))
(("options" .
  ["twosided" "draft"]))

Elisp> (yaml-encode data)
*** Eval error ***  Unknown object [twosided draft]

It seems yaml--encode-object lacks a clause in the cond for vectors.