GNU bug report logs - #39181
27.0.50; [PATCH] Allow users to store & restore gdb-mi layout

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Sat, 18 Jan 2020 20:58:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #119 received at 39181 <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 39181 <at> debbugs.gnu.org
Subject: Re: bug#39181: 27.0.50; [PATCH] Allow users to store & restore
 gdb-mi layout
Date: Fri, 20 Mar 2020 21:58:34 +0100
On Fri, 20 Mar 2020 16:03:45 -0400
Yuan Fu wrote:

> Here it is.

Thank you! A few comments:

> diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
> index 38963f225c..130abc41e8 100644
> --- a/doc/emacs/building.texi
> +++ b/doc/emacs/building.texi
> @@ -568,7 +568,7 @@ Starting GUD
>  
>  @item M-x gud-gdb
>  @findex gud-gdb
> -Run GDB, using a GUD interaction buffer for input and output to the
> +Run GDB, using a GUD action buffer for input and output to the
                        ^^^^^^
Is there really any reason for this change? If the buffer is "for
input and output", isn't "interaction" more fitting than "action"?

[...]

> +  You can customize the window layout bese on the one above, and save
                                         ^^^^
"based"?

> +the custom layout to a file by @code{gdb-save-window-configuration}.
                               ^^
I think "using" would be better here.

> +Then you can later load this layout back by
                                            ^^
same here

> +@code{gdb-load-window-configuration}.  (Simply put, window

[...]

> +@code{gdb-default-window-configuration-file}.  If it is not an
> +absolute path, GDB looks under
> +@code{gdb-window-configuration-directory} (default to
> +@file{~/.emacs.d}) for the file.

"(which defaults to user-emacs-directory)" (ideally with a proper
reference to that variable).

[...]

> +premium.  If you choose to start GDB in the same frame, consider
> +setting @code{gdb-restore-window-configuration-after-quit} to
> +non-@code{nil}.  Then GDB restores your original window layout after

"to a non-nil value.  Your original window layout will then be restored
after GDB quits."

> +it quits.  Set to @code{t} to always restore; set to
              ^^^^^^
"Set it to" or "Use", similarly for the following ones.

> +@code{if-gdb-many-windows} to restore only when
> +@code{gdb-many-windows} is @code{t}; set to @code{if-gdb-show-main} to
> +restore only when @code{gdb-show-main} is @code{t}.

IIUC, these two `t's for gdb-show-main and gdb-many-windows should
really be "non-nil"s, i.e., there is no special treatment of the symbol
`t' as opposed to generalized boolean.

> diff --git a/etc/NEWS b/etc/NEWS
> index 87e634f2c1..692ecf7f0a 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -174,6 +174,22 @@ key             binding
>  / v             package-menu-filter-by-version
>  / /             package-menu-filter-clear
>  
> +** gdb-mi
> +
> +*** gdb-mi can now store and restore window configurations.
> +Use 'gdb-save-window-configuration' to save window configuration to a
> +file, and 'gdb-load-window-configuration' to load from a file.  They
                                                                   ^^^^
"These commands"?

> +can also be accessed through menu bar under Gud -- GDB-Windows.

[...]

> +*** gdb-mi can now restore window configuration after finished.
                                                   ^^^^^^^^^^^^^^
"when finished" or "after quit"

> +Set 'gdb-restore-window-configuration-after-quit' to non-nil and GDB
                                                                    ^^^
Better say "Emacs": at that point GDB is gone. :-)

-- 
Štěpán




This bug report was last modified 5 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.