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
1answer
88 views

Customize Split-window-below - C x 2

C-x 2 On Split-window-below, 1) i like the cursor/point to be in the other window (newly opened) and not in present window. 2) instead of loading in the current-buffer in the other window, i ...
7
votes
3answers
929 views

Set windows layout by a function

We all use multi-windows in Emacs, and for some projects, I developed a habit of using four windows, one each for a different buffer. I wonder if I can define a function and when I start to work in ...
4
votes
1answer
613 views

Add window to the right of two horizontally split windows

Following scenario: 1) I start emacs and the initial frame is as follow: +---------------+ | | | | | | | | | | +---------------+ ...
4
votes
3answers
240 views

How to scroll another buffer while in minibuffer?

I'll describe what I'm doing currently to get an issue. First, I store the current buffer. M-: eval-expression (setq bb (current-buffer)) Then, M-: (with-current-buffer bb (insert "foo")) While ...
1
vote
2answers
288 views

What's a good workflow for having a few dedicated shell sessions?

At present I use a screen session in the terminal (outside of emacs), with window 0 devoted to running my web server, window 1 to running tests, and window 2 for general hacking. I like this flow and ...
9
votes
2answers
2k views

Single mode line for all windows

Is it possible to have only one mode line (sometimes referred as "statusbar") for all windows? I'd like to make this single mode line show information about the currently selected buffer.
7
votes
1answer
413 views

Pick a window for ido-find-file-other-window and ido-switch-buffer-other-window

Thanks to @itsjeyd, I've come to love ace-window, but now I want more. I use C-x 4 f and C-x 4 b to invoke the commands ido-find-file-other-window and ido-switch-buffer-other-window, but I want to ...
2
votes
1answer
298 views

helm-project-switch-project in other window

Often i have a need to open a file from the other projectile-based project in another window. I'm using helm with projectile, so there's a function helm-projectile-switch-project (which i guess by ...
6
votes
0answers
562 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-...
5
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 ...
2
votes
1answer
2k views

sr-speedbar width size options on start not working

By default, sr-speedbar seems to always want to take 50% of available window space. I'm trying to change it's default size to something smaller (like 40 px), but I can't seem to figure out how as ...
2
votes
1answer
234 views

Sharing *compilation* window with other compilation-like commands

Is it possible to make a few different commands share a window for their output? For example, let's say I do M-x compile and get a *compilation* buffer in bottom half of my frame. If I then do M-x ack ...
0
votes
1answer
72 views

Query dimensions of main window

I am trying to setup my init files, and want a special set of dimensions for my main Emacs window. If I place my window wherever I want it, is there a way of querying Emacs as to the main window ...
4
votes
2answers
111 views

How to toggle between previous buffer in a given window (e.g toggle-previous-buffer-in-window)?

How can I make Emacs toggle between the previous buffer within a single window (e.g. ignoring buffer changes in other windows)?
5
votes
4answers
400 views

Define a main window and then close all others

With the way I work, I often just want one window (what's showing my code). Now several things (like opening help) open another window. That's fine, but when I'm finished I just want all windows ...
4
votes
2answers
451 views

Is there a generic toggle-previous-window function?

Some major modes have code and key-bindings to toggle focus back and forth between their inferior processes and the major-mode buffer. Is there an Emacs function which lets me do this between the ...
6
votes
2answers
902 views

Preventing mouse clicks in inactive windows from repositioning the cursor

When I have Emacs (24.4, Mac OS, NS build) in the foreground, I often have many windows open in one frame. I sometimes want to switch windows by clicking in an inactive window. By default, this calls ...
0
votes
2answers
587 views

Nice TTY window borders in 24.4

I've seen snippets like this: (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?┃)) That claim to make emacs use a prettier window divider character. However, ...
4
votes
1answer
2k views

Managing multiple windows and buffers?

Is there a good way to manage multiple windows in a large frame? I usually have one large frame, split into many windows, and I find that when I (or some command) visits a buffer, the choice of ...
0
votes
1answer
45 views

How to set the y-coordinate (in pixels) of the current line

I want to scroll the buffer so that the the current line is, say, 300 pixels from the beginning of the window. Something like this: . \ . | (300 pixels) . / | <-- (current line) Any ideas? ...
4
votes
1answer
1k views

Open a file from the desktop in a single window (without home screen splitscreen)

When I open a file from the context menu by choosing "Open with Emacs", Emacs starts with a horizontal splitscreen. The first window shows the desired file and the other one the home screen. Is it ...
1
vote
0answers
248 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 ...
14
votes
2answers
1k views

“Pop” a window into a frame

Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a ...
3
votes
1answer
348 views

Prevent buffer from being displayed

How do you tell display-buffer-alist to not display a buffer whose name has a particular string in it? The "Display Action Functions" documentation mentions display-buffer-no-window. However, I don't ...
9
votes
1answer
7k views

How can I prevent GNU Emacs from splitting windows on startup?

Whenever I try to open an existing file with GNU Emacs, the window always split horizontally so as to show two buffers: one buffer containing the file and the GNU Emacs buffer. How can I set up Emacs ...
7
votes
1answer
958 views

How to set up Emacs to never split windows?

I want to try a new workflow where split windows only happen if I request them, otherwise Emacs simply changes windows. I tried putting this command in my init.el: (setq pop-up-windows nil) And it ...
21
votes
2answers
335 views

Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all ...
9
votes
4answers
1k views

Async shell process buffer always clobbers window arrangement

I frequently launch external programs from emacs using M-!, such as Firefox or Evince, etc. Whenever I do, a buffer pops up full of results for the process, which clobbers whatever else I've got going ...
2
votes
1answer
109 views

Could ediff-buffers re-use the current window configuration?

For instance, say that I have a two-window vertical split. If I call ediff-buffers from the right window, it will swap the right and the left window for the diff, and even leave it like that ...
39
votes
3answers
9k views

How to change Emacs windows from vertical split to horizontal split?

Window A ++++++++ Window B Is there a way to switch to Window A : Window B Is there a way to switch view without closing windows?
1
vote
0answers
224 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 ...
2
votes
1answer
396 views

Centering text in emacs window is unresponsive

On this site i found a very nice snippet of code to center a textblock of fixed width in my frame https://stackoverflow.com/a/23731757/4310112 The idea is that whenever the window size is change, the ...
6
votes
2answers
194 views

How to move point to new window, within a function?

I'm trying to write a simple function to divide the Emacs frame into four quadrants. Once I get the splitting to work, each window will have Dired for a different directory. The splitting isn't ...
6
votes
1answer
101 views

How to preserve the visual height of the cursor after an operation?

Q: How do I find the visual line number of point (so that I can restore it after an operation)? By “visual line number”, I'm referring to the number N of lines between the top of the window (or the ...
6
votes
1answer
479 views

how to move region to other window?

How can I automatically move selected to the other window? Trying to streamline my split-window workflow. Here's what I have so far. Doesn't work yet. (defun move-region-to-other-window (start end)...
8
votes
2answers
4k views

Splitting windows on startup

How do I split my windows on startup like so: _____________ | A | B | |_____|_____| | C | |___________|
5
votes
2answers
197 views

How to ensure lines are always displayed in groups of 3?

I am writing a major-mode which displays a list to the user. It is similar to tabulated-list-mode, except each entry takes up 3 lines, as opposed to just one: 0 0 Ctrl-} key in emacs 5m ...
5
votes
2answers
781 views

How should I dim the header line of inactive windows?

By analogy to the mode-line-inactive face, I'd like to dim the header line for inactive windows. But I can't find a "header-line-inactive" face, nor can I find an appropriate hook to modify. I have ...
1
vote
1answer
371 views

Starting SLIME in a pop-up frame

Whenever I currently do M-x slime, it creates a split buffer, with SLIME going in the bottom half. This is not really very desirable - I'd much rather SLIME appeared in a separate frame, and kept its ...
4
votes
1answer
310 views

How can I rotate window configurations among frames?

At work, I have a dual-monitor setup and, naturally, both of them are fullscreened to emacs. I have bindings to switch between the two frames with other-frame, but sometimes I just want particular ...
10
votes
1answer
2k views

How to count all of the windows in a frame?

Just as the question stated, I would like a function that would count of the windows that are currently being shown in that frame. So this: +--------------+-------------+ | | ...
109
votes
13answers
62k views

How to switch between windows quickly?

How do I switch between windows quickly? I often have multiple windows open and need to switch between them. Right now, I use C-x o to get to the one I want. Is there a more efficient workflow ...
5
votes
1answer
249 views

How to shift vertical column of windows left and right in a frame?

Q: how can I shift a window column left and right in a frame? I use a single frame with multiple windows side-by-side. Usually each window takes up the full height of the frame, but occasionally, ...
6
votes
1answer
975 views

Make emacsclient open multiple files in separate windows

When I open multiple files at once with emacs, like emacs file1 file2, it opens the two files side-by-side (in different windows in the same frame). But when I do the same with emacsclient, it only ...
6
votes
3answers
236 views

Creating function to move top-buffer to other window

TL;DR: Any suggestions as to what function(s) can help me restore (to any given window) the buffer that was visible most recently? It's important that the currently visible buffer is not killed, just ...
28
votes
6answers
8k views

Switching between window layouts

When I configure a custom layout and then just need to temporary look into one file fullscreen and once I want that layout back - I need manually to reflow it. I would like a plugin/elisp code to ...
10
votes
2answers
3k views

How to get org-agenda to prefer split-window-right

After upgrading to Emacs 24.4.1, when I call org-agenda with no splits it will show on the bottom half of the frame. Previously, it would show on the right half. How do I configure this behaviour?
14
votes
2answers
3k views

Moving the mode line and minibuffer to the top

Is there any way I can move the mode line and the minibuffer from the bottom to the top of the screen? The minibuffer is covered by the previous question How to display the content of minibuffer in ...
4
votes
3answers
472 views

How to show the sticky(lock) window status in the mode line?

I got the following snippet in my init.el: (define-minor-mode sticky-buffer-mode "Make the current window always display this buffer." nil " locked" nil (set-window-dedicated-p (selected-window)...
7
votes
2answers
901 views

Hook that indicates when the cursor has been moved by scrolling

Inspired by this question: Let Emacs move the cursor off-screen, I am considering writing a minor mode that will keep the cursor in a fixed position that is not affected by scrolling operations. I ...

1
4 5 6
7
8