help-gnu-emacs
[Top][All Lists]
Advanced

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

[QUESTION] How to use :filter in `make-process'?


From: stardiviner
Subject: [QUESTION] How to use :filter in `make-process'?
Date: Tue, 03 Mar 2020 15:49:52 +0800
User-agent: mu4e 1.3.8; emacs 27.0.50

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


I have an code example try to use :filter handler of make-process.

```
(let ((op-fn (lambda () (message "call the fn"))))
  (make-process
   :name "sleep command test"
   :command (list "sleep" "3")
   :filter `(lambda (proc event)
              (message "event catched!")
              (funcall ,op-fn))
   :buffer "*sleep test*"))
```

I don't know how to use it correctly. Can you give some good examples of using
this `:filter' handler, and explain it a little? 

Thanks in advanced.

- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5eDCEUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOYiQgAvbGnIiyR+SMjgf9Cr6ZQ5jSRcbwo
cPDl8tsWSAZkv8sYCbdlPWsLSAGg8pipTP/jSsB2wSF2xALAkxntNGSLwfryQcO4
nmKsDuPE6W2VewB6D7WrAmMjNUrQi0b27Frev017wYIWnWE1nK6cSpzh69/V/rOE
ACl+ReskQcv5lAhtHgBQXVmmqGvbrq0fbeZyqjIpw0MPACuRFjG03S+zPXIiE/Rn
tKtIvnniMutz8qxx37soV5VpcBazG5rrSc3pFGTTMb/dreiqz7Bmxh/xlVJXgCec
2GYz1H1TxHuHD5MZLvzgOIkuiFVH71x4KcilEA/j+4ZsVacaVgCPBGPgNA==
=R9s9
-----END PGP SIGNATURE-----



reply via email to

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