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: Use of dedicated windows in gdb-mi.el Date: Mon, 09 Feb 2015 21:46:33 +0100 Message-ID: <87mw4mak46.fsf@gmail.com> References: <87h9uynckc.fsf@gmail.com> <83iofedfkz.fsf@gnu.org> <877fvun97j.fsf@gmail.com> <83fvaid8sa.fsf@gnu.org> <83fvaf9jj2.fsf@gnu.org> <878ug7axhr.fsf@gmail.com> <837fvr9frq.fsf@gnu.org> <87sief9ezy.fsf@gmail.com> <831tlz9deh.fsf@gnu.org> <8761bb9cq8.fsf@gmail.com> <048211e0-0bf4-4c69-8908-aae20a2e58fb@default> <877fvraq0n.fsf@gmail.com> <013f998a-bd26-4938-9112-30a2e95e8dc4@default> <877fvqc1ar.fsf@gmail.com> <83siee97mv.fsf@gnu.org> <87zj8maltt.fsf@gmail.com> <83r3ty96f0.fsf@gnu.org> <87twyuakpr.fsf@gmail.com> <83pp9i95mt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1423515042 8962 80.91.229.3 (9 Feb 2015 20:50:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 20:50:42 +0000 (UTC) Cc: thibaut.verron@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 21:50:41 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 1YKvI1-0000y0-8N for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 21:50:41 +0100 Original-Received: from localhost ([::1]:35136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKvI0-0007jH-IS for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 15:50:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKvHs-0007ix-90 for emacs-devel@gnu.org; Mon, 09 Feb 2015 15:50:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKvHo-0005ZF-JU for emacs-devel@gnu.org; Mon, 09 Feb 2015 15:50:32 -0500 Original-Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:61322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKvHo-0005Z2-Bz; Mon, 09 Feb 2015 15:50:28 -0500 Original-Received: by mail-wi0-f171.google.com with SMTP id l15so20779136wiw.4; Mon, 09 Feb 2015 12:50:27 -0800 (PST) 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=Pn9wr8ZX63YgDyz/e/haMHsYaZcnLXkUXG+jh7NxeJE=; b=oeVk5QNgKC4I19GmmmOn3GkpHxHZChzgY/yp7kJ2Yf3X+Q0RieCuApviA0HIm1Jvoa MGlQEauYt3OcK3dXBt+BsiJ0CPDuvIW3dydLlgWGevsGAizLy5DZkJ/nkM3JhARX0xxv Ii7LMkulYwtvJ9+TRiDtL0j5mRh2S+WtH8shI/om7pQE8FdXhRY6U366089FMKvVj123 XCNWblsi8G62JoGqIoSIbeGNkgwqNXvJF+0xvOv+4urO1xeg2PQtkRLcp6g5hWjn3F6H b3uVOWWePPui1fIYksGVMKRhwWlwY2FLzGSjWB3uTNpq7UqjA7x2zTlIxDhZ3ntltTD/ PfWg== X-Received: by 10.194.88.131 with SMTP id bg3mr20207941wjb.119.1423515026699; Mon, 09 Feb 2015 12:50:26 -0800 (PST) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id hr1sm15960585wib.1.2015.02.09.12.50.26 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Feb 2015 12:50:26 -0800 (PST) In-Reply-To: <83pp9i95mt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 09 Feb 2015 22:44:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22b 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:182747 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Oleh Krehel >> Date: Mon, 09 Feb 2015 21:33:36 +0100 >> Cc: thibaut.verron@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org >> >> > AFAICS, it's a simple matter of adding a defcustom to be tested in >> > gdb-display-io-buffer, causing the latter do nothing if the user says >> > so. >> >> Just instrumented `gdb-display-io-buffer', it's not the function that >> makes the *output* buffer pop up when there's new output. > > Perhaps gdb-inferior-filter, then? That's it. Here's the patch. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gdb-mi.el-gdb-display-io-nopopup-New-defcustom.patch >From b77380d3690fcc1ac032227df29734648874d48c Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 9 Feb 2015 21:43:37 +0100 Subject: [PATCH] gdb-mi.el (gdb-display-io-nopopup): New defcustom * lisp/progmodes/gdb-mi.el (gdb-inferior-filter): When `gdb-display-io-nopopup' is t, and the output buffer is already buried, don't pop it up. --- lisp/progmodes/gdb-mi.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 27846ed..2233caa 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1629,9 +1629,19 @@ this trigger is subscribed to `gdb-buf-publisher' and called with :syntax-table nil :abbrev-table nil (make-comint-in-buffer "gdb-inferior" (current-buffer) nil)) +(defcustom gdb-display-io-nopopup nil + "When t, and the `gdb-inferior-io' buffer is buried, don't pop it up." + :type 'boolean + :group 'gdb + :version "25.1") + (defun gdb-inferior-filter (proc string) (unless (string-equal string "") - (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) + (let (buf) + (unless (and (setq buf (gdb-get-buffer 'gdb-inferior-io)) + (null (get-buffer-window buf)) + gdb-display-io-nopopup) + (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))))) (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) (comint-output-filter proc string))) -- 1.8.4 --=-=-=--