GNU bug report logs - #40268
27.0.60; [PATCH] Unify and improve gdb-mi source window display

Previous Next

Package: emacs;

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

Date: Sat, 28 Mar 2020 04:04:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.60

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Yuan Fu <casouri <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 40268 <at> debbugs.gnu.org
Subject: bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window display
Date: Sat, 4 Apr 2020 16:29:31 -0400
[Message part 1 (text/plain, inline)]

> On Mar 31, 2020, at 5:15 AM, martin rudalics <rudalics <at> gmx.at> wrote:
> 
> > This one should be ok.
> 
> Thanks.  A few remarks.  Please try to ident as
> 
>        (setq gdb-source-window-list
>              (cl-remove-duplicates
>               (cl-remove-if-not
> 		(lambda (win)
> 		  (and (window-live-p win)
>                       (equal (window-frame win)
>                              (selected-frame))))
>                gdb-source-window-list)
>               :test #'equal))
> 
> so we can safely change this later and easily stay within our line
> length limits.  Also, tests like
> 
>                       (equal (window-frame win)
>                              (selected-frame))))
> 
> should use "eq" instead of "equal" and ones like
> 
>                     ((member (selected-window) gdb-source-window-list) 'source)))
> 
> "memq" instead of "member".
> 
> Similarly to the above, writing
> 
> 	 (window
> 	  (when buffer
> 	    (if (eq gud-minor-mode 'gdbmi)
>                (gdb-display-source-buffer buffer)
>              ;; Gud still has the old behavior.
>              (or (get-buffer-window buffer)
>                  (display-buffer buffer '(nil (inhibit-same-window . t)))))))
> 
> permits us to stay within the 80 columns limit.
> 
> Finally, instead of "Also, we simply the logic ..." I'd write "Also,
> simplify the logic ...".  And please provide a NEWS entry.
> 
> Thanks again for the work, Martin

Thanks for reviewing. Besides the changes you requested, I changed the last condition in the cond form in `gdb-save-window-configuration’ to a catch-all condition (to avoid weird problem when loading it back).

Yuan

[source-window.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]



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

Previous Next


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