unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Yuan Fu <casouri@gmail.com>
Cc: 39181@debbugs.gnu.org
Subject: bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout
Date: Thu, 5 Mar 2020 10:14:46 +0100	[thread overview]
Message-ID: <5c8d9f6a-0bc5-b2ff-1513-4b8631fee1a3@gmx.at> (raw)
In-Reply-To: <90254CFF-2FFD-4D54-8467-717FF10166A2@gmail.com>

 > Here is the patch.

Thanks. It gets me here the following warnings when building on master
(sorry, I'm a complete ignorant of the 'cl-' snafu):

   ELC      progmodes/gdb-mi.elc

In toplevel form:
../../lisp/progmodes/gdb-mi.el:4738:1: Warning: Unused lexical variable
     ‘window-config’

In end of data:
../../lisp/progmodes/gdb-mi.el:5069:1: Warning: the following functions might
     not be defined at runtime: cl-delete-if, cl-find-if, cl-mapcar

A few remarks:

+  "If non-nil, gdb loads this window layout file on startup.
+If not absolute, GDB will look under `gdb-window-layout-directory'."

We should settle in descriptions on whether we write gdb or GDB.  Also,
"if not absolute" is too terse IMHO.

+  (define-key menu [load-layout] '("Load window layout" "Load GDB window layout from a file" . gdb-load-window-layout))
+  (define-key menu [save-layout] '("Save window layout" "Save current GDB window layout to a file" . gdb-save-window-layout))

I think we could omit the "window" in these which should allow us to,
instead of

+    '(menu-item "Restore window layout"

say

+    '(menu-item "Restore layout after quit"

so it becomes more clear that "load" and "save" act _immediately_ on the
current state while "restore" is a more general setting that becomes
effective only when the user quits.  (Note also that in general we
cannot guarantee that menu tooltips are always shown on each and every
system where Emacs runs.)

Also, I would mention all four possible values of
'gdb-restore-window-layout-after-quit' (currently "toggle" indicates
that there are only two of them) like, for example, with the side values
for tool-bar mode.

+  "Return a buffer displaying source file or nil.
+
+The source file would be the most relevant file or the main file."

This is IMHO too terse in every respect.  Neither "source file" nor
"main file" are canonical terms in the context of GDB so we should
explain here how they are set up (what is nil in this context?).

+E.g., locals buffer, registers buffer, but don't include the main

I would say "Function buffers are locals buffers, ...".

+(defun gdb--buffer-type (buffer)
+  "Return the buffer type of BUFFER or nil.

Maybe

"Return the type of BUFFER if it is a GDB function buffer."

would be better.

Thanks for your work on this, martin






  reply	other threads:[~2020-03-05  9:14 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5e950f28.1c69fb81.61726.5731.GMR@mx.google.com>
2020-01-18 20:57 ` bug#39181: 27.0.50; [PATCH] Allow users to store & restore gdb-mi layout Yuan Fu
2020-01-31 10:13   ` Eli Zaretskii
2020-02-02 14:22     ` Yuan Fu
2020-02-07 22:28       ` Yuan Fu
2020-02-10  4:56         ` Yuan Fu
2020-02-15  8:08           ` Eli Zaretskii
2020-02-15  9:55             ` martin rudalics
2020-02-15 10:19               ` Eli Zaretskii
2020-02-15 20:37                 ` Yuan Fu
2020-02-16 10:00                   ` martin rudalics
2020-03-03 23:41                     ` Yuan Fu
2020-03-04 13:28                       ` Fu Yuan
2020-03-05  6:12                         ` Yuan Fu
2020-03-05  9:14                           ` martin rudalics [this message]
2020-03-07 18:09                             ` Yuan Fu
2020-03-07 19:07                               ` Štěpán Němec
2020-03-07 19:17                                 ` Yuan Fu
2020-03-09  9:01                                   ` martin rudalics
2020-03-09 17:59                                     ` Yuan Fu
2020-03-09 19:18                                       ` Štěpán Němec
2020-03-09 20:17                                         ` Yuan Fu
2020-03-09 20:54                                           ` Štěpán Němec
2020-03-10  8:49                                           ` martin rudalics
2020-03-10 18:05                                             ` Fu Yuan
2020-03-11  8:52                                               ` martin rudalics
2020-03-11  9:26                                                 ` Štěpán Němec
2020-03-12  8:22                                                   ` martin rudalics
2020-03-12  8:49                                                     ` Štěpán Němec
2020-03-12 19:21                                                       ` Yuan Fu
2020-03-13 20:09                                                         ` Yuan Fu
     [not found]                                                           ` <87lfo4netg.fsf@gmail.com>
2020-03-13 21:13                                                             ` Štěpán Němec
2020-03-13 21:40                                                               ` Yuan Fu
2020-03-13 22:12                                                                 ` Štěpán Němec
2020-03-15 15:55                                                                 ` martin rudalics
2020-03-16  0:13                                                                   ` Yuan Fu
2020-03-16  9:24                                                                     ` martin rudalics
2020-03-20 20:03                                                                       ` Yuan Fu
2020-03-20 20:58                                                                         ` Štěpán Němec
2020-03-21 18:00                                                                           ` Yuan Fu
2020-03-21 18:39                                                                             ` Štěpán Němec
2020-03-21 21:03                                                                               ` Yuan Fu
2020-03-21 21:49                                                                                 ` Štěpán Němec
2020-03-24 16:14                                                                                   ` Yuan Fu
2020-03-27  9:01                                                                                     ` martin rudalics
2020-03-27 16:28                                                                                       ` Yuan Fu
2020-04-14  8:05                                                                                         ` martin rudalics
2020-03-10  8:48                                       ` martin rudalics
2020-04-14  1:17   ` bug#39181: Fwd: Delivery Status Notification (Failure) Yuan Fu

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=5c8d9f6a-0bc5-b2ff-1513-4b8631fee1a3@gmx.at \
    --to=rudalics@gmx.at \
    --cc=39181@debbugs.gnu.org \
    --cc=casouri@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).