Shorten messages
This commit is contained in:
parent
2ef230369a
commit
f5e58bfb37
|
@ -504,8 +504,8 @@ INFO is a plist holding contextual information. See
|
|||
(concat
|
||||
(plist-get info :spacemacs-edn-warnings)
|
||||
(format
|
||||
(concat "The link \"%s\" "
|
||||
"in the file \"%s\" "
|
||||
(concat "Link \"%s\" "
|
||||
"in \"%s\" "
|
||||
"should target the org file at "
|
||||
"GitHub "
|
||||
"(GitHub style anchors are supported)\n"
|
||||
|
@ -829,7 +829,7 @@ holding export options."
|
|||
(plist-get info :spacemacs-edn-warnings)
|
||||
(format
|
||||
(concat
|
||||
"The layer README file \"%s\" "
|
||||
"File \"%s\" "
|
||||
"doesn't have top level "
|
||||
"\"Description\" headline\n"
|
||||
"See %S\n")
|
||||
|
@ -842,8 +842,8 @@ holding export options."
|
|||
(concat
|
||||
(plist-get info :spacemacs-edn-warnings)
|
||||
(format
|
||||
(concat "The layer README.org file \"%s\" "
|
||||
"doesn't have feature list in the "
|
||||
(concat "File \"%s\" "
|
||||
"doesn't have \"Features:\"(With a colon) list in the "
|
||||
"top level \"Description\" headline\n"
|
||||
"See %S\n")
|
||||
file
|
||||
|
@ -955,5 +955,5 @@ FIXME: Figure out where they come from :"
|
|||
"Successfully exported \"%s\""
|
||||
file)
|
||||
(spacemacs/org-edn-error
|
||||
"Export finished but \"%s\" isn't exist or empty"
|
||||
"Export finished but \"%s\" doesn't exist or empty"
|
||||
target-file-name))))))
|
||||
|
|
|
@ -267,66 +267,63 @@ NOTE: N should be less than the alist's length."
|
|||
(dolist (line (split-string (with-current-buffer buff (buffer-string)) "\n"))
|
||||
(unless (or (string= line "")
|
||||
(string-match-p "^Loading.*\\.\\.\\.$" line))
|
||||
(message
|
||||
"%s"
|
||||
(or
|
||||
(let ((resp (ignore-errors (json-read-from-string line))))
|
||||
(when resp
|
||||
(let ((type (alist-get 'type resp))
|
||||
(text (replace-regexp-in-string
|
||||
"\r"
|
||||
"\n"
|
||||
(alist-get 'text resp))))
|
||||
(cond
|
||||
;; Export mode.
|
||||
((string= spacemacs-export-docs-mode "export")
|
||||
(cond
|
||||
((string= type "message")
|
||||
text)
|
||||
((string= type "warning")
|
||||
(concat "\n=============== WARNING ===============\n"
|
||||
text
|
||||
"\n=======================================\n"))
|
||||
((string= type "error")
|
||||
(concat "\n!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!\n"
|
||||
text
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"))
|
||||
((string= type "export")
|
||||
(format
|
||||
(concat "File %S has static dependency %S\n"
|
||||
"=> it will be copied into the export directory")
|
||||
(alist-get 'source resp)
|
||||
(progn
|
||||
(push text spacemacs--export-docs-copy-queue)
|
||||
text)))
|
||||
(t
|
||||
(let ((resp (ignore-errors (json-read-from-string line))))
|
||||
(unless resp
|
||||
(error "Malformed response:%s" line))
|
||||
(let ((type (alist-get 'type resp))
|
||||
(text (replace-regexp-in-string
|
||||
"\r"
|
||||
"\n"
|
||||
(alist-get 'text resp))))
|
||||
(cond
|
||||
;; Export mode.
|
||||
((string= spacemacs-export-docs-mode "export")
|
||||
(message
|
||||
"%s"
|
||||
(cond
|
||||
((string= type "message")
|
||||
text)
|
||||
((string= type "warning")
|
||||
(concat "\n=============== WARNING ===============\n"
|
||||
text
|
||||
"\n=======================================\n"))
|
||||
((string= type "error")
|
||||
(concat "\n!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!\n"
|
||||
text
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"))
|
||||
((string= type "export")
|
||||
(format
|
||||
(concat "File %S has static dependency %S\n"
|
||||
"=> it will be copied into the export directory")
|
||||
(alist-get 'source resp)
|
||||
(progn
|
||||
(push text spacemacs--export-docs-copy-queue)
|
||||
text)))
|
||||
(t
|
||||
(error
|
||||
"%s"
|
||||
(concat "\n?????????? UNKNOWN EVENT TYPE ????????????\n"
|
||||
(format "TYPE:\"%s\" TEXT: \"%s\"" type text)
|
||||
"\n?????????????????????????????????????????\n"))))
|
||||
;; Test mode.
|
||||
((string= spacemacs-export-docs-mode "test")
|
||||
(cond
|
||||
((string= type "message")
|
||||
text)
|
||||
((or (string= type "warning")
|
||||
(string= type "error"))
|
||||
(error "%s"
|
||||
(concat "\n!!!!!!!!!!!!!! TEST FAILED !!!!!!!!!!!!!!\n"
|
||||
text
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")))
|
||||
((string= type "export")
|
||||
(format
|
||||
"File %S has static dependency %S"
|
||||
(alist-get 'source resp)
|
||||
text))
|
||||
(t
|
||||
(error "%s"
|
||||
(concat "\n!!!!!!! ERROR: UNKNOWN EVENT TYPE !!!!!!!\n"
|
||||
(format "TYPE:\"%s\" TEXT: \"%s\"" type text)
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")))))
|
||||
(t (error "Unknown script mode: %s"
|
||||
spacemacs-export-docs-mode))))))
|
||||
(error "Malformed response:%s" line)))))
|
||||
"\n?????????????????????????????????????????\n"))))))
|
||||
;; Test mode.
|
||||
((string= spacemacs-export-docs-mode "test")
|
||||
(cond
|
||||
((or (string= type "message")
|
||||
(string= type "export")))
|
||||
((or (string= type "warning")
|
||||
(string= type "error"))
|
||||
(error "%s"
|
||||
(concat "\n!!!!!!!!!!!!!! TEST FAILED !!!!!!!!!!!!!!\n"
|
||||
text
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")))
|
||||
(t
|
||||
(error
|
||||
"%s"
|
||||
(concat "\n!!!!!!! ERROR: UNKNOWN EVENT TYPE !!!!!!!\n"
|
||||
(format "TYPE:\"%s\" TEXT: \"%s\"" type text)
|
||||
"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")))))
|
||||
(t (error "Unknown script mode: %s"
|
||||
spacemacs-export-docs-mode)))))))
|
||||
(while spacemacs--export-docs-copy-queue
|
||||
(spacemacs//export-docs-copy-file-to-export-dir
|
||||
(pop spacemacs--export-docs-copy-queue)
|
||||
|
|
Loading…
Reference in a new issue