>> There are two scenarios that this patch will fix: > > I reconstructed the buggy behaviors and checked that the patch fixes > them. Thanks for confirming. >>> IIUC the original Bug#33871 is still unsolved. >> >> The proposed patch will close bug#33871. > > Can you amend the original scenario you posted there in a way that one > can see how your patch can be used to fix it. That's where I stumbled > initially because I didn't know what to do. The original scenario was: (progn (dired "/tmp") (dired-next-line 1) (split-window) (other-window 1) (dired "/tmp") (dired-next-line 2) (let ((w-c (current-window-configuration)) (p-m (point-marker))) (view-emacs-todo) (delete-other-windows) (with-current-buffer (get-buffer "tmp") (revert-buffer)) (set-window-configuration w-c) (goto-char p-m))) Ok, let's add new code to separate functions 'window-set-context' and 'window-use-context'. Below is the patch with these new functions. Maybe they could be moved from tab-bar.el to window.el? Then the amended scenario will be: (progn (dired "/tmp") (dired-next-line 1) (split-window) (other-window 1) (dired "/tmp") (dired-next-line 2) (window-set-context) (let ((w-c (current-window-configuration)) (p-m (point-marker))) (view-emacs-todo) (delete-other-windows) (with-current-buffer (get-buffer "tmp") (revert-buffer)) (set-window-configuration w-c) (window-use-context))) >>> Bug#33532 as well. >> >> Bug#33532 could be closed as well due to new context functions. >> >>> What about Bug#68235 and Bug#69093? >> >> Bug#68235 is closed, but the patch will solve the issue >> mentioned in https://debbugs.gnu.org/68235#79 >> starting with the words: >> "BTW, there is another problem when the same buffer is displayed >> in two tabs/window-configurations." >> >> Bug#69093 is completely fixed. > > Is there any place where we should amend the documentation for these? If code is ok, I could update the documentation. > Which are the cases where the context function will fail to work? I'm not aware of any such cases.