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

how can I re-use the window created by `display-buffer-in-side-window`?

I'm creating a window at the bottom of the frame with display-buffer-in-side-window and it displays a given buffer, I would like to have another buffer created but re-use that exact same window. How ...
0
votes
1answer
28 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 ...
3
votes
2answers
47 views

Reference a window with a designated name

I list the current windows with #+begin_src emacs-lisp :tangle yes (window-list) #+end_src #+RESULTS: | #<window 14 on 28.Windows.org> | #<window 3 on .emacs.d> | Then I tried to ...
0
votes
1answer
28 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
1answer
19 views

Get window-total-width in another font

(window-total-width) returns the number of columns (characters) that fit in the current window (https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Sizes.html). This will take the current ...
0
votes
0answers
24 views

disable syntax highlight on inactive windows

I got the following code for highlighting inactive and active windows with different background color. How do I make so that inactive windows have no syntax highlighting, only the active window has? ...
3
votes
5answers
63 views

Manually close a (compilation) window that was most recently opened by running e.g. 'grep'

I'm trying to find a way to quickly close the window that I just created by running 'grep' (i.e. a kind of compilation window). I'd like the solution to be independent of my current window layout and ...
1
vote
1answer
28 views

How to prevent the completion window from hogging up nearly whole frame (-3 lines)?

One or the other of the various Emacsen has been, at different times, my one and only editor on all *nix systems¹. I usually use one X window per buffer, so I can arrange windows side by side, or use ...
3
votes
1answer
42 views

How to leave mark region highlighted when switching windows

I usually have my Emacs frame split into windows. I'll select something in one window and then switch to another buffer. When I do this Emacs removes the active-region highlghting in the original ...
1
vote
1answer
29 views

Ispell suggested word window too small

When I use ispell, it suggests replacements for misspelled words in a window at the top of the screen. However, it is too small, and I can barely read the words it contains. How do I increase the ...
1
vote
1answer
22 views

Restore after `maximize-window`

If I have multiple windows open, I can maximize one using M-x maximize-window. How should I restore the windows to their original size?
1
vote
1answer
32 views

How to stop (aquamacs) emacs opening all new buffers in new (gui) window/emacs frame?

I've just upgraded my aquamacs installation and a bunch of packages, and now emacs is opening every new buffer in a new (gui) window (aka emacs frame). I don't like this. I want to have every buffer ...
0
votes
0answers
94 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
53 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 ...
1
vote
1answer
201 views

How can I make emacsclient use an existing window in the current frame?

I'm on MS Windows, if that makes a difference. My desired behavior: There is only one frame visible at any time. Visiting a file should use an existing window in that frame. (This is the default ...
0
votes
1answer
66 views

Multiple initial buffers in different windows

I have Emacs set up to open an initial org mode buffer on startup by (setq initial-buffer-choice "~/Directory/Subdirectory/inital_buffer1.org") Ideally on start up, I would like to open 2 buffers in ...
2
votes
1answer
88 views

Why can't I resize my windows to be the same width?

When I split windows using SPC-w / then my windows are created with different widths. I want them to split in half. I can't resize it by dragging it nor by using the shortcuts. I downloaded emacs ...
5
votes
3answers
83 views

Sending `C-c C-c` to the process window without swithcing to it

In ESS mode, I sometimes send some code to the process buffer and want to cancel it using C-c C-c. Can I do this without actually switching to the process window from the script window?
6
votes
3answers
291 views

Is there a way to make the “o” keypress of other-window <C-x><C-o> repeatable?

Question is as stated in the title. Instead of using various packages for switching windows, it might be simpler to make <C-x><C-o> behave like <C-x><C-+>, such that repeated ...
0
votes
0answers
32 views

Tabs on windows with custom buffers

I am new to Emacs and I am trying to set up a decent workflow for projects I already have. What I want to do is to be able to have tabs of buffers on each window (not frame). What I want ...
0
votes
0answers
38 views

Is there a way to split-window-right and switch-to-buffer / find-file in single command?

As described in question title. Closest solution that I can find is to use ido-find-file-other-window orido-switch-buffer-other-windew, but these create a horizontal split by default, and if a ...
0
votes
0answers
32 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-...
1
vote
1answer
49 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
190 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
16 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
55 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
64 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
55 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 ...
2
votes
1answer
53 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
47 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 ...
1
vote
0answers
53 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
36 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
42 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
69 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
65 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
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 ->...
2
votes
2answers
226 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
133 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
26 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
78 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
87 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
273 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
192 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
143 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
24 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
1answer
77 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
47 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
70 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 | --------- ...

1
2 3 4 5
7