From: Oleh Krehel <ohwoeowho@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: thibaut.verron@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: Use of dedicated windows in gdb-mi.el
Date: Mon, 09 Feb 2015 21:46:33 +0100 [thread overview]
Message-ID: <87mw4mak46.fsf@gmail.com> (raw)
In-Reply-To: <83pp9i95mt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 09 Feb 2015 22:44:42 +0200")
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Oleh Krehel <ohwoeowho@gmail.com>
>> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gdb-mi.el-gdb-display-io-nopopup-New-defcustom.patch --]
[-- Type: text/x-diff, Size: 1497 bytes --]
From b77380d3690fcc1ac032227df29734648874d48c Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho@gmail.com>
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
next prev parent reply other threads:[~2015-02-09 20:46 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 18:02 Use of dedicated windows in gdb-mi.el Oleh Krehel
2015-02-06 19:07 ` Eli Zaretskii
2015-02-06 19:14 ` Oleh Krehel
2015-02-06 21:33 ` Eli Zaretskii
2015-02-09 9:19 ` Thibaut Verron
2015-02-09 14:29 ` Stefan Monnier
2015-02-09 14:50 ` Oleh Krehel
2015-02-09 15:51 ` Eli Zaretskii
2015-02-09 18:42 ` martin rudalics
2015-02-09 15:44 ` Eli Zaretskii
2015-02-09 15:57 ` Oleh Krehel
2015-02-09 17:05 ` Eli Zaretskii
2015-02-09 17:22 ` Oleh Krehel
2015-02-09 17:56 ` Eli Zaretskii
2015-02-09 18:11 ` Oleh Krehel
2015-02-09 18:26 ` Drew Adams
2015-02-09 18:39 ` Oleh Krehel
2015-02-09 18:56 ` Eli Zaretskii
2015-02-09 19:48 ` Oleh Krehel
2015-02-09 20:00 ` Eli Zaretskii
2015-02-09 19:44 ` Drew Adams
2015-02-09 19:50 ` Oleh Krehel
2015-02-09 20:01 ` Eli Zaretskii
2015-02-09 20:09 ` Oleh Krehel
2015-02-09 20:27 ` Eli Zaretskii
2015-02-09 20:33 ` Oleh Krehel
2015-02-09 20:44 ` Eli Zaretskii
2015-02-09 20:46 ` Oleh Krehel [this message]
2015-02-10 15:42 ` Eli Zaretskii
2015-02-10 2:20 ` Stefan Monnier
2015-02-10 3:48 ` Eli Zaretskii
2015-02-10 6:39 ` Oleh Krehel
2015-02-10 15:54 ` Eli Zaretskii
2015-02-09 18:52 ` Eli Zaretskii
2015-02-09 18:53 ` Oleh Krehel
2015-02-09 18:58 ` Oleh Krehel
2015-02-09 19:20 ` Eli Zaretskii
2015-02-09 19:47 ` Oleh Krehel
[not found] ` <<8761bb9cq8.fsf@gmail.com>
[not found] ` <<83zj8m9atc.fsf@gnu.org>
2015-02-09 20:42 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2015-02-24 17:56 Glenn Brown
2015-02-24 18:02 ` Oleh Krehel
2015-02-24 18:31 ` Eli Zaretskii
2015-02-24 22:23 ` Paul Eggert
2015-02-25 3:46 ` Eli Zaretskii
2015-02-25 3:57 ` Stefan Monnier
2015-02-25 6:09 ` Glenn Brown
2015-02-10 0:49 Barry OReilly
2015-02-10 16:05 ` Eli Zaretskii
[not found] <<87h9uynckc.fsf@gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw4mak46.fsf@gmail.com \
--to=ohwoeowho@gmail.com \
--cc=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=thibaut.verron@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).