eww-mu4e-messages 585 B

123456789101112131415161718
  1. #!/usr/bin/env -S emacs -x
  2. ;;; -*- mode: emacs-lisp; lexical-binding: t -*-
  3. (require 'server)
  4. (princ
  5. (condition-case _
  6. (if-let ((modeline-string (server-eval-at "server" '(mu4e--modeline-string)))
  7. ((string-match "\\([0-9]+\\)\\((\\+[0-9]+)\\)?/[0-9]+ $" modeline-string))
  8. (matched-string (match-string 1 modeline-string)))
  9. (progn
  10. (set-text-properties 0 (length matched-string)
  11. nil
  12. matched-string)
  13. matched-string)
  14. "0")
  15. (error
  16. "0")))
  17. (terpri)