0

How can I open a debug window and select it and make it fill the whole frame?

I tried:

(let ((help-window-select t))
  (with-help-window "*Debug*"
    (dolist (item load-path) 
      (print item)))
  (delete-other-windows))

but this does not work; it seems to delete the help window itself and not the other windows.

Note:

Simply using

(with-help-window "*Debug*"
  (dolist (item load-path) 
    (print item)))

will split the frame into two windows, with the "*Debug*" buffer shown in the lower window. In addition the "*Debug*" window is not selected.

Edit:

I also tried:

(let ((buf (switch-to-buffer "*Debug*")))
  (dolist (item load-path) 
    (print item buf))
  (help-mode))

this creates the "*Debug*" buffer, but it does not select it (it stays hidden)

Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
  • You could try using [`shackle`](https://github.com/wasamasa/shackle). It has options to manage what happens when a popup window is opened. – Chakravarthy Raghunandan Nov 19 '16 at 12:55
  • @lawlist The other question seems to be about restoring the setup after quitting the help buffer. That is of course great to have. But I would like to know why the code I tried did not work. I cannot find that information in the other question. – Håkon Hægland Nov 19 '16 at 14:52
  • The accepted answer in the other question (in the linked thread) does exactly what you want **and** it also sets up a key to restore the prior window configuration. Just remove the stuff about the prior window configuration and you are done. Alternatively, just copy the macro `help-window-full-frame` from the accepted answer and use it as-is. The key ingredients are `delete-other-windows` (at the appropriate location in the process) and binding `help-window-select` to `t`. – lawlist Nov 19 '16 at 14:58
  • Here is an example (from the accepted answer) in the other linked-thread using `help-window-full-frame` "as-is" *without* any modifications whatsoever: `(help-window-full-frame "*Debug*" (dolist (item load-path) (print item)))` And if you want, just press "q" to go back to the prior window configuration. – lawlist Nov 19 '16 at 15:12

0 Answers0