unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: Window/buffer management in gdb-ui
Date: Thu, 25 Nov 2004 09:09:31 +1300	[thread overview]
Message-ID: <16804.60027.817610.776972@farnswood.snap.net.nz> (raw)
In-Reply-To: <jwvy8grcnbt.fsf-monnier+emacs@gnu.org>


 > The window-/buffer management in gdb-ui is not working well in my setup.
 > And the code in gdb-ui looks pretty frightening.  E.g. things like:
 > 
 >    (defun dedicated-switch-to-buffer (name)
 >      (set-window-dedicated-p 
 >       (get-buffer-window
 >        (switch-to-buffer name)) t))
 > 
 > make me cringe:invo
 > - messes up the namespace

I know that standard practice is to prefix such functions, in general, with
gdb but this isn't really a gdb-related function. I felt that the occasional
violation i.e one for the whole of gdb-ui.el, would not cause a problem, in
practice, and may help prevent duplication with locally defined functions
performing the same task.

 > - it changes the currently selected window and makes it dedicated
 >   (because we know that (get-buffer-window (switch-to-buffer name))
 >    is always equal to (selected-window))

Its only used when gdb-ui sets up/restores the windows.

 > I understand that maybe my setup is not representative, but maybe if you
 > could describe what behavior you're trying to get, I can help you come up
 > with a way to code it that doesn't plays nicely in my situation.
 >
 > I.e. what is the behavior you're trying to get.  You can describe it with
 > a mix of description of how *you* want it plus some examples of problematic
 > behaviors you'd like to avoid (i.e. bug-reports).

I noticed two things. Firstly, when the user displays a gdb-related buffer in
another window (M-x gdb-display-BUFFERTYPE-buffer or from the menubar,
GUD->GDB-Windows->...) it can replace an existing buffer that the user wants
to remain visible. These changes ensure that, in this case, a gdb-related
buffer is split to provide space for the new buffer. Secondly, if the user
wants to do something different in between debugging, visit info or list
buffers, for example, it is best for that buffer to appear in a separate
frame.

Its a `work in progress', I haven't thought it through yet. Since the "feature
freeze" could extend to infinity, I figured I'd have enough time to put it
right. Also, as its been quiet recently, I thought maybe everyone was using
"-fullname". I guess this is one way of finding out!

 > As for my own setup, I use 1 buffer per frame and 1 frame per buffer with
 > a separate dedicated minibuffer.  In my setup, any code that uses
 > `switch-to-buffer' is a pain in the rear.

You never have split windows? How do you arrange that? What is a "separate
dedicated minibuffer"?


  Nick

  reply	other threads:[~2004-11-24 20:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 14:59 Window/buffer management in gdb-ui Stefan Monnier
2004-11-24 20:09 ` Nick Roberts [this message]
2004-11-24 20:42   ` {Spam?} " Stefan Monnier
2004-11-25  2:30     ` Nick Roberts
2004-11-25 16:26       ` {Spam?} " Stefan
2004-11-24 21:30   ` Kai Grossjohann
2004-11-24 21:39     ` Kai Grossjohann
     [not found] ` <jwvpt23arhf.fsf-monnier+emacs@gnu.org>
2004-11-25  2:14   ` Nick Roberts
2004-11-25 16:07     ` Stefan Monnier
2004-11-25 23:59       ` Nick Roberts
2004-11-26  4:21         ` Stefan Monnier
2004-11-26 15:53           ` Nick Roberts
2004-11-26 22:46             ` {Spam?} " Stefan Monnier
2004-11-26 10:16         ` Kim F. Storm
2004-11-26 15:42           ` Nick Roberts
2004-11-26 22:43             ` Stefan Monnier

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=16804.60027.817610.776972@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@gnu.org \
    /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).