From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Is there a way to inhibit message3 from Elisp? Date: Wed, 22 Apr 2015 00:25:09 +0100 Message-ID: References: <87618psiu4.fsf@gmail.com> <87a8y1l3ho.fsf@gmail.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429658729 10210 80.91.229.3 (21 Apr 2015 23:25:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2015 23:25:29 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 22 01:25:28 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 1YkhXj-0002sX-1U for ged-emacs-devel@m.gmane.org; Wed, 22 Apr 2015 01:25:27 +0200 Original-Received: from localhost ([::1]:60770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkhXh-00069l-Rd for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2015 19:25:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkhXU-00069e-FY for emacs-devel@gnu.org; Tue, 21 Apr 2015 19:25:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkhXT-0001HL-D5 for emacs-devel@gnu.org; Tue, 21 Apr 2015 19:25:12 -0400 Original-Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:33617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkhXT-0001HD-3H for emacs-devel@gnu.org; Tue, 21 Apr 2015 19:25:11 -0400 Original-Received: by layy10 with SMTP id y10so162496249lay.0 for ; Tue, 21 Apr 2015 16:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=mJ2P4HuZfBQuHBIMeYbN0llf1QIk/Npe/xskmk1erX8=; b=mKvZ77Lt54QWvDbKUF+WhJ0uPkHbJZV1OFQCfng9SSW0hDuuHKCfDQcSiBedaJLHOr wWVUreJXhBETVBgQHXXZqIe5z3SwoRGPe5BNPh4PFhof0u3hmIrq8Brkt6bEpJmqGWFd EpllwT4jsXe2EwE9WVrpJ6cRYoI2Ta/d25rEfBrmQ7CBEhcswGJN/OxEHXeiNfFR+95E DK2kBvug2jBTH0ckoPz0Dxaht4edtIGwpEBwjUipU1BxN3eXLOwx5ge0MYYFcqyszgTD pVRU6aF6UFdrzi3Xj3XjEn4nrw8cWPCnah+fSko65+qZqqxpjzEWP6t6omo7o86PS+0I fPaQ== X-Received: by 10.112.200.230 with SMTP id jv6mr22277583lbc.21.1429658709257; Tue, 21 Apr 2015 16:25:09 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Tue, 21 Apr 2015 16:25:09 -0700 (PDT) In-Reply-To: <87a8y1l3ho.fsf@gmail.com> X-Google-Sender-Auth: up9mqot6ZW4ZNSnIr_k_ohmS0iA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c 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:185764 Archived-At: That C code is a little hard for me to understand, but it looks like you're inhibitting both echoing (minibuffer) and logging (messages buffer). If that's the case, please don't inhibit the latter. 2015-04-21 19:50 GMT+01:00 Oleh Krehel : > 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 >