From: stardiviner <numbchild@gmail.com>
To: Emacs Help <help-gnu-emacs@gnu.org>
Subject: [QUESTION] How to use :filter in `make-process'?
Date: Tue, 03 Mar 2020 15:49:52 +0800 [thread overview]
Message-ID: <87r1y97u8v.fsf@gmail.com> (raw)
-----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-----
next reply other threads:[~2020-03-03 7:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 7:49 stardiviner [this message]
2020-03-03 8:19 ` [QUESTION] How to use :filter in `make-process'? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1y97u8v.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).