I want to hook into man
output (from man.el
) but the commands run asynchronously. Does anyone know how to set a process sentinel for the man
command, or an alternative to hook the function?
For example, how can I replace the sit-for
in the following snippet with a callback to run when man
finishes its processing?
(defun get-some-help (cmd &optional num)
(let ((buf (man (concat (number-to-string (or num 3)) " " cmd))))
(sit-for 0.1) ;how to replace this?
(unless (buffer-live-p buf)
(message "Do something else instead"))))
(get-some-help "wait4")