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
2 answers
41 views

Why does this `display-buffer-alist` rule not do what I expect?

I have the following in the display-buffer-alist list: (("*" (display-buffer-in-side-window ((side . left) (window-width . 110))))) While display-buffer-overriding-...
user avatar
1 vote
1 answer
20 views

How do I make Magit use the active window for operations and, on-exit, return the window to the previous buffer?

I am a recent newcomer to emacs, and I have my screen split into 4 windows in a grid arrangement. I'm having some problems using Magit, which is that it spawns (seemingly arbitrarily) in one of the 4 ...
user avatar
0 votes
0 answers
32 views

How can I keep windows from being shrunk past their fill-columns?

Typically I have two windows, left and right, with the left window (call it the "editing window") showing a buffer in a prog-mode or text-mode and the right window (call it the "...
user avatar
0 votes
0 answers
18 views

How to position ESS windows in doom-emacs similar to Rstudio?

I'm trying to pass my R coding workflow to Emacs, but I'm not completely satisfied with the windows' layout. The basic layout to start should be the classic's Rstudio layout. In the ESS manual they ...
user avatar
2 votes
3 answers
85 views

How can I quit windows like *Help* and *Messages* without first selecting them?

I find myself running C-h k/f/v and after reading the popup that's in the other window, going to that window and closing it. Is there a way to streamline that process a bit more (maybe adding a hook ...
user avatar
  • 892
0 votes
0 answers
11 views

display-buffer-reuse-frames with server-mode

I have been using display-buffer-reuse-frames for a long time. It works fine when creating multiple frames with X11, or MS-Windows. Today I was using emacs via ssh. So I tried to use this feature, ...
user avatar
2 votes
1 answer
29 views

How to hide comments and move them to a separate window?

I'm interested in hiding comments in code or structured text, but displaying them in another window; i.e. same buffer, two windows side-by-side, one showing the main text (code, or content), but ...
user avatar
  • 197
0 votes
1 answer
35 views

How can I check whether the current buffer is an eshell buffer?

I'm trying to write a function which opens or closes an eshell window. So far I have: (defun bottom-window-eshell() (interactive) (let ((buf (eshell))) (switch-to-buffer (other-...
user avatar
1 vote
1 answer
39 views

How to get the width of the window without line numbers? (or other content in the fringe)?

The result of window-body-width doesn't change when display-line-number-mode is enabled / disabled. How can I get the window width but excluding the fringe?
user avatar
  • 7,069
2 votes
1 answer
102 views

Move the fringe indicators close to the window text

When I use olivetti-mode I'd like to have grey margins and the fringe indicators close to the window text, like in this picture: The problem is that when the fringes are wide the indicators end up ...
user avatar
  • 1,392
0 votes
0 answers
28 views

How to setup GTK emacs to open files in its current instance instead of opening a popup window?

Spent a lot of time on this and tried various solutions on the internet. Please help. Using the following emacs version. Want to run it in GUI mode on an Ubuntu 20.04 server, same issue happens on ...
user avatar
  • 1
1 vote
1 answer
61 views

How to know what part of the file is currently displayed in a window?

Essentially, is there a function in Emacs like text-currently-displayed-in-window --> returns two integer The integers represents the position interval that is currently being displayed on screen ...
user avatar
  • 37
3 votes
1 answer
57 views

How to get a window in a corner of the frame

Is there a built-in function to return a window in a particular corner of a frame (e.g., lower-left, upper-left, upper-right, lower-right). The following is a first draft to locate the lower-left ...
user avatar
  • 17.6k
1 vote
1 answer
37 views

How to resize the bottom mini window?

What I did was I installed the fresh spacemacs I added org and osx layer I used the doom-1337 theme C-c a to select agenda commands Then, the bottom letters are barely seen as the mode-line height ...
user avatar
1 vote
1 answer
31 views

Display attachment to mu4e message (a PDF) in the same window rather than new frame

I am using mu4e and pdf-tools. Whenever I go to open an attached pdf (e.g., with gnus-article-press-button) the attachment pops open in a new frame. How can I control where it pops up? Looking at that ...
user avatar
  • 155
2 votes
1 answer
34 views

How to switch windows to specific visible buffer?

Is there a command that allows me to have my cursor switch windows to a specified buffer? Something that looks like (switch-to-specific-window-command "buffer-name")
user avatar
  • 288
2 votes
1 answer
85 views

Shift+Ctrl+arrow to enlarge and shrink windows does not work in org-mode

Similarly to what is described here, org-mode overrides C-S-<arrow> key-binds which, in order to control the size of the windows, I have defined as follows: (global-set-key (kbd "S-C-<...
user avatar
2 votes
1 answer
65 views

Can window-height be ignored in display-buffer-alist after initial creation?

Currently I'm using the following display-buffer-alist, which works fine but resets the size on opening a new window. Is there a way to only use the window-height when first creating the window? After ...
user avatar
  • 7,069
0 votes
1 answer
44 views

How to display the minibuffer above candidates in helm

I am looking for configuration that displays the minibuffer in which to type input above matching candidates in a helm buffer. I went through each helm variable and the closest named variable was helm-...
user avatar
0 votes
0 answers
17 views

Close buffer switching to next buffer without leaving or closing the window

I am using the Emacs-terms here. I want to close the current file/buffer. But I do not want to leaver or close the current emacs-window. In the current window there should just appear the next open ...
user avatar
  • 499
1 vote
1 answer
31 views

How can Elisp code determine the previously selected window?

I would like to implement an interactive function that, in the "canonical" case, selects the window that was selected before the currently selected one1. But my plan founders immediately on ...
user avatar
  • 2,889
0 votes
1 answer
20 views

Flatten parallel nested window trees

Sometimes when moving windows around in emacs, it will get to a state where there is a horizontal or vertical stack of windows which appears to be a single list, but is actually made up of multiple ...
user avatar
0 votes
0 answers
9 views

How to open `helm-all-mark-rings` in split window, while keep `helm-for-files` to open in same window

helm-for-files opens in full buffer, which I wanted to see it in full window (same window). I believe it is opening in full window is due to following lines according to How to configure a command to ...
user avatar
  • 1,102
0 votes
1 answer
35 views

In Magit, the command `magit-status` opens the buffer with the status buffer. Is there some similar command to do the same but with the Slime's REPL?

I am using Emacs powered with Slime to write code on Common Lisp (SBCL). In addition, I am also using magit. Magit has a handy command called magit-status (C-x g). I use it a lot and I tend to have 2 ...
user avatar
0 votes
0 answers
40 views

Treemacs and Transpose-Frame issue

I use treemacs to navigate files and functions, open in a panel to the left (window 1). I also like the transpose frame package functions to change the orientation of windows, however this doesn't ...
user avatar
  • 150
3 votes
1 answer
222 views

How to automatically downscale an image to window width in org-mode?

I use org-toggle-inline-images to directly view linked images in org-mode files. Unfortunately, depending on resolution, format and size, images often are too wide for the window (especially in ...
user avatar
  • 1,419
1 vote
1 answer
61 views

How to dynamically replace certain text, by evaluating a function on change in current buffer

I am trying to figure out how to use window-change-functions refer here for official documentation to be able to run a function to replace certain text within the current buffer at every change of the ...
user avatar
0 votes
1 answer
37 views

windmove doesn't recognize S-<up> and S-<down> on Macbook Air

GNU Emacs 27.2 in Mac OS terminal (11.4 Big Sur). Started with (windmove-default-keybindings) and found that S-<up> and S-<down> behaved just as <up> and <down>, as if the ...
user avatar
1 vote
2 answers
112 views

Dired: How to open file with ace-window while keeping focus on dired buffer?

I have this Elisp code that allows me to use ace-window to open a file in a selected window from Dired: (defun find-file-dired-ace-window () "Use ace window to select a window for opening a ...
user avatar
1 vote
1 answer
129 views

Is it possible to open Deft in a sidebar?

I'm trying to open Deft in the left sidebar using this code: (setq display-buffer-alist '(("*Deft*" (display-buffer-in-side-window) (window-width . 0.25) ...
user avatar
1 vote
2 answers
273 views

Don't replace my buffers with *warnings* or *message* buffers?

Current behavior: Emacs replaces one of my buffers with *warnings* or *messages* if I have multiple buffers open. However Emacs creates a new buffer and displays *warnings* or *messages* if I have ...
user avatar
0 votes
0 answers
45 views

Split window horizontally when calling switch-to-buffer-other-window the first time

When calling switch-to-buffer-other-window interactive function the first time, the window is split horizontally. I would like the window to split vertically instead of horizontally by default. Is it ...
user avatar
  • 1,989
0 votes
2 answers
68 views

Switch to the most recently selected buffer in the current window

I am looking for a command that would switch to the buffer I most recently selected in the current window. The command mode-line-other-buffer will switch to the most recently selected buffer not ...
user avatar
  • 166
1 vote
1 answer
134 views

How to switch to `flycheck-list-errors` buffer/window/minibuffer?

For starters I use Doom Emacs. Here's the scenario: I have a python/perl/js buffer and flycheck-mode activated. Flycheck does its job and tells me that there are some errors that need attention. I go ...
user avatar
  • 11
0 votes
0 answers
44 views

How to use C-j C-k to move window in term mode using evil?

The bindings of C-j C-k to evil-window-down[up] work well every where apart form term mode. term mode rebinds these to C-w j C-w k - this is super annoying! How can i make term use the C-j/C-k ...
user avatar
  • 101
0 votes
0 answers
22 views

How can i set the same file in org-mode to update only headings in one window and open headings on the other window? [duplicate]

I'd like to set a list of headings on one window and write on the other, is is possible?
user avatar
3 votes
1 answer
1k views

Why do many buffer switching commands in Doom Emacs skip over buffers that aren't visiting files? How can it be prevented?

In Doom Emacs many commands that replace the buffer in the current window with a different buffer will automatically select the most recent buffer that you have had open in a window. But buffers that ...
user avatar
1 vote
1 answer
54 views

How to distinguish a scroll from a change of buffer in a function called from ‘window-scroll-functions’?

I've written a function that recenters the point each time it makes a long jump and I added it to the hook window-scroll-functions. The length of the jump is determined by comparing the return value ...
user avatar
  • 1,392
0 votes
1 answer
29 views

Delete single window frame after app quits

Some of the apps (w3m, elfeed, mu4e, to name a few) when quit leave unused frame so the other buffer shows up in their place. Over time these redundant frames pile up, so we have to delete them. I ...
user avatar
  • 592
2 votes
2 answers
65 views

How to make the current window display the buffer it was displaying before the current one?

For example, imagine I have two windows and three buffers. Both windows are displaying buffer 1 and I do the following, in window 1, switch to buffer 2; in window 2, switch to buffer 3, then to ...
user avatar
  • 1,392
1 vote
0 answers
69 views

Workaround bug#45038: 27.1; blank display

My setup: Emacs 27.1 under Ubuntu 20.04 from Kevin Kelley's PPA, and configured to use ligatures with the JetBrains Mono fonts, as described here. I experiencing Bug#45038 27.1; blank display, or ...
user avatar
  • 375
0 votes
1 answer
25 views

Let-bind diplayed windows and their size/posizion

Can I let-bind diplayed windows and their size/posizion? Is there a variable that stores these infos? I need to run a script that will change the diplayed windows, opening some help temp buffers. At ...
user avatar
1 vote
2 answers
38 views

How can I display a buffer in a whole frame, removing the rest in the act?

Basically that. I need a function that would do this when I open a buffer in a frame with many other windows. Maybe Emacs has one by default.
user avatar
0 votes
2 answers
69 views

Open clickable filenames in the same help buffer

I looking for simple solution to open clickable filenames in the same help buffers. For example, when we display help for add-to-list variable and click TAB the cursor is placed on the subr.el file ...
user avatar
  • 592
4 votes
1 answer
124 views

How do I focus the Man mode window when it is displayed?

When I open a man page (e.g. M-x man cat) I would like to automatically move my cursor onto the man page. I already know how to achieve this behavior for *Help* and *Apropos*, and I want to get the ...
user avatar
  • 553
2 votes
1 answer
60 views

Like pressing "q", but from the other window

I run a command that takes over another window, and maybe resizes it a little, but doesn't focus it. Let's say C-h e or C-x C-b. I can go to that window and press q there, and everything goes back to ...
user avatar
  • 563
1 vote
0 answers
69 views

Activate a mode when only one window is displayed

I'm trying to enable/disable visual-fill-column when there is one window/multiple windows. Since I don't like trying it on my own before asking, here is the solution I came up with: (defun my-visual-...
user avatar
  • 143
3 votes
2 answers
601 views

Open org link in the same window

When I follow from one Org file to another via a link, the new file appears in alternative window if there is one. Is there a way to follow links staying in the same window? For example, I use a frame ...
user avatar
1 vote
0 answers
26 views

How to show all split window titles in the X11 window title?

If I split an Emacs frame (one X11 window) into multiple Emacs windows (with C-x 2 and C-x 3) and open different Emacs buffers in different Emacs windows, Emacs frame title (X11 window title) displays ...
user avatar
  • 111
0 votes
1 answer
63 views

How do I specify the window height of the Python interpreter?

Suppose I am editing a file in python-mode. If I start the Python interpreter using M-x run-python (or C-c C-p), the Python interpreter opens in a window (*Python*) in the bottom half of the frame. ...
user avatar
  • 553

1
2 3 4 5
8