From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: "Asynchronous Requests from Emacs Dynamic Modules" Date: Fri, 20 Nov 2020 17:04:41 +0100 Message-ID: <87k0ugko9y.fsf@gmail.com> References: <86imarfldb.fsf@akirakyle.com> <47fe3996.8d32.175e65d7ede.Coremail.all_but_last@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philipp Stephani , Stefan Monnier , Akira Kyle , Emacs developers To: "Zhu Zihao" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 20 17:08:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg8x7-0003zA-Pt for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Nov 2020 17:08:01 +0100 Original-Received: from localhost ([::1]:42020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kg8x6-0005Ms-Hb for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Nov 2020 11:08:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kg8u2-0000lS-N6 for emacs-devel@gnu.org; Fri, 20 Nov 2020 11:04:50 -0500 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:55674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kg8tz-0001ro-NH for emacs-devel@gnu.org; Fri, 20 Nov 2020 11:04:50 -0500 Original-Received: by mail-wm1-x334.google.com with SMTP id c9so10822265wml.5 for ; Fri, 20 Nov 2020 08:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=VK1rPsMYEEYFz0rzjRF0fYNEhOU07e1KOkTP+3A1/2g=; b=fYyT+qYJ4Is9jv8GS+l+4WNIkHWsX3OAfLtjMwRJwEDC1uvLLnAed1ziy7HZDNen28 Gh7KSndc/YLcUS0s2/ioWzn4WiRftNsnRJ6Xbs18BRBeVZunyeo/uNuLOIpeM9SVmO/5 JfOyBh+QVyJEdMqmqIC6ZjCteXEy8idsNKjvJxvLGcQFCg79csTR2oG9gf2oRrDBNs1c vGV9PXDw9lDm4Oj5FXaLvDlUXPYpDg1qDloSECdIfwcLDlijNuRettuGQfu9jLYt+l0H RzelqWspBkpmlYgWsOQgYV8ErMVA/NGctVa62ELkoh+uhRxMHsFqqiW3DQDaZl2IcynE /QsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=VK1rPsMYEEYFz0rzjRF0fYNEhOU07e1KOkTP+3A1/2g=; b=ZdpH8OWhVnPrf+j1cM2m02hzqF9ouUSJBQbVCzPJhZhKTAWFSuRo3BKple6YeTtsjD zMBvakfj/kpV/nHx3tsiJ4hHd4r7R7EPgt6fGU+KSfk/x8Flz2D0KT3gOBnBUBK7FN6+ ZmHeqfq882OXrb6CsnPcDN+FjtX/WICaDkc6tqz3xGzFeWwrS59eXvAh9+IiWSBrQ108 QMdpbO0TtATSxbeufu0YYokVjkY8RxWHmyRUWbQqOJwQn9oFhTrM3hb864kQyLfJ2db8 OMeIv/W3xBC0xxCKoi8/ROXi4zEcFXwPDNfBTN/qJYU8RztEHCl0un/Jk9JUZvNnlPJ9 RFnQ== X-Gm-Message-State: AOAM53344H8qDcVRAD+hc1Se1l1uEqX54IhYoEA12QTe3ER3NNhsOzWr uqW3vna6o5icbSNa6IUsAnkgcrHKdwU= X-Google-Smtp-Source: ABdhPJy1f5FrNGjQuB6jILovHo0UeyqZCB656QNF5OQNhfxYQUWGQrkZl3yMjF8IlIl2BfIl5P38Lw== X-Received: by 2002:a1c:c2c6:: with SMTP id s189mr10658827wmf.101.1605888284086; Fri, 20 Nov 2020 08:04:44 -0800 (PST) Original-Received: from rltb ([2a01:e34:ecfc:a860:3c86:247b:6627:e6bd]) by smtp.gmail.com with ESMTPSA id 89sm5803543wrp.58.2020.11.20.08.04.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 08:04:43 -0800 (PST) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <47fe3996.8d32.175e65d7ede.Coremail.all_but_last@163.com> (Zhu Zihao's message of "Fri, 20 Nov 2020 23:54:48 +0800 (CST)") Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=rpluim@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259499 Archived-At: "Zhu Zihao" writes: > Ok, But how to do this in Emacs version 25-27? > > > Emacs doesn't support named pipe access, but may be we can use `make-netw= ork-process` to open a TCP socket. Like this? > > > ``` > (let ((proc (make-network-process :name "fake-proxy-process" > :server t > :host 'local > :filter > :noquery t > ;; Detect port automatically > :service t))) > (setq proc) > (module-function-initialize-notify (process-contact proc :service))) > ``` > > > But this maybe too strange for user to understand why a dynamic module re= quire a TCP port access... It doesn=CA=BCt: you can use unix sockets by specifying :family 'local Robert