[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68235: 29.1.90; Switching tabs stops following process output in sel
From: |
martin rudalics |
Subject: |
bug#68235: 29.1.90; Switching tabs stops following process output in selected window |
Date: |
Sat, 20 Jan 2024 10:44:51 +0100 |
User-agent: |
Mozilla Thunderbird |
> This looks promising.
I attach a patch. Note that in my Emacs, window configurations are much
more lightweight so I cannot reliably test it. You would have to do all
the testing yourself.
> One thing I don't understand is how to get
> the previously visited file name from this list of four entries?
But it's still there in the dead buffer (the only things that can get
collected as long as a window is in a tab are the previous and next
buffers shown in that window). Try the scenario below, using some
suitable file as argument to 'find-file-noselect'.
(defun foo (frame windows)
(while windows
(let* ((quad (car windows))
(window (car quad))
(buffer (find-file-noselect
(buffer-file-name (nth 1 quad)))))
(when buffer
(set-window-buffer window buffer)
(set-window-point window (nth 3 quad))
(set-window-start window (nth 2 quad) t)))
(setq windows (cdr windows))))
(add-hook 'post-set-window-configuration-functions 'foo)
(let ((window (selected-window))
(buffer (pop-to-buffer
(find-file-noselect "...")))
(window-1 (split-window))
(window-2 (split-window nil nil t))
configuration)
(set-window-point window-1 5000)
(set-window-point window-2 10000)
(setq configuration (current-window-configuration))
(y-or-n-p "Configuration saved ...")
(delete-other-windows window)
(kill-buffer buffer)
(y-or-n-p "Configuration reset ...")
(set-window-configuration configuration nil nil t)
(message "Configuration restored"))
Note that window point and start are stored as positions and not as
markers which means that if you modify the buffer after the call of
'current-window-configuration', they may not be accurate any more.
One could try to get their last position before the buffer was deleted
but that would mean to give ‘marker-position’ an extra argument to omit
the
if (XMARKER (marker)->buffer)
check with some "use at your own risk" caveats ('marker-buffer' at the
same time would still have to return nil).
martin
keep-windows.diff
Description: Text Data
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, (continued)
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/14
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/14
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/15
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/15
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/16
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/16
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/17
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/17
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/18
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/18
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window,
martin rudalics <=
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/22
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/23
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/24
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/25
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/25
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/26
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/27
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/28
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, Juri Linkov, 2024/01/07
- bug#68235: 29.1.90; Switching tabs stops following process output in selected window, martin rudalics, 2024/01/08