>> So do you propose to prefer buffer-local next-error-last-buffer >> instead of window-local next-error-last-buffer? > > Maybe something like this: > > - Make next-error-last-buffer always buffer-local. I believe this patch is a change for the better: 1. makes next-error-function buffer-local 2. sets both buffer-local and global values 3. adds customizable next-error-find-buffer-function 4. moves window-on-frame-visibility code to separate function that can be used to customize for backward-compatibility 5. adds next-error-select-buffer to manually switch to another next-error capable buffer 6. message to show which next-error buffer is currently used