Questions tagged [window]

In Emacs, a window is one part of a frame, displaying one buffer. For questions about operating system windows, see the tag 'frame.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

Flatten parallel nested window trees

Sometimes when moving windows around in emacs, it will get to a state where there is a horizontal or vertical stack of windows which appears to be a single list, but is actually made up of multiple ...
1 vote
2 answers
40 views

Why does this `display-buffer-alist` rule not do what I expect?

I have the following in the display-buffer-alist list: (("*" (display-buffer-in-side-window ((side . left) (window-width . 110))))) While display-buffer-overriding-...
4 votes
2 answers
654 views

Neotree window permanently resizes other windows

I usually have my emacs frame something like this: | | | | <window 1> | <window 2> | | | | When I open neotree, it then looks like this (...
3 votes
1 answer
258 views

Define the window location of the output of shell command

I use M-! to run the command shell-command. The output will open the buffer in a new window at the bottom. Can I configure it to appear on the right?
0 votes
1 answer
339 views

How can I split the neotree window in spacemacs/emacs

I want my neotree window not to extend all the way to the bottom as shown here. How is that possible? If I try to split it I get an error saying the side window can't be split.
1 vote
1 answer
20 views

How do I make Magit use the active window for operations and, on-exit, return the window to the previous buffer?

I am a recent newcomer to emacs, and I have my screen split into 4 windows in a grid arrangement. I'm having some problems using Magit, which is that it spawns (seemingly arbitrarily) in one of the 4 ...
2 votes
3 answers
85 views

How can I quit windows like *Help* and *Messages* without first selecting them?

I find myself running C-h k/f/v and after reading the popup that's in the other window, going to that window and closing it. Is there a way to streamline that process a bit more (maybe adding a hook ...
15 votes
2 answers
3k views

Neotree window not resizable

I get this message when I try to resize the neotree window using my mouse: No resizable window on the left of this one Does anyone know how I can make the neotree window re-sizable?
1 vote
1 answer
54 views

How to distinguish a scroll from a change of buffer in a function called from ‘window-scroll-functions’?

I've written a function that recenters the point each time it makes a long jump and I added it to the hook window-scroll-functions. The length of the jump is determined by comparing the return value ...
0 votes
0 answers
32 views

How can I keep windows from being shrunk past their fill-columns?

Typically I have two windows, left and right, with the left window (call it the "editing window") showing a buffer in a prog-mode or text-mode and the right window (call it the "...
0 votes
0 answers
18 views

How to position ESS windows in doom-emacs similar to Rstudio?

I'm trying to pass my R coding workflow to Emacs, but I'm not completely satisfied with the windows' layout. The basic layout to start should be the classic's Rstudio layout. In the ESS manual they ...
2 votes
1 answer
100 views

Move the fringe indicators close to the window text

When I use olivetti-mode I'd like to have grey margins and the fringe indicators close to the window text, like in this picture: The problem is that when the fringes are wide the indicators end up ...
4 votes
3 answers
1k views

How can I increase the spacing between the buffer and the top part of the frame?

I'd like to add a margin to the top of the window so that it's not so close to the top part of the frame. Here's what it looks like currently (arrow indicates where I'd like to add extra margin): ...
1 vote
1 answer
227 views

which-key takes up entire lower half of the screen (possibly related to package zoom)

Suddenly which-key, when triggered, takes up the entire lower half of the screen although only a portion of that is then filled with information. This behaviour started a couple of days ago, but I did ...
3 votes
1 answer
91 views

Emacs 25.3.2: reverse windows on files opening

If I open 2 files by command line: emacs file1 file2 in Emacs 25.3.2, file2 is opened in the upper window and file1 in the lower. This didn't happen in previous versions of Emacs that had the ...
5 votes
2 answers
1k views

How do i close the *compilation* buffer without visitinig its window?

I like to work with a vertically split frame with code in both windows. When i call M-x compile the *compilation* buffer shows in the other window (wich is fine as M-g n would show problematic code in ...
0 votes
1 answer
44 views

How to display the minibuffer above candidates in helm

I am looking for configuration that displays the minibuffer in which to type input above matching candidates in a helm buffer. I went through each helm variable and the closest named variable was helm-...
0 votes
1 answer
35 views

How can I check whether the current buffer is an eshell buffer?

I'm trying to write a function which opens or closes an eshell window. So far I have: (defun bottom-window-eshell() (interactive) (let ((buf (eshell))) (switch-to-buffer (other-...
1 vote
2 answers
112 views

Dired: How to open file with ace-window while keeping focus on dired buffer?

I have this Elisp code that allows me to use ace-window to open a file in a selected window from Dired: (defun find-file-dired-ace-window () "Use ace window to select a window for opening a ...
1 vote
1 answer
130 views

How to switch to `flycheck-list-errors` buffer/window/minibuffer?

For starters I use Doom Emacs. Here's the scenario: I have a python/perl/js buffer and flycheck-mode activated. Flycheck does its job and tells me that there are some errors that need attention. I go ...
0 votes
0 answers
10 views

display-buffer-reuse-frames with server-mode

I have been using display-buffer-reuse-frames for a long time. It works fine when creating multiple frames with X11, or MS-Windows. Today I was using emacs via ssh. So I tried to use this feature, ...
3 votes
1 answer
57 views

How to get a window in a corner of the frame

Is there a built-in function to return a window in a particular corner of a frame (e.g., lower-left, upper-left, upper-right, lower-right). The following is a first draft to locate the lower-left ...
2 votes
1 answer
29 views

How to hide comments and move them to a separate window?

I'm interested in hiding comments in code or structured text, but displaying them in another window; i.e. same buffer, two windows side-by-side, one showing the main text (code, or content), but ...
1 vote
1 answer
211 views

Force one window when opening multiple files

Any time I open multiple files I'd like emacs to only show me one buffer. I do not want any split windows. This would save me a keystroke every time. I learned I could do away with the buffer list ...
0 votes
1 answer
63 views

How do I specify the window height of the Python interpreter?

Suppose I am editing a file in python-mode. If I start the Python interpreter using M-x run-python (or C-c C-p), the Python interpreter opens in a window (*Python*) in the bottom half of the frame. ...
1 vote
1 answer
39 views

How to get the width of the window without line numbers? (or other content in the fringe)?

The result of window-body-width doesn't change when display-line-number-mode is enabled / disabled. How can I get the window width but excluding the fringe?
3 votes
2 answers
778 views

How to close help buffer without moving to it?

I often use Emacs' help buffers, via e.g. C-h k. Buffer *Help* is displayed in another window, and that window is not selected. In order to close the *Help* buffer, I need to switch windows via C-x o ...
0 votes
1 answer
51 views

Controlling Behaviour of (Compilation) Window Creation

How do I control whether the output buffer *Compile* of M-x compile will be shown in an existing window or in a new window by splitting an existing window ? My problem is that the compilation buffer ...
2 votes
2 answers
64 views

How to make the current window display the buffer it was displaying before the current one?

For example, imagine I have two windows and three buffers. Both windows are displaying buffer 1 and I do the following, in window 1, switch to buffer 2; in window 2, switch to buffer 3, then to ...
0 votes
0 answers
27 views

How to setup GTK emacs to open files in its current instance instead of opening a popup window?

Spent a lot of time on this and tried various solutions on the internet. Please help. Using the following emacs version. Want to run it in GUI mode on an Ubuntu 20.04 server, same issue happens on ...
1 vote
1 answer
61 views

How to know what part of the file is currently displayed in a window?

Essentially, is there a function in Emacs like text-currently-displayed-in-window --> returns two integer The integers represents the position interval that is currently being displayed on screen ...
1 vote
1 answer
36 views

How to resize the bottom mini window?

What I did was I installed the fresh spacemacs I added org and osx layer I used the doom-1337 theme C-c a to select agenda commands Then, the bottom letters are barely seen as the mode-line height ...
2 votes
3 answers
159 views

cycling between minibuffer and last window|buffer

I'd like to cycle between an active minibuffer window and the last recent buffer. 1 (defun cycle-to-minibuffer-window () 2 (interactive) 3 (when (active-minibuffer-window) 4 (if (...
1 vote
1 answer
116 views

Portable way of setting the windows urgent hint?

I've seen links to X11 flag setting that sets the current windows urgent hint. Is there a portable way to do this in Emacs? Or does it need to be handled per-platform?
1 vote
1 answer
31 views

Display attachment to mu4e message (a PDF) in the same window rather than new frame

I am using mu4e and pdf-tools. Whenever I go to open an attached pdf (e.g., with gnus-article-press-button) the attachment pops open in a new frame. How can I control where it pops up? Looking at that ...
2 votes
1 answer
34 views

How to switch windows to specific visible buffer?

Is there a command that allows me to have my cursor switch windows to a specified buffer? Something that looks like (switch-to-specific-window-command "buffer-name")
2 votes
1 answer
85 views

Shift+Ctrl+arrow to enlarge and shrink windows does not work in org-mode

Similarly to what is described here, org-mode overrides C-S-<arrow> key-binds which, in order to control the size of the windows, I have defined as follows: (global-set-key (kbd "S-C-<...
2 votes
1 answer
65 views

Can window-height be ignored in display-buffer-alist after initial creation?

Currently I'm using the following display-buffer-alist, which works fine but resets the size on opening a new window. Is there a way to only use the window-height when first creating the window? After ...
0 votes
0 answers
17 views

Close buffer switching to next buffer without leaving or closing the window

I am using the Emacs-terms here. I want to close the current file/buffer. But I do not want to leaver or close the current emacs-window. In the current window there should just appear the next open ...
8 votes
4 answers
1k views

How to autoscroll a window to always show the end of a growing buffer?

Context: I have a window that shows the output of a shell command. As new lines are added, I'd like the window to always show the most recent lines. Example: (let ((temp-window (or (get-buffer-...
1 vote
3 answers
188 views

Show only one or two lines of a buffer

I need to check numbers in a buffer each on a line against an external paper sheet To make this easier I would like to make the window very narrow to see only one (or max. two) lines. However shrink-...
1 vote
1 answer
31 views

How can Elisp code determine the previously selected window?

I would like to implement an interactive function that, in the "canonical" case, selects the window that was selected before the currently selected one1. But my plan founders immediately on ...
0 votes
0 answers
39 views

Treemacs and Transpose-Frame issue

I use treemacs to navigate files and functions, open in a panel to the left (window 1). I also like the transpose frame package functions to change the orientation of windows, however this doesn't ...
0 votes
0 answers
9 views

How to open `helm-all-mark-rings` in split window, while keep `helm-for-files` to open in same window

helm-for-files opens in full buffer, which I wanted to see it in full window (same window). I believe it is opening in full window is due to following lines according to How to configure a command to ...
0 votes
1 answer
35 views

In Magit, the command `magit-status` opens the buffer with the status buffer. Is there some similar command to do the same but with the Slime's REPL?

I am using Emacs powered with Slime to write code on Common Lisp (SBCL). In addition, I am also using magit. Magit has a handy command called magit-status (C-x g). I use it a lot and I tend to have 2 ...
2 votes
1 answer
76 views

In EXWM `split-window-right` followed by immediate `windmove-right` swaps order of buffers

I have a function (defun bad-fn () (interactive) (split-window-right) (windmove-right) ) If I go to a frame with just one window visiting EXWM buffer A (and buffer B is next), and call split-...
3 votes
1 answer
216 views

How to automatically downscale an image to window width in org-mode?

I use org-toggle-inline-images to directly view linked images in org-mode files. Unfortunately, depending on resolution, format and size, images often are too wide for the window (especially in ...
1 vote
1 answer
61 views

How to dynamically replace certain text, by evaluating a function on change in current buffer

I am trying to figure out how to use window-change-functions refer here for official documentation to be able to run a function to replace certain text within the current buffer at every change of the ...
2 votes
1 answer
60 views

Like pressing "q", but from the other window

I run a command that takes over another window, and maybe resizes it a little, but doesn't focus it. Let's say C-h e or C-x C-b. I can go to that window and press q there, and everything goes back to ...
0 votes
1 answer
37 views

windmove doesn't recognize S-<up> and S-<down> on Macbook Air

GNU Emacs 27.2 in Mac OS terminal (11.4 Big Sur). Started with (windmove-default-keybindings) and found that S-<up> and S-<down> behaved just as <up> and <down>, as if the ...

1
2 3 4 5
8