Subject: Re: bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer)

From: martin rudalics <[email-masked]>
Date: Sat, 15 Jul 2017 15:59:07 +0200

> Wow, that's disastrous!  And frightening: I use the "(set-window-buffer
 > (selected-window) (set-buffer ...))" idiom a lot in todo-mode.el; I just
 > checked two commands using `C-h f' followed by the command invocation:
 > one worked fine but the other caused the same disaster.  So now I have
 > to check all uses :(.  Is there a general guideline for when to use
 > set-window-buffer and when to use pop-to-buffer-same-window?

Always try ‘pop-to-buffer-same-window’ or ‘display-buffer-same-window’
first.  If they fail, try to find out why.  Maybe that can be fixed.

martin