Stack Exchange Network

Stack Exchange network consists of 174 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

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
0answers
16 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
17 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
20 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
18 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
17 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) ...
0
votes
1answer
24 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-...
0
votes
1answer
50 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
15 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
40 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
25 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
22 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
34 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
56 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 ...
1
vote
1answer
55 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 ...
2
votes
1answer
60 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
37 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
46 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
23 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
20 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
52 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
161 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
63 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
1answer
234 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
117 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
39 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
59 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
179 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
47 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.
4
votes
2answers
784 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
0answers
108 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
241 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 ...
0
votes
0answers
56 views

How can I set a directory buffer in one window to open files in another window?

The setup I am going for would look something like this: ------------------------------ | | | | | B | | | | | A |----...
4
votes
2answers
240 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
131 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 ...
2
votes
0answers
69 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
180 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 ...
0
votes
0answers
97 views

How to enable minimap when X and disable it when noX?

I want to disable minimap when nox system. (defun my:minimap-only-x() (when (eq window-system 'x) (add-hook 'prog-mode-hook 'minimap-mode))) (add-hook 'prog-mode-hook 'my:...
0
votes
0answers
268 views

Display calendar at bottom in Org Agenda

Recently I find that when I want to display calendar in Org Agenda, it opens a new window instead of displaying at bottom as in Org File. My Emacs version is 25.3.3 with Spacemacs 0.300.0(develop ...
2
votes
1answer
58 views

is there a hook that is run before a window is deleted

I want to do some custom stuff before a window is deleted? window-configuration-change-hook seems to be invoked after a window is deleted.
2
votes
2answers
492 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
0answers
120 views

Set Neotree width by percentage?

I currently have this in my config file for neotree: ;(neotree-show) (setq neo-window-width 25) Does anyone know how I can set the window width to 25 percent?
4
votes
2answers
75 views

Display all/current CSV heading names

In CSV files (especially ones with a lot of columns and/or a lot of rows) I find that it's hard to tell which column I'm on. Normally I'd like to know either the column heading, or sometimes the ...
3
votes
0answers
24 views

Keyboard macro with occur

In a keyboard macro, there is an occur command. While recording the macro, I switched to the occur window, did some editing, closed occur buffer reverted back to original buffer to continue editing. ...
1
vote
0answers
50 views

Restrict Mode Line display to window

I am configuring mode-line and currently the time is displayed in each window's mode-line, as shown by the image below. Is it possible to restrict the time display to the bottom right mode-line?
0
votes
0answers
75 views

org-edit-src-code in a specific window

I am currently using org-mode to edit code blocks for presentations and blog posts. Currently I have a frame set up with one large window pane on the left, and two smaller panes on the right. The ...
2
votes
2answers
90 views

replace-buffer-in-windows issues in switching from emacs 24.5 to emacs 25.2

I installed Emacs 25.2 on a new system and cannot get the desired behavior with killing buffers when an Emacs frame is split into multiple windows. For example, I have C-x 3 bound to a variation of ...
3
votes
0answers
63 views

How to open all buffers in the same window and never create new one?

I'm using emacs in terminal via emacs-nox and I wish to sort of disable windows functionality at all. I mean I do not want each time to add some buffer to use display-buffer-same-window function, I ...
0
votes
1answer
60 views

Preserving Layout Using emacsclient

If I spawn Emacs in --daemon mode, I can then use emacsclient to connect to the daemon from within a terminal window. If this then dies, I can reconnect my terminal and my Emacs session is still ...
2
votes
1answer
154 views

How to control which window is opened as “other Window”?

I am new to Magit and Spacemacs. I do not understand descriptions of other-window and next-window in the manual. I have 4 windows open in a Spacemacs frame like this: +--+--+ | | | +--+--+ | | | ...
1
vote
1answer
114 views

get buffer scroll position and height (aka min and max on-screen buffer locations)

I'm interested in the region of a buffer that is visible on-screen. How do you get the current scroll position of a buffer? I.e. the line number of the topmost line in the viewable area? (Given ...