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

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

bug#52026: edebug-pop-to-buffer pops up buffer at random windows


From: Juri Linkov
Subject: bug#52026: edebug-pop-to-buffer pops up buffer at random windows
Date: Mon, 22 Nov 2021 10:10:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

tags 52026 notabug
close 52026
quit

> It's hard to edebug in a predefined window configuration
> when edebug pops up source code buffers in random windows,
> and thus continually changes the window configuration.
>
> Would it be possible to always show the debugged source files
> in the same window?

Actually, this is easy to do with a simple configuration:

#+begin_src emacs-lisp
(advice-add 'edebug-pop-to-buffer :around
            (lambda (orig-fun buffer &optional window)
              (when (string-prefix-p "edebug" (format "%s" real-this-command))
                (window--display-buffer buffer (old-selected-window) 'reuse
                                        '(nil (inhibit-same-window . nil))))
              (funcall orig-fun buffer window))
            '((name . edebug-pop-to-buffer-same-window)))
#+end_src





reply via email to

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