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.
365
questions
0
votes
0answers
16 views
centered cursor with evil-window-bottom and evil-window-top
I'm trying to achieve both:
persistent centered cursor (cursor stays in center of a window except when near the line 0 and count-lines-page
augment the way evil-window-bottom and evil-window-top work ...
0
votes
1answer
13 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 ...
0
votes
1answer
19 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 ...
1
vote
2answers
34 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
vote
0answers
39 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 ...
0
votes
1answer
23 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 ...
1
vote
2answers
31 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.
0
votes
2answers
38 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 ...
2
votes
1answer
38 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 ...
1
vote
1answer
33 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 ...
1
vote
0answers
26 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-...
1
vote
2answers
95 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 ...
1
vote
0answers
11 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 ...
0
votes
1answer
23 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. ...
3
votes
1answer
57 views
How do I open a window that will behave like a *Help* window?
*Help* windows appear to have a special behavior. For example, if I open a help window using C-h f butterfly, the window will open in a separate half-page buffer. If I use the help feature again C-h f ...
0
votes
0answers
48 views
Open icons are not displaying in the tab of centaur-tab
I want to have my editor work with tabs and I'm using centaur-tabs for that purpose.
Below is my emacs config
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://...
0
votes
0answers
9 views
Map maximizing window and frameset-to-register/restore frame configuration to C-x 1
Currently C-x 1 maximizes the current window. What I wish to have is to use C-x 1 to
maximize the current window (if there are more open) AND store the current frameset to an arbitrary register (eg. ...
2
votes
0answers
33 views
Restore wndows after OrgSrc mode
I am new to org mode, so it might be a very simple matter, but I couldn't find/figure out it myself.
Say, I have created a few horizontal and vertical windows. Opened an org file which has some source ...
1
vote
1answer
64 views
Force one window when opening multiple files
Any time I open multiple files I'd like emacs to only show me one buffer. I do not want any split windows. This would save me a keystroke every time.
I learned I could do away with the buffer list ...
0
votes
0answers
35 views
How can I get a listing of all buffers and the frames displaying them?
I want to get a list of all the windows and their frames, so I can jump directly to the frame and window.
If a buffer is not open in a window then the command should still jump to the last frame in ...
0
votes
1answer
56 views
How to start slime automatically and layout as I want
I'm now using this config:
(use-package slime
...
...
:hook
(slime-mode . (lambda ()
(unless (slime-connected-p)
(let ((bak-buffer (current-buffer)))
;; (...
1
vote
1answer
40 views
In EXWM `split-window-right` followed by immediate `windmove-right` swaps order of buffers
I have a function
(defun bad-fn ()
(interactive)
(split-window-right)
(windmove-right)
)
If I go to a frame with just one window visiting EXWM buffer A (and buffer B
is next), and call
split-...
0
votes
0answers
22 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
81 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
41 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
31 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 ...
1
vote
0answers
37 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
17 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
208 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
33 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
33 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
24 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
102 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
17 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
40 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
75 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
23 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
51 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
94 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
98 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 ...
3
votes
1answer
190 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
16 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
2
votes
1answer
61 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
66 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
347 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
76 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
91 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
3answers
112 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
62 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
57 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 ...