From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: Is there a way to inhibit message3 from Elisp? Date: Tue, 21 Apr 2015 20:50:59 +0200 Message-ID: <87a8y1l3ho.fsf@gmail.com> References: <87618psiu4.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429642616 9636 80.91.229.3 (21 Apr 2015 18:56:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2015 18:56:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 21 20:56:51 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YkdLm-0005um-IY for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2015 20:56:50 +0200 Original-Received: from localhost ([::1]:59993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkdLl-0002pm-T7 for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2015 14:56:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkdLh-0002oj-T9 for emacs-devel@gnu.org; Tue, 21 Apr 2015 14:56:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkdLd-0005SD-Re for emacs-devel@gnu.org; Tue, 21 Apr 2015 14:56:45 -0400 Original-Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:34395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkdLd-0005RU-IH for emacs-devel@gnu.org; Tue, 21 Apr 2015 14:56:41 -0400 Original-Received: by wgso17 with SMTP id o17so223833234wgs.1 for ; Tue, 21 Apr 2015 11:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=gy08q+kbra6zIe9v7w15ZkoDKYbIP2V2byHUk4Bj73g=; b=kC6kWVp6GWcBykbX66Wem08/Plcp82/lTFjcbCYp08V5tr+W+Ov6+mYZNLizOthkgn y+eXyokqxMZ3tmXgjsU3Enp3bgs0HESNqgv8V9QzhHol8Qx5uorvfUydnyk1zWV0F9C/ 9MIwrtPVa0wrODYOKsZZfrDCL90sUKWgqVeYbn4xVp6ptgTS2AEsXWStP8wvZkjflKUJ wDgxZ21oiikP1pZwG+nlX+uVQOeXHAxB9U3HoJtCfhqCWiTlwcp8Lth/XwXYNZsTvnS9 TFzc4SkYwQAgPfaagsVV2S2f2ahHQmf7yAwmF0k1nS20IB057B96O3JU6C1MlmfsSVck v+4Q== X-Received: by 10.180.7.234 with SMTP id m10mr37310379wia.93.1429642597802; Tue, 21 Apr 2015 11:56:37 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id cs4sm3830010wjb.31.2015.04.21.11.56.37 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Apr 2015 11:56:37 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 21 Apr 2015 13:17:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185756 Archived-At: Stefan Monnier writes: >> My particular use-case is that I'm doing completion in the minibuffer >> with ivy.el, calling `shell-command-to-string' in the `post-command-hook'. >> And when I enable `while-no-input' in my function, my minibuffer >> contents get rudely interrupted by `call_process_cleanup' saying: >>> "Waiting for process to die...done" >> I'm sure that this message is needed and appericated, > > Actually, I'm not. IIUC this message appears if a call-process is > interrupted before the subprocess dies. I think this message in not > desired in general. It's OK to emit such a message if call-process ends > up waiting a non-negligible amount of time for the subprocess to die > (so as to explain to the user why Emacs is not responding), but for the > usual case where wait_for_termination returns quickly, we should not > emit any message at all. > > Patch welcome to fix this problem. Please check the scratch/inhibit-message3 branch. I don't have experience with Emacs C code, let me know if I'm doing something in a silly way. I got this code to work as I expect: (progn (setq inhibit-message t) (message "foo") (setq inhibit-message nil)) However, this doesn't work: (let ((inhibit-message t)) (message "foo")) And I don't know why. Oleh