How to use “o” to open from dired/ibuffer into another frame

2018-05-21 18:16:20

I have two windows open and split vertically (single frame):

A) contains my work

B) contains either dired or ibuffer.

I would like to be able to navigate to a file/buffer in pane B and hit "o" have it open in pane A. Is this possible? Right now emacs is creating a new pane in the lower portion of pane A to open the file.

edit: according to user lawlist the above described behavior will happen when the frame is large. This appears to be the case for me because now that I am at home (not on an external monitor, smaller frame) emacs is behaving as I desire. The question now becomes: can I prevent emacs from opening a new window when the current frame is large?

Here are four (4) sample custom display-buffer family of functions that can be custom tailored to suit a user's particular needs -- above; below; left; right -- and here are four (4) interactive functions to display the file or directory of the current line of a dired-mode buffer. There are only three c

  • Here are four (4) sample custom display-buffer family of functions that can be custom tailored to suit a user's particular needs -- above; below; left; right -- and here are four (4) interactive functions to display the file or directory of the current line of a dired-mode buffer. There are only three conditions: (a) if there is already a window displaying the target buffer, then choose it; (b) if there is a window in the direction desired that is available, then use it; (c) the catch-all is to create a new window in the desired direction if the other conditions are not met.

    Usage:

    M-x dired-display-above

    M-x dired-display-below

    M-x dired-display-left

    M-x dired-display-right

    There so many key-bindings already built-in to dired-mode and dired+, that I dare not attempt to make up my own. The user is free choose his/her own keyboard shortcuts, which is beyond the scope of this limited example.

    The user is free to add additional conditions to the sample display-buffer family of

    2018-05-21 18:47:37
  • Your question is unclear, and so risks being closed. Do you have two frames or a single frame with two Emacs windows? Whatever they are, if there are two, is each of them split vertically? And just what do you mean by "split vertically"? What do you mean by a "pane"? What do you mean by "it", in "have it open in pane A"?

    A wild guess is that you have a single Emacs frame that is split into two Emacs windows, A and B, with window A above window B, window B is selected, and window B is showing a Dired buffer.

    o is bound by default to dired-find-file-other-window. If the above wild guess is correct then o on a file name in B should open in A. This is what I see when starting Emacs without an init file: emacs -Q. Do you not see that?

    If this is not the scenario, please describe clearly what you are doing, step by step, starting with emacs -Q.

    2018-05-21 19:33:39
  • NOTE:  The following variables are global, which means that they will affect other functions besides dired-find-file-other-window. The user may wish to advice the function at issue so as not to globally affect other functions. [However, this author will leave that option to another forum participant.] Alternatively, there is another answer that this author posted containing custom functions that can be used so as not to affect anything else.

    The variable split-width-threshold has a doc-string which states:

    Minimum width for splitting windows sensibly.

    If this is an integer, ‘split-window-sensibly’ may split a window

    horizontally only if it has at least this many columns. If this

    is nil, ‘split-window-sensibly’ is not allowed to split a window

    horizontally.

    Setting the following in the .emacs file will achieve the desired effect. The user can also set the value to a higher number. The default value is 160

    (setq split-width-threshold nil)

    Here is a link to the relevant s

    2018-05-21 20:00:45