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

Receive windows manager notifications of display changes

Is there a way for emacs to receive display changes notification from the windows manager? I understand this might be an OS dependent question, so I'm particularly interested in the interaction ...
0
votes
0answers
24 views

Disable evil-mode in eshell

I have disabled evil-mode in eshell by (evil-set-initial-state 'eshell-mode 'emacs) but when I switch windows(accidentally) using C-w k from eshell, evil-mode gets enabled. How do I prevent this ...
2
votes
0answers
28 views

Automatically Increase and Decrease Window Size

How do I automatically increase the size of the window when I switch into it and reduce it back to its normal size when I switch out of it? I have a small window at the bottom of my screen. While ...
0
votes
1answer
21 views

Controlling Behaviour of (Compilation) Window Creation

How do I control whether the output buffer *Compile* of M-x compile will be shown in an existing window or in a new window by splitting an existing window ? My problem is that the compilation buffer ...
0
votes
0answers
24 views

helm-ag (or equivalent) open selection in existing window?

If you run helm-ag (I typically do this with helm-projectile-ag, but I think it should be similar) and select a match, the file / buffer opens in the last used window. My question is this: If a you ...
0
votes
0answers
13 views

Helm gtags dwim jump without overwrite current window

So, I have 2 files: tictactoe.cpp and tictactoe.h. You can see the image for these two files below in Emacs. I have them stacked horizontally and also have tabbar to show the name of the files I have ...
3
votes
1answer
129 views

Can't get rid of scratch buffer at startup for Emacs 26.3

I am using GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29. In my .emacs I specifically asked not to show the startup screen or buffer *scratch*: (custom-set-variables '(inhibit-startup-...
0
votes
0answers
24 views

How to move point to the vertical center of the window when I use `C-u C-SPC`?

I am using following answer to jump to the previous jumped point and I also use C-u C-SPC as well. (defun alt-exchange-point-and-mark (&optional arg) (interactive"P") (...
0
votes
0answers
28 views

Start Emacs with gdb with a different main source file

I often run Gdb in a dedicated Emacs session. I have code to run gdb when Emacs start and set up Many-Windows mode. For one particular project, there are many programs, all written in C, that share a ...
0
votes
1answer
21 views

How can I split a window so that the cursor ends up in the right / lower window?

The functions I have found for splitting windows are (split-window-right) and (split-window-below). When these are evaluated the cursor ends up in the right window in the case of (split-window-right)...
1
vote
2answers
92 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
16 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
22 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
39 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
21 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
18 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 (...
1
vote
1answer
75 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
48 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
51 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
9 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
22 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
65 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
144 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
52 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
44 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
75 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
49 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
33 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
66 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
73 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
38 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
46 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
36 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
28 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
69 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
111 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
57 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
364 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
138 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
109 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
96 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
304 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
44 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 ...
1
vote
1answer
54 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
293 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? +------------------+-----------+ | | ...
2
votes
0answers
89 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
73 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
68 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
64 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
2 3 4 5
7