From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51263: 29.0.50; [PATCH] Use run-at-time to read a password in comint Date: Mon, 18 Oct 2021 15:25:54 +0200 Message-ID: <87k0iaihwd.fsf@gnus.org> References: <87k0ia4kfg.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31624"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51263@debbugs.gnu.org To: miha@kamnitnik.top Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 18 15:44:50 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mcSwb-00080K-Uc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Oct 2021 15:44:50 +0200 Original-Received: from localhost ([::1]:46640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcSwa-0005sy-26 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Oct 2021 09:44:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcSfO-0003t8-JG for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 09:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcSfO-0006wO-AH for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 09:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcSfO-0006qU-7P for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2021 09:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Oct 2021 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51263 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51263-submit@debbugs.gnu.org id=B51263.163456356626232 (code B ref 51263); Mon, 18 Oct 2021 13:27:02 +0000 Original-Received: (at 51263) by debbugs.gnu.org; 18 Oct 2021 13:26:06 +0000 Original-Received: from localhost ([127.0.0.1]:46269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcSeU-0006p2-FA for submit@debbugs.gnu.org; Mon, 18 Oct 2021 09:26:06 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:51894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcSeS-0006of-HI for 51263@debbugs.gnu.org; Mon, 18 Oct 2021 09:26:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=i30bBZFYbjRm95WXOizhQBq1ATVDjsCbfuzSv4G+CMI=; b=S3ETC9eeLzhp43cHl+G/tsaHrx aIUT8RcAKrGYO7xKYTOunCHo9FCTmWrTTaPphQEzo3kxhzwA4wQ7eh5iT3MUzk1tOujVG5txHgclH KqEBgKh6I0GVZME8o/4VSTDaJje2CZUpXUT7qk0D1xusF6LIw0s/IDVAl65Kp0IDoS90=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcSeJ-0002zB-9V; Mon, 18 Oct 2021 15:25:57 +0200 X-Now-Playing: Deru's _Pushing Air_: "Flux of Humor" In-Reply-To: <87k0ia4kfg.fsf@miha-pc> (miha@kamnitnik.top's message of "Mon, 18 Oct 2021 13:54:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217489 Archived-At: miha@kamnitnik.top writes: > I've come up with a solution: using (run-at-time 0 ...), we can prompt > for a password after the filter function finishes execution. The > attached patch implements this for comint, eshell and term.el. Seems to work very nicely -- I tried mixing some async output while prompting for a "su" password, and I couldn't see any glitches, so I've pushed your patch to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no