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.
417
questions
2
votes
1
answer
64
views
Swap 2 Windows Associated by “Follow Mode”
Say a frame is split (by C-x 3) into 2 windows that both display the same buffer.
If I enable follow-mode, the left window will always display the content closer to the beginning-of-buffer than the ...
0
votes
2
answers
146
views
Why does Emacs hold on to a not common sense meaning of the words: frame and window?
Below voluminously explained the context of the question stated in the question title:
I have started to use Emacs very intensively some days ago and are still bumping into doing things the wrong way. ...
1
vote
1
answer
11
views
how to get ace-window to do row-major numbering of windows?
I use ace-window, and when I have at least two rows and columns of windows. When I invoke ace-window, it does column-major ordering of the windows:
|----------+----------|
| | |
| ...
1
vote
1
answer
20
views
The number of characters in one line is very different from `window-width`
In my environment, I can only enter 130 single-byte characters in one line in the actual buffer while window-width is returning 160. Apparently window-width is returning columns, not characters. Is ...
1
vote
1
answer
25
views
Why does other-window-for-scrolling ignores variable other-window-scroll-buffer?
According to the documentation of other-window-for-scrolling we should be able to specify the "other window" by setting the variable other-window-scroll-buffer:
other-window-for-scrolling ...
1
vote
1
answer
21
views
How can I make a window always show the same file buffer?
How can I force Emacs to keep a certain file in a particular window? For example, if I am editing a LaTeX file and there is a compile error, I want to inspect the error in another window. I ...
0
votes
2
answers
50
views
emacs command window is too small
When I C-x to show the list of commands, the window of commands is chopped like below
how can I make it show the full?
1
vote
2
answers
64
views
Window Point Reset After Update
I have a buffer which is updated periodically using run-at-time, and in order to maintain the point in each window I use set-window-point, but I find that in sometimes when something is interrupted ...
0
votes
1
answer
39
views
Why I cannot quit the window using `quit-window`?
Say I have two existing files named "file1.el" and "file2.el".
Then I perform the following steps:
I open a file named "file1.el"
C-x C-f a file named "file2.el&...
1
vote
0
answers
68
views
How to switch buffers (prev & next) with minimal buffer list order modification?
How to switch buffers (prev & next) with minimal buffer list order modification?
To be succinct and without getting into the weeds of particular details, the best way to explain what I am trying ...
5
votes
2
answers
158
views
Display Different Sections of *info* In the Same Session [duplicate]
To read Emacs Lisp Intro, I type C-hi and choose the book.Then I type C-x3 and try to see another section in the right window.But once I choose another section in the right window, the left window ...
1
vote
1
answer
21
views
How to get `Info-mode`'s text to horizontally fit the window like in the html version?
See images for a comparison. The emacs version line-wraps much before the horizontal space ends. Html version was screenshotted from here
1
vote
1
answer
70
views
Delete or hide compilation buffer when finished compile and run process
Recently I'm using this function which is given bellow, to compile and run C++ program. Everything works fine with this function.
I just want to delete pop-up window (generated by this function) after ...
1
vote
0
answers
14
views
Transfer focus to started asynchronous process
I have the opposite issue from How to avoid losing focus after starting an asynchronous process?. I would like to call start-process and have the resulting window be focused.
Specifically, I am ...
1
vote
2
answers
91
views
save a specific layout
I am pretty new to emacs (doom-emacs in this case) and I have an idea of what I want to do, but not sure how to do it.
What I am after is that when I open a .js file, I want to split my window into 3.
...
1
vote
1
answer
37
views
How to disable `q` key (quit) for *Geiser Debug* window?
The *Geiser Debug* window disappears after pressing q. This is normally good for dismissing the error messages in the window (for scheme). However, I'd like to keep this window open so that I can see ...
0
votes
0
answers
15
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
117
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 ...
1
vote
1
answer
31
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 ...
1
vote
0
answers
51
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 ...
1
vote
1
answer
84
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 ...
1
vote
1
answer
28
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’...
0
votes
0
answers
43
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
128
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
241
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
132
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
34
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
215
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
44
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
63
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 "...
2
votes
3
answers
125
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 ...
2
votes
1
answer
39
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 ...
0
votes
1
answer
47
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-...
2
votes
2
answers
76
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?
3
votes
1
answer
181
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
vote
1
answer
64
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 ...
4
votes
1
answer
82
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 ...
1
vote
1
answer
255
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
60
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 ...
2
votes
1
answer
138
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")
2
votes
1
answer
106
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
106
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 ...
0
votes
3
answers
116
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
39
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
votes
1
answer
30
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
91
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
644
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
vote
1
answer
96
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
154
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 ...