From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14062 invoked by alias); 25 Sep 2006 20:05:39 -0000 Received: (qmail 14052 invoked by uid 22791); 25 Sep 2006 20:05:39 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 25 Sep 2006 20:05:37 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GRwhq-0004uK-W0; Mon, 25 Sep 2006 16:05:35 -0400 Date: Mon, 25 Sep 2006 20:05:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Never silently discard internal errors Message-ID: <20060925200534.GB18759@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sourceware.org References: <20060925184223.GA15314@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00179.txt.bz2 On Mon, Sep 25, 2006 at 10:43:20PM +0300, Eli Zaretskii wrote: > > +/* Return whether query will not display anything. If it won't, the > > + caller may want to display an informative message that would otherwise > > + have been part of the query prompt. Also used to implement query > > + and defaulted_query, to assure they stay consistent. */ > > + > > +static int > > +query_is_silent (void) > > +{ > > + /* We will automatically answer the query if input is not from the > > + user directly (e.g. from a script file or a pipe), or if the user > > + did not want prompts. */ > > + if (!input_from_terminal_p () || !caution) > > + return 1; > > + > > + return 0; > > +} > > Can we do a bit better here? For example, if we are running under > Emacs, we could actually prompt, even though it's a pipe, right? >From my original message: > to be a pipe, which is not a terminal. Accordingly query is suppressed. > Whether this is right everywhere or not is a question for another day, I don't think we could start prompting on pipes; I'm sure it would break some things, probably including the emacs mode in question. -- Daniel Jacobowitz CodeSourcery