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
0 answers
7 views

treemacs window border is drawn over vertico-posframe: how to fix?

I use vertico-posframe to switch buffers. When treemacs is active, the border between the treemacs window and the text window is drawn over posframe with the buffer list: How can I fix this?
1 vote
0 answers
22 views

Why EAF browser is opening outside emacs buffer?

I'm new to emacs, so excuse any naivety that you might see. These are my sys and emacs config. System Version: macOS 12.5 (21G72) GNU Emacs 28.1 I've tried installing eaf and eaf-browser in emacs, i ...
0 votes
0 answers
18 views

emacs edebug change the position of a point in a window based on changing the position of a buffer point

When you debug code that edits the text of a buffer, the window of that editable buffer is open. Interested in consistently displaying the position of a point in this window relative to the buffer ...
  • 59
1 vote
1 answer
26 views

How do I automatically reload my agenda views on window/frame resize?

I've noticed that my agenda views get squashed (line breaks) when my window/frame resizes, e.g. when I move the Emacs frame to a smaller monitor. Is there a way/hook to automatically reload my open ...
  • 13
1 vote
0 answers
40 views

How do I start emacs with two horizontal windows one of which is dired?

How do I write a function and call it in my init script so that when I open a file, I have two horizontal windows, the left one being dired mode and about 25% of the total emacs screen, while the ...
  • 111
1 vote
1 answer
23 views

Resizing window with text scaling

I often have multiple windows in emacs. I would like to have a function that modifies the width of a window to a certain value, then scales the text such that the longest line in the buffer fits the ...
  • 61
1 vote
1 answer
16 views

Is there a library to make `'evil-goto-mark` restore the screen position of the marker?

I use emacs and evil. If I set a marker using 'evil-set-marker, scroll elsewhere in the file, and then execute 'evil-goto-mark or 'evil-goto-mark-line, the window will scroll back until the position I’...
  • 86
0 votes
0 answers
32 views

How to open indirect buffer in specific window

I would like to be able to open an org tree in an indirect buffer inside a specific window. For example, I open an org file in one window, then two new windows with split-window-right / split-window-...
0 votes
2 answers
61 views

DOOM themes: color face for line that divides buffers

I installed Doom themes on my Emacs. I would like to know how to manually change the color face of the vertical line that divides different buffers. By default it has a dark color not very ...
1 vote
1 answer
67 views

How to make :q, in spacemacs' evil mode, kill the buffer and delete the window, but not kill Emacs?

How can I make :q in spacemacs' evil mode, kill the buffer and delete the window, but not kill Emacs? Coming from VI, the habit of closing with :q/:wq or ZZ/ZQ doesn't translate very well into Emacs. ...
0 votes
0 answers
86 views

How to prevent `desktop-save-mode` from opening multiple windows?

I want to restart Emacs at the same cursor position in the file (or buffer) I was just working on. In my Emacs config I have the following code to try and do this: (use-package desktop :straight ...
0 votes
1 answer
31 views

My tiling window manager is crashing with ediff-mode window creation. How to fix it?

I am using Material Shell which is a tiling window manager created as an extension of GNOME Desktop Environment. After an interactive rebase in Magit, a merge conflict happened. Thus, to fix it, I ...
1 vote
2 answers
111 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-...
1 vote
1 answer
23 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 ...
1 vote
1 answer
47 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 "...
0 votes
0 answers
47 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 ...
2 votes
3 answers
95 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 ...
  • 942
0 votes
0 answers
17 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, ...
2 votes
1 answer
32 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 ...
  • 197
0 votes
1 answer
40 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-...
1 vote
1 answer
49 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?
  • 7,421
2 votes
1 answer
128 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 ...
  • 1,414
0 votes
0 answers
43 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 ...
  • 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 ...
  • 37
3 votes
1 answer
65 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 ...
  • 17.9k
1 vote
1 answer
102 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 ...
1 vote
1 answer
43 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 ...
  • 157
2 votes
1 answer
58 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")
  • 288
2 votes
1 answer
96 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-<...
2 votes
1 answer
78 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 ...
  • 7,421
0 votes
3 answers
65 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-...
1 vote
1 answer
34 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 ...
  • 2,951
0 votes
1 answer
25 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 ...
0 votes
1 answer
50 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 ...
3 votes
1 answer
375 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 ...
  • 1,429
1 vote
1 answer
76 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 ...
1 vote
2 answers
95 views

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

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 ...
1 vote
5 answers
169 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 ...
1 vote
1 answer
144 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) ...
1 vote
2 answers
303 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 ...
0 votes
2 answers
105 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 ...
  • 190
1 vote
1 answer
186 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 ...
  • 11
0 votes
0 answers
59 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 ...
  • 101
0 votes
0 answers
23 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?
3 votes
1 answer
2k 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 ...
0 votes
1 answer
120 views

How to run shrink-window-horizontally multiple times, or how to repeat a function multiple times in general?

I wanted to define a function to execute a command multiple times and ended up using fset: (fset 'my-shrink (kbd "C-u 43 C-x {")) Now, I want to include this in a function, like this: (...
1 vote
1 answer
59 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 ...
  • 1,414
0 votes
1 answer
30 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 ...
  • 622
2 votes
2 answers
68 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 ...
  • 1,414
1 vote
0 answers
70 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 ...
  • 375

1
2 3 4 5
9