From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: emacsclient in elisp Date: Fri, 21 May 2021 09:27:14 +0300 Message-ID: References: <00ce8ae3-bb21-c58f-cd32-c196f146842b@daniel-mendler.de> <6fed43bb-d880-bcd5-6f6f-004b6182e539@daniel-mendler.de> <83pmxlo2z0.fsf@gnu.org> <922437d2-74ca-a7aa-cd1d-060f31d383e6@daniel-mendler.de> <83o8d5o0od.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="872"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) Cc: Daniel Mendler , Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 21 08:31:01 2021 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 1ljygX-000Ab0-3i for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 08:31:01 +0200 Original-Received: from localhost ([::1]:43274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljygV-0002o8-CB for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 02:30:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljyfI-000259-Ik for emacs-devel@gnu.org; Fri, 21 May 2021 02:29:44 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:60519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljyfG-0004PI-Kq; Fri, 21 May 2021 02:29:44 -0400 Original-Received: from localhost ([::ffff:102.85.29.242]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000ADF01.0000000060A75353.0000700F; Thu, 20 May 2021 23:29:38 -0700 Mail-Followup-To: Stefan Monnier , Eli Zaretskii , Daniel Mendler , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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:269529 Archived-At: * Stefan Monnier [2021-05-20 19:41]: > >> Yes, synchronously reading from stdin is supported. But it is not > >> possible to do this asynchronously, or is it? This was specifically the > >> functionality I have been looking for. > > What do you mean by that? how can Emacs read input _asynchronously_ > > when reading is inherently a synchronous operation? > > I think the problem is that in batch mode, `read-from-minibuffer` is not > only synchronous (which is fine) but it doesn't perform any async > processing, like running process filters and timers while waiting for > the input from stdin. Please send a reference how read-from-minibuffer reads standard input, as I don't get it to work. (defun tell-me () (read-from-minibuffer ""))) $ emacs -Q -l process-org.el --batch -f tell-me Debugger entered--Lisp error: (end-of-file) read-from-string("") tell-me() command-line-1(("-l" "process-org.el" "-f" "tell-me")) command-line() normal-top-level() -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/