Subject: Re: Bad behavior with sr-speedbar package

From: Angelo Graziosi <[email-masked]>
Date: Sun, 30 Jul 2017 19:23:09 +0200

OK, I found the commit that causes this issue:

committer	Stephen Berman
commit	8e394b082bd6ecd9ba212cb3ca07cbace66767a6

Preserve point under 'dired-auto-revert-buffer' (third case)
* lisp/files.el (find-file): Use pop-to-buffer-same-window
instead of switch-to-buffer.  This preserves Dired window
point when dired-auto-revert-buffer is non-nil.  (Bug#27243)

* test/lisp/dired-tests.el (dired-test-bug27243-01)
(dired-test-bug27243-02, dired-test-bug27243-03): New tests.
The first two replace a previous test that combined them; that
test intermittently fails in the Hydra build system, so maybe
separating the two cases will help locate the point of
failure.  The third test involves find-file but is here
because it, like the others, is testing the effect of
dired-auto-revert-buffer.

With the previous commit,

author	Allen Li
committer Eli Zaretskii
commit	dfee60fe66f3d9fe4249c9662d802753f3e50929

Do not unset user key remaps in dired-x
* lisp/dired-x.el (dired-x-bind-find-file): Don't map any keys if user
sets dired-x-hands-off-my-keys.  (Bug#27828)

all works as expected.

Angelo

Il 30/07/2017 16:56, Angelo Graziosi ha scritto:
> With recent builds from master, after 20170728 - 
> f1ed31a8f5c6f19aa5e119e670533241c6375945 commit, visiting a buffer 
> produces a "New window below" (C-x 2) and the buffer shows up in the 
> bottom window.
> 
> Usually, when one visits a buffer this is in the current window without 
> splitting..
> 
> I can reproduce this behavior on GNU/Linux Mint 18.2 x64 (Mate), W64 
> (MSYS2/MINGW64) and macOS Sierra (10.12.6, NS build). This is the 
> minimal ~/.emacs.d/init.el:
> 
> $ cat init.el
> ;; Adds the MELPA repo to Emacs Packages
> (when (>= emacs-major-version 24)
>    (require 'package)
>    (add-to-list
>     'package-archives
>     '("melpa" . "http://melpa.org/packages/")
>     t)
>    (package-initialize))
> 
> (require 'sr-speedbar)
> 
> Steps:
> 
> 1. Start Emacs. It starts with a single window containing the *GNU 
> Emacs* buffer.
> 
> 2. Now toggle the sr-speedbar: M-x sr-speedbar-toggle. It contains two 
> windows: on the right, the sr-speedbar; on the left the *GNU Emacs* buffer.
> 
> 3. In *GNU Emacs* buffer visit a buffer: C-x C-f foo.txt. The *GNU 
> Emacs* buffer window is divided (as in C-x 2) and foo.txt is in the 
> bottom window.
> 
> The last master with the right behavior is 2017-07-28 12:38:22 +0300, 
> f1ed31a8f5c6f19aa5e119e670533241c6375945.
> 
> 
> Ciao,
>    Angelo.