help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Annoying change in "other window" behavior


From: MBR
Subject: Annoying change in "other window" behavior
Date: Tue, 23 Aug 2011 02:55:22 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

I've been using Emacs 21.3.1 for a long time and never got around to upgrading. I just installed Ubuntu (Natty Narwahl) on another system and when I installed Emacs on it, version 23.2.1 got installed. The new Emacs implements a "feature" that I'm finding very inconvenient, but I haven't found any way to turn it off.

There are certain commands that operate on the "other window". For example:

  1. C-x b brings up the *Buffer List* buffer in the other window,
  2. C-x 4 f opens up a file in the other window, and
  3. In a dired buffer you can position the cursor on a file or directory and type "o", and it will open that file or directory in the other window.

Note that I'm using the Emacs meaning of "window". I don't mean what the GUI (e.g. X11) calls a "window", which Emacs calls a "frame". I mean a subdivision of a top-level GUI window. Emacs windows are tiled either side-by-side or directly above and below other Emacs windows.

Anyway, I can split a window horizontally (i.e. turn it into two side-by-side windows) with C-x 3.

	+--------------------+--------------------+
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	+--------------------+--------------------+

Or I can split a window vertically (i.e. turn it into two windows, one directly below the other) with C-x 2.

	+-----------------------------------------+
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	+-----------------------------------------+
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	+-----------------------------------------+

In the older version of Emacs, when I used a command that operates on the other window, it always chose the other window from the set of windows I'd already created. If I'd previously created two vertically-stacked windows with C-x 2 or two side-by-side windows with C-x 3, it would put the data in whatever window the cursor was not in. Only when I had just one Emacs window, would it create a second window.

In version 23.2.1, that's all changed. The rule now seems to be that it will reuse a side-by-side window, but won't reuse a vertically-stacked window. So, if I've previously split my screen into side-by-side windows with C-x 3, the behavior is like it used to be. If my screen starts out looking like:

	+--------------------+--------------------+
	|  Dired buffer      |                    |
	|  ... >file #1      |                    |
	|  ... file #2       |                    |
	|  ... file #3       |                    |
	|  ... file #4 	     |                    |
	| 	      	     |                    |
	| 	      	     |                    |
	| 	      	     |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	+--------------------+--------------------+

	Note: ">" represents the cursor position.

after I type "o" (which runs dired-find-file-other-window), it looks just like it used to in the older version:

	+--------------------+--------------------+
	|  Dired buffer      |  This window now   |
	|  ... >file #1      |  displays the      |
	|  ... file #2       |  contents of       |
	|  ... file #3       |  file #1.          |
	|  ... file #4 	     |                    |
	| 	      	     |                    |
	| 	      	     |                    |
	| 	      	     |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	|                    |                    |
	+--------------------+--------------------+

BUT if I've previously split my screen into vertically-stacked windows with C-x 2, it now splits my current window into two side-by-side windows, leaving me with three windows. So, if my screen starts out looking like:

	+-----------------------------------------+
	|  Dired buffer                           |
	|  ... >file #1                           |
	|  ... file #2                            |
	|  ... file #3                            |
	|  ... file #4                            |
	|                                         |
	+-----------------------------------------+
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	+-----------------------------------------+

After I type "o" it used to look like:

	+-----------------------------------------+
	|  Dired buffer                           |
	|  ... >file #1                           |
	|  ... file #2                            |
	|  ... file #3                            |
	|  ... file #4                            |
	|                                         |
	+-----------------------------------------+
	|  This window now displays the contents  |
	|  of file #1.                            |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	+-----------------------------------------+

BUT NOW it looks like:

	+--------------------+--------------------+
	|  Dired buffer      |  This window now   |
	|  ... >file #1      |  displays the      |
	|  ... file #2       |  contents of       |
	|  ... file #3       |  file #1.          |
	|  ... file #4 	     |                    |
	| 	      	     |                    |
	+--------------------+--------------------+
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	|                                         |
	+-----------------------------------------+

I'm finding this very inconvenient. Does anyone know if there's a variable I can set in my .emacs to change back to the old behavior? Or if not, is there anyone who's familiar with the Lisp code that implements this who can point me to where in the code I should look to figure out how to change this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]