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.

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
622 views

How to immediately resize the minibuffer window?

Suppose that I have this function, that inserts some stuff into the minibuffer: (defun foobar () (interactive) (minibuffer-with-setup-hook (lambda () (let ((resize-mini-windows t)) ...
7
votes
0answers
82 views

Ediff location pane

Is there a way to create something similar to the location pane from win merge in ediff? Not having this is about the only reason I use win merged instead of ediff.
6
votes
0answers
255 views

How do i run zone (zone-when-idle) for all windows?

Zone Mode is awesome But when I run it using M-x zone, or by setting zone-when-idle variable it starts animating only one(selected) window. Is there any way to run it for all windows?
6
votes
0answers
521 views

How to set window size programmatically (and without guesswork)?

When searching for how to set an Emacs window size programmatically, all I can find are recipes that include statements like (add-to-list 'default-frame-alist (cons 'height (/ (- (x-display-...
4
votes
2answers
613 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 (...
4
votes
0answers
2k views

Emacs is blurry on scaled Windows displays (eg. Surface)

To smooth my embedded workflow I have succombed to buying a Microsoft Surface. Like the early days of MacOS retina screens Emacs is all blurry. Does anyone know if there is any support for scaled ...
3
votes
0answers
169 views

Adding Purpose to Layout Of Emacs

The rigidity to which emacs adheres to its layout is annoying at times. How can i get a layout like this when I shift to the particular modes? +------------------+-----------+ | | ...
3
votes
0answers
52 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 ...
3
votes
0answers
118 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 ...
3
votes
0answers
228 views

Shutting down computer from emacs killing gracefully emacs itself

I am using EXWM on Arch as my windows manager. Substantially my startx launches exec dbus-launch --exit-with-session emacs so I am running only emacs and living inside it. I would like to define a ...
3
votes
0answers
249 views

Emacs Fixed Layout

Background Used vim for 15+ years. Currently using Emacs + Evil + Cider (Clojure). My Ideal Workflow (this part is not the question -- merely describing my ideal workflow) Three vertical panes. +--...
3
votes
1answer
199 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?
3
votes
0answers
125 views

Compile quietly unless there are errors

I want to run compile or recompile, but I don't want to see the *compilation* buffer pop up unless there's an error, or not at all. If the compilation succeeds, I should just see a notification in the ...
3
votes
0answers
115 views

Save configuration of buffers, buffer positions and windows for later recall

I have different workflows with emacs: for example Python development and LaTeX. When I code some Python I like to have a wider window to have different buffers opened at the same time, plus a repl ...
3
votes
0answers
1k views

When using emacsclient, how can I open the file in the active buffer?

When I open a file with emacsclient without invoking -c, Emacs visits the file in a new buffer in the background while leaving my current window configuration in place. I'd like to change this, e.g. ...
2
votes
0answers
67 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
0answers
29 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. ...
2
votes
0answers
85 views

Resize windows line by line, not pixel by pixel

Is it possible enforce that Emacs changes the window size line by line, not by some count of pixels, to eliminate the situation when I see a half-line on the screen? I mean window in Emacs sense (...
2
votes
0answers
99 views

Window placement of new shell buffer

Opening a new *shell* buffer takes over any window other than the one I type the command into. What variable changes this behavior? I have a guess the choices will be the same as these: Hide Erc ...
2
votes
0answers
64 views

Sensible stack-like quit-restore behavior in side-window?

How can I get sensible stack-like behavior from a bottom side-window? I've configured both Ag and Help to display their buffers using display-buffer-in-side-window. I like to maintain a window ...
2
votes
0answers
84 views

Prevent text jumping up the screen when dismissing Swiper

Swiper creates a minibuffer many lines in height. This height is borrowed equally from my existing, vertically-arranged, windows. When Swiper is dismissed, this space is recovered by the windows and ...
2
votes
0answers
743 views

Org-Mode Agenda Open in Left Window by Default

With a vertical split (C-x 3), regardless of which buffer I am in, C-c a opens the agenda on the right window, pushing my org file into the left window. Is it possible to have the agenda open into ...
2
votes
0answers
223 views

ECB - avoid opening new windows

I use Emacs for programming and I have ECB; this package works very well for me except with some commands; the problem arises when a command tries to show its result in another window (e.g. rtags's ...
2
votes
0answers
328 views

How do I use split-window-sensibly with ediff-setup-windows-plain together?

I want ediff to use split-window-sensibly so it will stack the diffs on top/bottom when the window is narrow, but side-by-side when the window is wide. I'd like to use a single frame instead of the ...
2
votes
2answers
360 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
47 views

How to make find-file-other-window reuse existing window

Is it possible to make find-file-other-window open the file in a pre-existing window instead of creating a new one? Currently: |A---|B---| |A-|C-|B---| |----|----| -> ...
1
vote
0answers
35 views

elisp: create window layout with specific cycling order

I'd like to create a window layout like so: -----------|-------------- a | b -----------|-------------- d | c -----------|-------------- This is so that I can cycle from a ->...
1
vote
0answers
39 views

Value for `(window-start)` is wrong?

I use the ace-window package to move focus from one Emacs window to another. It uses the built-in function window-start to decide where to place an overlay that contains a number I would type to jump ...
1
vote
1answer
77 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 ...
1
vote
0answers
22 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 ...
1
vote
0answers
30 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
0answers
34 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
196 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. ...
1
vote
0answers
86 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 ...
1
vote
0answers
98 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
0answers
238 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?
1
vote
0answers
64 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?
1
vote
0answers
41 views

Calling `doc-view-goto-page` in other buffer

I'm trying to control paging of a PDF file in doc-view mode. Say we have the following snippet (let ((origin-frame (window-frame))) (with-selected-frame (make-frame-command) (let ((pdf-buffer (...
1
vote
0answers
457 views

Setting up an maintaining my window layout

I'd like to have my Emacs frame setup with a neotree window on the left, my active source code or text file taking up the majority of window's space. I'd like to have Emacs put virtually all other ...
1
vote
0answers
63 views

How to trigger function on particularly named buffer creation?

How does one trigger a function to run when a buffer of a particular name is created? My use case is connecting to freenode with ERC for Emacs related channels. I manually call a function to create a ...
1
vote
0answers
380 views

emacs lucid vs. gtk and -iconic -xrm

The emacs command from emacs23-lucid under wheezy honors the -iconic -xrm '*iconX: 3350' -xrm '*iconY: 300' -xrm '*bitmapIcon: off' command-line arguments. But emacs from emacs24-gtk under jessie ...
1
vote
0answers
202 views

Emacs window configuration like awesome wm

Does there exist anything like awesomewm window configurations in emacs? For example, having custom layouts for two windows, maybe 1, 2, and 3, the first being even vertical split, the second even ...
1
vote
0answers
91 views

Why doesn't desktop-save-mode persist neotree?

Desktop-save-mode seems to save all windows except neotree - When I restart emacs, the neotree window is always gone. Why is this window different from the others? Is it possible for neotree's state ...
1
vote
0answers
171 views

Emacs doesn't understand where the windows are?

This has occurred several times now. I will have an Emacs session (24.5.1, OSX UI version installed via homebrew) running for a while when suddenly it no longer seems to understand how to navigate ...
1
vote
0answers
225 views

Define key chords for windmove

I'm following info found on this link, but cannot get the desired custom key bindings to work for windmove. Basically, I put the following in my .emacs file: (global-set-key (kbd "C-M-<left>") ...
1
vote
0answers
69 views

Add commands after custom LaTeX split window view

I use (setq TeX-view-program-list (quote (("Emacs" "emacsclient -e '(split-window-horizontally 88) 'emacsclient -e '(other-window 1)'; emacsclient %o;")))) (setq TeX-view-program-selection (quote (((...
1
vote
0answers
224 views

How to avoid window scrolling after completion list shows up in company-mode?

When I'm editing a file, if the completion list shows up, the text in the current window will always jump (sometime it will jump a few lines but mostly it will jump to the top of the window), after ...
1
vote
0answers
220 views

emacs gdb *gud* “window” undisplayed/deleted after command

(Manually moved by copy/pasting from this Unix SE deleted question) I'm debugging my MELT monitor, in relation with MELT (a domain specific language & meta-plugin to extend & customize the ...
0
votes
0answers
83 views

How to make ibuffer open the selected buffer in the most recently selected window?

I use ibuffer-sidebar-mode and when you are on a file buffer name in it and hit enter, I am not sure how it decides where to open that buffer if the rest of the window is split in multiple buffers. I ...
0
votes
0answers
51 views

How to keep a high-level window configuration?

I use Emacs as a single maximized frame. The monitor is wide enough for two windows to sit together there, with a vertical split. I want this window configuration to be permanent, i.e.: I want it to ...