Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
26 views

emacs opens ESS/R buffer in random window

I'm using emacs 26.1 with ESS. Whenever I open a R session with M-x R it opens in a random window. However, I would like it to open in the currently selected window. It seems to be a similar issue as ...
1
vote
1answer
41 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 ...
0
votes
1answer
55 views

Killing a window without killing the associated buffer

I have a weirdly specific way I like to organize my windows when working with C, and where emacs opens the compilation window really bugs me. I try to close it and switch another window to the *...
2
votes
1answer
45 views

How to modify fringes only for magit mode?

I have tried: (defun my-change-fringes () (set-window-fringes (selected-window) 20 0)) (add-hook 'magit-mode-hook 'my-change-fringes)) The problem seems to be that when I open a magit buffer for ...
1
vote
3answers
59 views

Static Buffer List

I'd like to use emacs more, but I'm still used to some of my previous workflows I know from most modern IDEs. What my emacs lacks most is a static list of the open buffers or files. By static I mean: ...
1
vote
0answers
17 views

Possible to save winner history winner-ring-alist in savehist or desktop-save to save across sessions

I added in the following command to my .emacs but it doesn't seem to work: (add-to-list 'savehist-additional-variables 'winner-ring-alist) Is there a way to get the winner-undo history to save ...
0
votes
0answers
15 views

`fit-window-to-buffer` and `reposition-window` non-interactively

I'm using lean-mode and want to keep the *Lean Goals* buffer sized to fit its contents. Here's what it should look like: To get that working, I wrote the following and hooked it in to the relevant ...
1
vote
1answer
22 views

full-frame helm?

Is it possible to run something like helm-recentf or helm-mini in a way that the helm window occupies the entire frame when it's running, and then disappears afterwards (like the helm windows normally ...
0
votes
0answers
24 views

how to forcefully recenter the cursor even it's on the 1st of the lines in emacs?

) I wonder if I can forcefully recenter the cursor in emacs. I often use C-l recenter-top-bottom command but It couldn't work at the first of the lines. I have a vertical monitor for programming ...
1
vote
0answers
41 views

how can I programatically transition between those 2 window layouts?

I am trying to implement this window transition a/ b/ --------- ------------- | 1 | 2 | | | 1 | 2 | --------- -> | 0 |-------| | 3 | 4 | | | 3 | 4 | --------- ...
0
votes
1answer
38 views

Switch cursor to another window between more than 2 windows

I could use C-x o to switch buffer properly between two windows, but when it comes to more than two windows, it fails The cursor stay instantly on the current window. How could I solve the problem?
2
votes
1answer
98 views

How to open multiple files in multiple windows at startup

In earlier versions of emacs one could use emacs -nw file1 file2 file3 and see three files (and no buffer list) at startup. For recent versions this no longer works. Is it possible to add some code to ...
1
vote
0answers
55 views

migrated from emacs 25 to 26.1: cannot force find-file/counsel-projectile-find-file to always open buffer in current window

Recently I migrated from emacs 25 to 26.1. Before I reached the window behaviour, where I could always open a file at the window at point. The most simple case to illustrate undesired behaviour: I ...
2
votes
1answer
81 views

Execute function when (after) window scrolls

I need to execute a function every time a window scrolls. I mean the function to be executed at point "after" the window has been scrolled (with C-v, M-v or with the <down> key). I tried: (add-...
0
votes
1answer
53 views

Reuse help window

How to set up Emacs so that once one "help" window (e.g. describe, info, man) is displayed, all subsequent "help" buffers open in the same window? For example, if I open a describe-function buffer ...
1
vote
0answers
29 views

How to change which window a click in *Occur* buffer affects?

My use case: I am looking at one place in the code in one window (call it window A), have a second window with the SAME code open (window B) in the same frame, together with an Occur buffer, that I ...
1
vote
0answers
63 views

How to assign an Emacs buffer to an EXWM workspace based on a regexp?

I know how to assign apps to various EXWM workspaces thanks to: exwm-manage-configurations But I don't know whether it is possible to assign Emacs buffers to EXWM workspaces in a similar fashion. ...
2
votes
1answer
25 views

How to bind mouse click to kill an inactive window, but not the buffer

I'm trying to create a binding to kill windows (but not buffers) when they're being pressed by a middle mouse click in their header lines. (Just to note, all windows in my setup have header lines.) ...
0
votes
1answer
24 views

In org-mode, what variable controls the placement of the calendar view when called from a capture template?

I have a question related to this one: when I am in a capture template (for writing a TODO task, for example) and I want to open the calendar with C-c C-s (bound to org-schedule, so that I can set a ...
1
vote
1answer
24 views

Elpy - Close Window when invoking elpy-shell-kill

Elpy helps a great deal, when editing Python-Code. For example it let's you run the current file with C-c C-c in a new Window with a REPL. When i'm done with this, i can hit C-c C-k (elpy-shell-kill) ...
1
vote
1answer
39 views

How do I set window size

When I start emacs, I would like to have it set up so that there is a scratch buffer on top and a terminal on the bottom. I would like the terminal to be 15 lines tall. So far I have (defun startup-...
1
vote
1answer
64 views

How to launch (start) emacs with a single window and choose the buffer of that window as default in the init.el file? [closed]

What statements in the init.el file can be added so that there is a single window shown as the default I have is split into 2 windows vertically aligned (equivalent to typing C-x 1)? Then once there ...
1
vote
1answer
18 views

How to disable buffer movement in a particular window in emacs?

I am trying to figure out if we can disable a particular window from switching the buffer it contains. If anyone has achieved that please share.
1
vote
0answers
60 views

Switch to last window

I am trying to use the code from this answer: Is there a generic toggle-previous-window function? (defun switch-to-last-window () (interactive) (let ((win (get-mru-window t t t))) (unless win ...
2
votes
1answer
27 views

Function to ensure window height

Is there a function to ensure (or at least try) that a given window has a height of N lines, by shrinking it (or enlarging it) as needed? If N is too much (or not enough) for a given scenario, then a ...
1
vote
0answers
32 views

How to fix a buffer to a pane

I have my emacs in 2 by 2 configuration. When debugging, certain actions triggered the opening of another file. The newly opened file could be in a specific window pane and covers originally opened ...
1
vote
1answer
38 views

Magit popup set height automatically

When the magit-commit-popup window opens, there are one or two lines that are just below the screen. Calling fit-window-to-buffer in the popup buffer fixes the problem, but I would like to automate ...
2
votes
1answer
59 views

What is the difference between switch-to-next-buffer and next-buffer?

To go to the next/prev buffer I use the commands next-buffer / prev-buffer. This works well and is very comfortable. But there are also two other commands switch-to-next-buffer / switch-to-prev-buffer ...
2
votes
1answer
76 views

Minibuffer for each window

Is there a way to have a minibuffer window for each window? I don't want recursive minibuffers, just one per window so that I don't have to look to the bottom of the screen when editing a window ...
3
votes
1answer
109 views

Move to other window backwards?

Emacs has the function other-window that lets you jump between windows. The function's documentation states that it takes an optional argument that tells the function how many windows to jump ahead. ...
0
votes
1answer
61 views

Unable to use ediff with emacs and evil due to window configuration

Running emacs 25.2.2 with evil installed and updated from Melpa. When I run ediff, it asks for usual buffer A and buffer B and then ONLY the ediff buffer in its own frame is visible with 'Type ? for ...
1
vote
1answer
85 views

Reopen closed window in Spacemacs

How can I reopen a closed window in Spacemacs? Something like Cmd-Shift-t in Chrome. I open a window using SPC w s and delete it with SPC w d, but I don't know how to reopen one that I've closed.
1
vote
1answer
29 views

helm-find-file (and other things) appearing in my main split

I currently have helm installed. Sometimes when I have my window split vertically, when I run helm-find-files, it appears in one of the already open windows, rather than creating a new horizontal ...
0
votes
0answers
36 views

Why ace-window doesn't show sometimes the window id?

I initialize the package ace-window with this code: (use-package ace-window :ensure t :config (global-set-key (kbd "M-p") 'ace-window) (custom-set-faces '(aw-leading-char-face ((t ...
0
votes
1answer
69 views

What keys can I use to create/delete and select side windows?

I have a shell buffer that's a good candidate for a side window: I also regularly use an org buffer, that's always good to have around. https://www.gnu.org/software/emacs/draft/manual/html_node/elisp/...
2
votes
2answers
221 views

Running elisp within an orgmode code block

Consider the following elisp source code within a .org file: #+BEGIN_SRC elisp :results silent (delete-other-windows) (split-window-right) (switch-to-buffer-other-window '"*Python*") #+END_SRC This ...
0
votes
1answer
78 views

Emacs daemon multiple buffers for same file

When running Emacs as a daemon, function find-file automatically selects and uses a preexisting buffer that is visiting the same file. My problem is, when using the same buffer in multiple frames ...
1
vote
2answers
417 views

How to set up custom layout for spacemacs?

I want to ask something regarding making my own custom layout for spacemacs. I have read the documentation. They have an example like this: This is the custom layout for ERC buffers. (spacemacs|...
0
votes
1answer
163 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.
3
votes
0answers
43 views

Emacs 25.3.2: reverse windows on file 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 ...
0
votes
1answer
70 views

Emacs Dired `C-x C-j` opens a new frame instead of a new window

I am using Aquamacs 3.3 GNU Emacs 25.1.1 and Dired+. Sometimes the key sequence C-x C-j opens the Dired buffer in a new frame instead of a new tab in the running frame. I want the behaviour that the ...
5
votes
3answers
261 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-...
0
votes
0answers
68 views

How to make new windows use the current font size?

When making a new window (using make-frame-command), how can I use the current font scale for new windows? Note: reported a bug, since it seems this might be good default behavior.
5
votes
2answers
1k views

Open new window and switch to it

Assume I'm opening a new window with for example C-x 2 or C-x 3 then the buffer opens and I need to switch to it by hand with C-x o. Is there a build in solution to do this with one command? Or even ...
0
votes
1answer
194 views

How to reuse org-tree indirect buffer windows?

So I would like to use the function below. The problem is that if I call this multiple times another window opens instead of the window that already exists. All the buffers that are created look like ...
2
votes
1answer
301 views

Prevent Helm from opening in a new frame

I recently updated Helm from MELPA to version helm-20180305.1056 and helm-core-20180306.2241. Now sometimes when I use Helm it opens in a new frame. I think this happens when I have 2x1 or 2x2 window ...
7
votes
3answers
448 views

Prefer vertical splits over horizontal ones

There are several questions similar to this one. I have read them all and they don't provide an answer for my scenario. I want emacs to prefer vertical splits (splitting windows into left and right ...
1
vote
1answer
221 views

Remapping C-x C-b to Open List of Buffers in Same Window

I use Emacs across different machines and operating systems. I noticed that when I press C-x C-b to get a list of all buffers, on some machines the list opens in the same window where the cursor is ...
3
votes
1answer
99 views

Jump between two frames, code improvement

I often have got multiple emacs frame in various desktop, but only two of them are visible. I often need to jump between those two frames, but since other frames are opened I can't use C-x 5 o, ...
0
votes
2answers
254 views

Newbie: Simple setup for dired in sidebar?

Simple question from a new Emacs user: I'd like to have my editing window have a sidebar (or a divided window, or a frame--I'm not sure of the terminology or the options here) that has a dired (or ...