emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 4a44c9e 018/184: counsel.el (counsel--async-last-error-str


From: Oleh Krehel
Subject: [elpa] master 4a44c9e 018/184: counsel.el (counsel--async-last-error-string): Add for ease of debugging
Date: Wed, 16 Oct 2019 13:14:41 -0400 (EDT)

branch: master
commit 4a44c9e9077dfa96f9ab30fc002361e530e99f41
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel--async-last-error-string): Add for ease of debugging
    
    Re #2160
---
 counsel.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/counsel.el b/counsel.el
index 272a607..9221b76 100644
--- a/counsel.el
+++ b/counsel.el
@@ -162,6 +162,9 @@ The time is measured in seconds.")
 This plist maps commands to a plist mapping their exit codes to
 descriptions.")
 
+(defvar counsel--async-last-error-string nil
+  "When the process returned non-0, store the output here.")
+
 (defun counsel-set-async-exit-code (cmd number str)
   "For CMD, associate NUMBER exit code with STR."
   (let ((plist (plist-get counsel--async-exit-code-plist cmd)))
@@ -243,6 +246,8 @@ respectively."
           (if ivy--all-candidates
               (ivy--exhibit)
             (ivy--insert-minibuffer "")))
+      (setq counsel--async-last-error-string
+            (with-current-buffer (process-buffer process) (buffer-string)))
       (setq ivy--all-candidates
             (let ((status (process-exit-status process))
                   (plist (plist-get counsel--async-exit-code-plist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]