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
17 views

How can I open WoMan's pages from bash?

I first tried emacsclient -t -e '(woman "sox")', but it opens the WoMan's buffer as a popup: Then I tried emacsclient -t -e '(woman "sox") (spacemacs/toggle-maximize-buffer) (sleep-for 3) (delete-...
0
votes
1answer
42 views

elisp debugger jumping windows around

I'm trying to use the built-in elisp debugger, invoked by debug, and read the source code at the same time. Unfortunately, whenever I continue execution, with either c or d, the debugger jumps around ...
3
votes
0answers
75 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? +------------------+-----------+ | | ...
0
votes
0answers
9 views

Split frame as 2×2 max, with horizontal priority

Well, this is another window configuration question, and I feel like I'm totally missing the point. I have been spending the last couple of hours messing with split-height-threshold, split-width-...
1
vote
0answers
22 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
1answer
50 views

How to return focus to dired window after killing buffer opened from dired?

Sometimes I use dired to view or edit several files in one folder, one after the other. Dired is open in one window, and I open the files in another window by typing o in dired. When I finish with one ...
1
vote
1answer
49 views

How can I create a window that can't be closed?

I create a window with the following (setq ook-window (display-buffer-in-side-window buffer '((side . bottom)))) (set-window-dedicated-p ook-window t) But then when I go to the main window and ...
1
vote
0answers
22 views

Getting a sorted window list

(window-list) returns a list of visible windows. Is it possible to get this list sorted from the most recently active window to the least?
0
votes
1answer
44 views

Switching directly to a certain window

If I have 3 windows beside each other, can I switch to any one of them without having to look for the cursor first (so I know whether to press C-x o once or twice)? Is there, for example, or could I ...
0
votes
0answers
21 views

pop-to-buffer: Wrong type argument: window-valid-p, #<window 117>PNG warning: Interlace handling should be turned on when using png_read_image

I occasionally run into the following error when opening a new file with projectile: pop-to-buffer: Wrong type argument: window-valid-p, #<window 117>PNG warning: Interlace handling should be ...
1
vote
2answers
26 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
0answers
40 views

macOS-like look and behavior on Linux [closed]

I would like to get macOS-like look and behavior on Linux, e.g. global(app) menu, no border on the top of Emacs window etc. I don't care about fancy icons and themes, but these two features are key ...
2
votes
1answer
58 views

If start with maximized frame, why do windows open top &bottom, not side by side?

I have the following in my .emacs: (add-to-list 'default-frame-alist '(fullscreen . maximized)) And (add-hook 'window-setup-hook (lambda () (find-file "FILE.org") (shell))) ...
1
vote
1answer
47 views

Edit with Emacs chrome extension closing windows

I have the edit with emacs chrome extension. I have emacs open in one frame with multiple windows on different buffers open. When I am in chrome and focused on a text box I press Alt-Enter. This ...
1
vote
0answers
29 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 ->...
2
votes
2answers
79 views

How to make M-x ansi-term behave like M-x shell (opening in new window)?

I use (global-set-key (kbd "C-c a") '(lambda () (interactive) (ansi-term "/bin/bash"))) to open a bash ansi-term. Unlike M-x shell, this "occupies" the whole buffer/frame. I am wondering if one ...
4
votes
1answer
88 views

Toggle window scroll bar

It's not clear to me how to disable a window scroll bar. I have frame scrollbars turned off: (scroll-bar-mode -1) I can enable a window scroll bar with (set-window-scroll-bars (selected-window) ...
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
23 views

how to debug frame updating in emacs [closed]

I've noticed that the more frames i have open the slower any one frame becomes. This is a big problem over an exported X session. Ive noticed that compiling with some X-toolkits (GTK in particualar) ...
1
vote
1answer
35 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
49 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
101 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
92 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
91 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
20 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
20 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
36 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
28 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 ...
2
votes
1answer
67 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
82 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
2answers
195 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
60 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
93 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
65 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
31 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
126 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
26 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
32 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
30 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
48 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
100 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
25 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
66 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
52 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 ...
3
votes
1answer
203 views

How to force new `shell` to appear in current window?

Whenever I run M-x shell, a buffer appears almost randomly somewhere - splitting current windows as it sees fit. I cannot work out the logic behind it. The docstring says: (shell &optional ...
1
vote
1answer
48 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
63 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
89 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
171 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. ...