Function: majutsu-tag-parse-list-output
majutsu-tag-parse-list-output is a natively compiled function defined
in majutsu-tag.el.
Signature
(majutsu-tag-parse-list-output OUTPUT)
Documentation
Parse `jj tag list` OUTPUT into grouped entries.
Return a list of plists with keys:
- :name tag name
- :lines rendered lines belonging to the tag
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-tag.el
(defun majutsu-tag-parse-list-output (output)
"Parse `jj tag list` OUTPUT into grouped entries.
Return a list of plists with keys:
- :name tag name
- :lines rendered lines belonging to the tag"
(let ((entries nil)
current)
(dolist (line (split-string (or output "") "\n" t))
(if (string-match "^\\([^[:space:]:]+\\)\\(?: (conflicted)\\)?:" line)
(progn
(when current
(push (list :name (car current) :lines (nreverse (cdr current))) entries))
(setq current (cons (match-string 1 line) (list line))))
(when current
(setcdr current (cons line (cdr current))))))
(when current
(push (list :name (car current) :lines (nreverse (cdr current))) entries))
(nreverse entries)))