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
0answers
9 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
4answers
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
3answers
147 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-...
0
votes
1answer
13 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 ...
4
votes
2answers
643 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 (...
1
vote
1answer
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
0answers
38 views

centered cursor with evil-window-bottom and evil-window-top

I'm trying to achieve both: persistent centered cursor (cursor stays in center of a window except when near the line 0 and count-lines-page augment the way evil-window-bottom and evil-window-top work ...
0
votes
0answers
31 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 ...
3
votes
1answer
241 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
1answer
313 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.
0
votes
1answer
83 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?
0
votes
0answers
3 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
1answer
26 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 ...
1
vote
1answer
32 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 ...
1
vote
1answer
59 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-...
1
vote
1answer
189 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
1answer
75 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 ...
3
votes
1answer
84 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
2answers
50 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
1answer
52 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 ...
1
vote
1answer
51 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 ...
2
votes
1answer
52 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
1answer
22 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 ...
0
votes
1answer
44 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. ...
5
votes
2answers
125 views

How do I open a window that will behave like a *Help* window?

*Help* windows appear to have a special behavior. For example, if I open a help window using C-h f butterfly, the window will open in a separate half-page buffer. If I use the help feature again C-h f ...
0
votes
1answer
38 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 ...
1
vote
1answer
97 views

Is it possible to open Deft in a sidebar?

I'm trying to open Deft in the left sidebar using this code: (setq display-buffer-alist '(("*Deft*" (display-buffer-in-side-window) (window-width . 0.25) ...
1
vote
2answers
180 views

Don't replace my buffers with *warnings* or *message* buffers?

Current behavior: Emacs replaces one of my buffers with *warnings* or *messages* if I have multiple buffers open. However Emacs creates a new buffer and displays *warnings* or *messages* if I have ...
0
votes
2answers
47 views

Switch to the most recently selected buffer in the current window

I am looking for a command that would switch to the buffer I most recently selected in the current window. The command mode-line-other-buffer will switch to the most recently selected buffer not ...
0
votes
0answers
18 views

Split window horizontally when calling switch-to-buffer-other-window the first time

When calling switch-to-buffer-other-window interactive function the first time, the window is split horizontally. I would like the window to split vertically instead of horizontally by default. Is it ...
6
votes
1answer
970 views

Open file in a specific window

Very similar to this question. I'm using helm-projectile to find files. My Emacs frame is divided in three vertical column windows. In one of the windows I have an open file from the project I'm ...
13
votes
2answers
756 views

Change highlight color when window isn't in focus?

I'm using hl-mode as a minor mode for deft. How do I make the highlighted line change color (e.g. to gray) when the deft window isn't the current window, and then back to the default highlight color ...
18
votes
2answers
6k views

When should I use with-eval-after-load in my configuration files?

I went over my configuration files and wanted to do some cleanup. My understanding of with-eval-after-load was that its body would be evaluated right after the related package is loaded. While ...
28
votes
6answers
9k views

Switching between window layouts

When I configure a custom layout and then just need to temporary look into one file fullscreen and once I want that layout back - I need manually to reflow it. I would like a plugin/elisp code to ...
0
votes
0answers
22 views

How to use C-j C-k to move window in term mode using evil?

The bindings of C-j C-k to evil-window-down[up] work well every where apart form term mode. term mode rebinds these to C-w j C-w k - this is super annoying! How can i make term use the C-j/C-k ...
2
votes
1answer
486 views

Why do many buffer switching commands in Doom Emacs skip over buffers that aren't visiting files? How can it be prevented?

In Doom Emacs many commands that replace the buffer in the current window with a different buffer will automatically select the most recent buffer that you have had open in a window. But buffers that ...
1
vote
1answer
125 views

How to restore a window configuration after reboot?

I have foo.txt on the left and a terminal on the right: |-------|----------| |foo.txt|ansi@term>| |-------|----------| How can I restore the layout of the windows with the same buffers displayed ...
0
votes
0answers
21 views
0
votes
1answer
131 views

Prevent other-window from choosing side window

I have recently started using buffer-display-alist to sensibly place windows within a frame. Typically, I'll have one or two windows of code buffers that I actively work in and a bottom "side ...
8
votes
2answers
1k views

Automatically switch focus to new window

Is there a way to automatically switch focus to any new windows? For example, if I C-h f some-function, that creates a new window. But the focus remains where I was, so when I'm done reading and hit ...
1
vote
1answer
115 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
1answer
24 views

Delete single window frame after app quits

Some of the apps (w3m, elfeed, mu4e, to name a few) when quit leave unused frame so the other buffer shows up in their place. Over time these redundant frames pile up, so we have to delete them. I ...
1
vote
2answers
44 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 ...
1
vote
0answers
58 views

Workaround bug#45038: 27.1; blank display

My setup: Emacs 27.1 under Ubuntu 20.04 from Kevin Kelley's PPA, and configured to use ligatures with the JetBrains Mono fonts, as described here. I experiencing Bug#45038 27.1; blank display, or ...
0
votes
1answer
24 views

Let-bind diplayed windows and their size/posizion

Can I let-bind diplayed windows and their size/posizion? Is there a variable that stores these infos? I need to run a script that will change the diplayed windows, opening some help temp buffers. At ...
1
vote
2answers
36 views

How can I display a buffer in a whole frame, removing the rest in the act?

Basically that. I need a function that would do this when I open a buffer in a frame with many other windows. Maybe Emacs has one by default.
0
votes
2answers
42 views

Open clickable filenames in the same help buffer

I looking for simple solution to open clickable filenames in the same help buffers. For example, when we display help for add-to-list variable and click TAB the cursor is placed on the subr.el file ...
4
votes
1answer
78 views

How do I focus the Man mode window when it is displayed?

When I open a man page (e.g. M-x man cat) I would like to automatically move my cursor onto the man page. I already know how to achieve this behavior for *Help* and *Apropos*, and I want to get the ...
3
votes
1answer
130 views

How to save and restore the association of a window to buffer across Emacs sessions?

I have a window layout with three windows and I would like Emacs to remember the buffers even if the buffers don't exist after restart. Context: I am using Spacemacs for Clojure development. In ...
3
votes
2answers
228 views

Open org link in the same window

When I follow from one Org file to another via a link, the new file appears in alternative window if there is one. Is there a way to follow links staying in the same window? For example, I use a frame ...

1
2 3 4 5
8