From: Yuan Fu Date: Fri, 27 Mar 2020 08:43:49 +0000 (+0100) Subject: Add manual and NEWS entries for previous gdb-mi changes X-Git-Tag: emacs-28.0.90~7712 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ac242ed3843e127c1e2e506ecfd1a4552a2a8c44;p=emacs.git Add manual and NEWS entries for previous gdb-mi changes * etc/NEWS: Add entries for saving and restoring GDB window configurations. * doc/emacs/building.texi (GDB User Interface Layout): Add documentation for 'gdb-save-window-configuration', 'gdb-load-window-configuration', 'gdb-default-window-configuration-file', 'gdb-window-configuration-directory', 'gdb-restore-window-configuration-after-quit'. Change 'many-windows layout' to 'default layout'. --- diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 38963f225ca..8a05680c742 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -975,9 +975,27 @@ displays the following frame layout: @end group @end smallexample +@findex gdb-save-window-configuration +@findex gdb-load-window-configuration +@vindex gdb-default-window-configuration-file +@vindex gdb-window-configuration-directory + You can customize the window layout based on the one above and save +that layout to a file using @code{gdb-save-window-configuration}. +Then you can later load this layout back using +@code{gdb-load-window-configuration}. (Internally, Emacs uses the +term window configuration instead of window layout.) You can set your +custom layout as the default one used by @code{gdb-many-windows} by +customizing @code{gdb-default-window-configuration-file}. If it is +not an absolute file name, GDB looks under +@code{gdb-window-configuration-directory} for the file. +@code{gdb-window-configuration-directory} defaults to +@code{user-emacs-directory} (@pxref{Find Init}). + + @findex gdb-restore-windows @findex gdb-many-windows - If you ever change the window layout, you can restore the many-windows +@vindex gdb-restore-window-configuration-after-quit + If you ever change the window layout, you can restore the default layout by typing @kbd{M-x gdb-restore-windows}. To toggle between the many windows layout and a simple layout with just the GUD interaction buffer and a source file, type @kbd{M-x gdb-many-windows}. @@ -988,7 +1006,13 @@ interaction buffer and a source file, type @kbd{M-x gdb-many-windows}. of windows on your original frame will not be affected. A separate frame for GDB sessions can come in especially handy if you work on a text-mode terminal, where the screen estate for windows could be at a -premium. +premium. If you choose to start GDB in the same frame, consider +setting @code{gdb-restore-window-configuration-after-quit} to a +non-@code{nil} value. Your original layout will then be restored +after GDB quits. Use @code{t} to always restore; use +@code{if-gdb-many-windows} to restore only when +@code{gdb-many-windows} is non-@code{nil}; use @code{if-gdb-show-main} +to restore only when @code{gdb-show-main} is non-@code{nil}. You may also specify additional GDB-related buffers to display, either in the same frame or a different one. Select the buffers you diff --git a/etc/NEWS b/etc/NEWS index a2cb4b094e8..aafb2081806 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -190,6 +190,23 @@ 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. These +commands can also be accessed through the menu bar under Gud -- +GDB-Windows. 'gdb-default-window-configuration-file', when non-nil, +is loaded when GDB starts up. + ++++ +*** gdb-mi can now restore window configuration after quit. +Set 'gdb-restore-window-configuration-after-quit' to non-nil and Emacs +will remember the window configuration before GDB started and restore +it after GDB quits. A toggle button is also provided under Gud -- +GDB-Windows. + ** Gravatar ---