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
1
vote
2answers
77 views

Show only one or two lines of a buffer

I need to check numbers in a buffer each on a line against an external paper sheet To make this easier I would like to make the window very narrow to see only one (or max. two) lines. However shrink-...
0
votes
0answers
15 views

After query-replace using my-find-files, how to automatically delete-other-windows?

I am following answer for Using Emacs to recursively find and replace in text files not already open My setup: (defun my-find-files () (interactive) (find-dired "~/folder" "-name \\*...
0
votes
0answers
17 views

Prefer side-by-side splits over top-bottom splits even when calling `calendar`

From what I understand, Emacs splits windows by first trying a horizontal split and then a vertical split. I'm fine with that behavior, except when in fullscreen mode. I've tried several of the ...
0
votes
1answer
19 views

Prevent other-window from choosing side window

I have recently started using buffer-display-alist to sensibly place windows within a frame. Typically, I'll have one or two windows of code buffers that I actively work in and a bottom "side ...
1
vote
1answer
18 views

magit-diff jumps to insertion/deletion in already opened window (no overlay)

I have 2 windows open: One is the magit-diff of the current repo, the other is just source codes from that repo. In source codes (the right window), I have a file opened, say "sample.txt". In magit-...
0
votes
0answers
13 views

Few settings doesn't work in -no-window mode

I newbee in Emacs, and trying to set up emacs. Well, I've written a init.el file and except few things always work properly. But in -nw mode cursor doesn't work (blink not working), tabs doesn't work (...
0
votes
0answers
21 views

How does windowing system work on MacOS? [migrated]

I'm really interested in computer graphics and I would like to know how windowing and graphics systems work on MacOS. I've started to learn how to create a window in objective-c but then I told myself ...
1
vote
1answer
58 views

How to use a classical development setup (file explorer + code + terminal) in Emacs

I like using the following setup for development: +--------+---------------------------------+ | . | | | | Python or JS | | Dired+ | ...
0
votes
0answers
39 views

Has anyone combined org-sidebar with org-panes? (persistent location & automatically in buffers)

In my ideal world, every org file could automatically open with a small sidebar always showing where I am, similar to how Typora works, which allows you to select other locations to go to. I'm trying ...
2
votes
1answer
42 views

How to close help buffer without moving to it?

I often use Emacs' help buffers, via e.g. C-h k. Buffer *Help* is displayed in another window, and that window is not selected. In order to close the *Help* buffer, I need to switch windows via C-x o ...
0
votes
0answers
8 views

Center the following buffer in next-error-follow-minor-mode

I am using next-error-follow-minor-mode to preview my search results. The problem is that the preview buffer doesn't center around the current line: Related
1
vote
1answer
13 views

How to save and restore the association of a window to buffer across Emacs sessions?

I have a window layout with three windows and I would like Emacs to remember the buffers even if the buffers don't exist after restart. Context: I am using Spacemacs for Clojure development. In ...
1
vote
2answers
63 views

Always show the last lines with a lower indentation than the first line that's visible in a window

I often find myself scrolling up in a code file to see which context I am in (class/method definition, yaml-key, etc). It would be super handy if I could somehow "freeze" the last lines of each ...
0
votes
1answer
77 views

Always open new files in the same window

When I open a file externally - through the terminal or the file manager GUI, it opens in a new window. How can I always open a file in a new buffer of an existing emacs session?
0
votes
0answers
41 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
40 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 ...
4
votes
2answers
69 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
41 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
24 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
46 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
69 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
36 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
45 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
33 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
26 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
48 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
105 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
55 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
277 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
100 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
100 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
86 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
300 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
39 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
49 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
53 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
252 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
18 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-...
2
votes
0answers
82 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
70 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
66 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
59 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
49 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
69 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
42 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
44 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
73 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
71 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
39 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
2 3 4 5
7