all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [QUESTION] How to use :filter in `make-process'?
@ 2020-03-03  7:49 stardiviner
  2020-03-03  8:19 ` Joost Kremers
  2020-03-03 14:39 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: stardiviner @ 2020-03-03  7:49 UTC (permalink / raw)
  To: Emacs Help

-----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-----



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-03 17:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-03  7:49 [QUESTION] How to use :filter in `make-process'? stardiviner
2020-03-03  8:19 ` Joost Kremers
2020-03-03 16:18   ` [SOLVED] " stardiviner
2020-03-03 16:51     ` Stefan Monnier
2020-03-03 17:33       ` stardiviner
2020-03-03 14:39 ` Stefan Monnier
2020-03-03 15:08   ` stardiviner
2020-03-03 15:25     ` Michael Heerdegen
2020-03-03 17:34       ` stardiviner
2020-03-03 16:49     ` Stefan Monnier
2020-03-03 17:35       ` stardiviner

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.