bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39179: 27.0.50; [PATCH] Add filter to gdb-mi register buffer


From: Eli Zaretskii
Subject: bug#39179: 27.0.50; [PATCH] Add filter to gdb-mi register buffer
Date: Fri, 31 Jan 2020 11:56:25 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 18 Jan 2020 15:51:31 -0500
> 
> On startup, there will be a button “[filter off]” on the header line
> of the register buffer. Clicking on it enables the register filter,
> changes the button to “[filter on]” and adds a “[-|+]” button next to
> it. Click “+” to add patterns to the pattern list, click “-” to
> remove. Register whose name matches any pattern in the list is
> displayed. You can also use key “f” for toggle, “+” to add pattern,
> “-” to remove pattern.

I'm not sure it's a good idea to implement this as a button on the
header-line.  Such buttons are for frequent operations, and also have
the disadvantage of being unavailable on TTY frames.  What are the
chances users will need to redefine the register patters frequently
enough to justify the button?  Wouldn't it be much easier to have a
defcustom whose value users could interactively modify as needed?

And please don't use non-ASCII characters in log messages, as these
could cause trouble reading the Git log on less capable terminals.

> * lisp/progmodes/gdb-mi.el (gdb-registers-enable-filter,
> gdb-registers-filter-pattern-list, gdb-header-click-event-handler,
> gdb-registers-add-to-display, gdb-registers-remove-from-display,
> gdb-registers-toggle-filter): new
                                ^^^
"New functions."

> (gdb-registers-handler-custom): condition check before adding each
> register
> (gdb-registers-mode-map): add new keys
> (gdb-registers-header): add new buttons

Please start description of changes with a capitalized word, and end
with a period -- these should be complete English sentences.

> +;; automatically local because we don't want filters persist across gdb 
> sessions

Likewise in comments: complete sentences (here and elsewhere in the
patch).

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]