Last active
January 5, 2017 14:36
-
-
Save tonini/284701fbcdb79308c2c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun a-function (option callback) | |
"Open the message with key." | |
(interactive) | |
(let* ((buffer (get-buffer-create "aprocessbuffer")) | |
(command (a-build-autocomple-command option)) | |
(proc (start-process "aproccess" buffer "ls" "-l" ))) | |
(set-process-sentinel proc (lambda (process signal) | |
(cond | |
((equal signal "finished\n") | |
(let ((output (with-current-buffer (process-buffer process) | |
(buffer-substring (point-min) (point-max))))) | |
(funcall callback output) | |
)) | |
('t | |
(message "signal: %s" signal) | |
)))))) | |
(a-function "List" (lambda (e) | |
(message "SUPER %s" e) | |
)) | |
;; error in process sentinel: let: Symbol's value as variable is void: callback | |
;; error in process sentinel: Symbol's value as variable is void: callback |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment