Fix khard.el
This commit is contained in:
parent
2118704d98
commit
c26beed6e9
@ -72,19 +72,18 @@ If NO-CONFIRM is nil, do not ask the user."
|
|||||||
(defun khard--new-process-filter (proc str)
|
(defun khard--new-process-filter (proc str)
|
||||||
"Process filter for `khard-new'.
|
"Process filter for `khard-new'.
|
||||||
PROC and STR are described in `set-process-filter'."
|
PROC and STR are described in `set-process-filter'."
|
||||||
(let ((lines (string-split str "\n")))
|
(let ((lines (string-split str "\n"))
|
||||||
|
(error-msg nil))
|
||||||
(dolist (line lines)
|
(dolist (line lines)
|
||||||
(cond
|
(if (equal
|
||||||
((string-prefix-p "Error: " line)
|
|
||||||
(setq error-msg line))
|
|
||||||
((equal
|
|
||||||
"Do you want to open the editor again? (y/N) "
|
"Do you want to open the editor again? (y/N) "
|
||||||
line)
|
line)
|
||||||
(if (y-or-n-p (format "%s! Reopen the editor? "
|
(if (y-or-n-p (format "%sReopen the editor? "
|
||||||
(or error-msg
|
(or error-msg
|
||||||
"Unknown error")))
|
"Unknown error")))
|
||||||
(process-send-string proc "y\n")
|
(process-send-string proc "y\n")
|
||||||
(process-send-string proc "n\n"))))))
|
(process-send-string proc "n\n"))
|
||||||
|
(setq error-msg (concat error-msg "\n" line)))))
|
||||||
(with-editor-process-filter proc str t))
|
(with-editor-process-filter proc str t))
|
||||||
|
|
||||||
(defun khard-new (abook)
|
(defun khard-new (abook)
|
||||||
|
Loading…
Reference in New Issue
Block a user