Questions tagged [frames]

are the graphical system-level “windows” of Emacs. It initially contains one window and normally also contains a menu bar, tool bar, and echo area.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

make-frame-on-current-monitor giving wrong-type-argument

I am setting up a call to make-frame-on-current-monitor, (make-frame-on-current-monitor '((width . 73) (height . 21))) only to get Debugger entered--Lisp error: (wrong-type-argument listp 73) (make-...
  • 77
0 votes
1 answer
21 views

left and top for initial-frame-alist using cons variable [duplicate]

I am using a variable storing a cons cell (defvar typex-frame-position (cons 1270 1223)) Followed by (setq initial-frame-alist '((left . (car typex-frame-position)) (top . (cdr typex-frame-...
  • 77
0 votes
1 answer
15 views

Storing position for initial frame

I have the following code to store the position where to put the initial frame (fxpos and fypos). My problem is that when I run a new emacs session, the defcustom commands are resetting the values ...
  • 77
-1 votes
0 answers
22 views

Select the initial frame automatically

I would like to determine the name of the initial frame. This is because I want to centre the initial frame using a function. The function needs to be passed the frame on which the centering command ...
  • 77
-1 votes
0 answers
24 views

frame-position and frame-monitor-attributes

What is the difference between calling (frame-position) and getting the first two elements in (alist-get 'geometry (frame-monitor-attributes)) Would I be getting the same thing?
  • 77
1 vote
1 answer
27 views

Setting position of initial frame from user defined values

I would like to set the frame position of the initial frame, by letting the user position the frame where he wants. I can then save the cons cell in a variable which will then be used for set-frame-...
  • 77
0 votes
0 answers
20 views

Center emacs frame to correct monitor

I want to center the emacs frame on the monitor. What can I do? I do have multiple monitors. This is what I am doing, but the emacs frame gets displayed on a different monitor than from the monitor ...
  • 77
0 votes
0 answers
22 views

Centering the emacs frame

I want to display the emacs frame in the middle of the monitor. At first the emacs window is placed at the center, but after setting initial-frame-alist and the font height, the frame is repositioned ...
  • 77
0 votes
0 answers
30 views

menu-bar-mode and tool-bar-mode change frame size

Am calling the following two functions repeatedly (toro-fullscreen followed by "toro-normal"). The size of the frame changes. The problem happens when calling "menu-bar-mode" ...
  • 77
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
0 votes
2 answers
37 views

How to enable markdown-mode every time I invoke Emacs Anywhere?

I am using a cool software called Emacs Anywhere. Usually, I invoke this software to write on Stack Overflow and on GitHub. Both websites use markdown. Hence, almost every time I invoke Emacs Anywhere,...
0 votes
0 answers
25 views

Cannot resize emacs frame

Have been resizing my emacs gui by double clicking the emacs window menu. But after doing that, the gui does not let me resize to a smaller frame when I try moving the corners of the frame using the ...
  • 23
0 votes
0 answers
6 views

Intermittent frame artifacts in terminal

When scrolling inside Emacs with iTerm2, I occasionally get some output of previous commands at the top of display; not necessarily the last one. Not sure what is causing it. Here is my config for ...
  • 229
0 votes
2 answers
24 views

How to add a hook to save things on kill-ring (or clipboard ring) before a frame is deleted?

Context: I have been using an interesting software called Emacs Anywhere. It helps me bring emacs keybindings for stuff like this (editing text for a question on Stack Exchange). Overall, the software ...
0 votes
1 answer
25 views

How to force `find-file` to visit the existing frame of an opened file

The below function creates a new instance of the file myfile.txt (regardless of if myfile.txt is already opened or not). How to force emacs to use the existing frame of that file (if any)? (defun ...
  • 7,394
0 votes
2 answers
67 views

How to always work from a daemon and always reuse an existing frame? (bonus: do it with chemacs2)

I'm new to emacs. I'm a spacemacs implant, really love ORG mode and evil mode. Been using for the past year or so. I've read some of the emacs documentation, which is fantastically written. But I'm ...
1 vote
3 answers
82 views

How to move the time and date displayed in the tab-bar a couple of character to the left

I would like to move the time and date displayed in the tab-bar a couple of characters to the left, so that the time is not completely on the edge of the screen. Here is the relevant code : (setq tab-...
0 votes
0 answers
25 views

Z-Order of Emacs Client Not Layered Top-Most

System & related settings: Fedora 35 (using Cinnamon Desktop) Emacs 27.2 focus mode: "sloppy" with "raise-on-click" disabled Contrary to all other applications, including the ...
  • 307
2 votes
1 answer
41 views

By elisp how to change backgound color when specific theme is activated?

How do we set "white" background when only "adwaita" theme is activated. The following does not work. (when (equal 'custom-enabled-themes "adwaita") (set-background-...
  • 21
0 votes
1 answer
43 views

Why an external monitor changes emac's frame text size?

I recently migrated to emacs 27 up from 24 (new machine running on Ubuntu 20.04, up from 16.04). When connecting (or unplugging) the laptop to an external monitor, emacs fails to adapt text size to ...
  • 109
1 vote
1 answer
58 views

second frame not using values from default-frame-alist

I'm just starting to customize emacs on RHEL8, the entirety of the .emacs file is this: (setq default-frame-alist '((width . 80) (height . 40) (menu-bar-lines . 1))) When starting Emacs this sets the ...
0 votes
0 answers
26 views

Using `desktop-read` to reload frames -- closing one frame closes all frames

A very annoying issue with desktop-save and desktop-read that I'm encountering at the moment: I'm starting Emacs in daemon-mode, and then open a client frame. I do desktop-read and my saved desktop ...
0 votes
0 answers
32 views

Moving focus to external application (Chrome) and back to Emacs

I was wondering what is the most efficient way to move in and out of Emacs windows. In my workflow I use Chrome and Emacs constantly, so I am curious as to how other users have managed to move amongst ...
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, ...
0 votes
0 answers
50 views

Can emacs use window system on terminal frame? (doom-emacs, iTerm)

I'm trying to set org-level-* height(font size) differently for each level(doom emacs, config.el): (after! org (set-face-attribute 'org-level-1 nil :height 1.75)) But it displays different ...
  • 1
1 vote
0 answers
29 views

How to automatically hide mode line by detecting frame size?

Hide mode-line would be more compact for a narrow sub-frame like this: For now, I'm using doom-emacs and binding keys like SPC t m to hide the mode-line, This just works but, I want to ask, Is it ...
  • 11
3 votes
1 answer
67 views

How to include name of current tab and its buffer in the frame title?

I would like the title my frames to show "<name of tab>: <name of buffer in active window>". Presently, frame-title-format has its default value of %b, which shows only the name ...
  • 154
0 votes
0 answers
92 views

Dired: open file in another frame, but reuse an already existing one

I use a two-screen setup, and I like to have a frame with dired on one screen and another frame on the second screen. When I want to work on a specific file, I usually copy the file path from dired ...
2 votes
1 answer
48 views

How can you list all non-child frames?

There's frame-list but this lists child-frames, and there's visible-frame-list but this doesn't list iconified frames. It seems like there should be a simple function to return all non-child frames. I ...
0 votes
0 answers
25 views

make-frame - not full screen mode

Linux Mint 20.2 Emacs 27.1 To start Emacs in full screen mode in my init.el I use this: (add-hook 'window-setup-hook 'toggle-frame-maximized t) Nice. But when I want to start new frame by this ...
  • 3,505
1 vote
0 answers
33 views

Open new file in new frame without raising existing frames (Windows)

I run Emacs in a MSWindows environment (via server launched with runemacs), and open new files with emacsclientw.exe -n [filename]. It works very well, except for a detail in the second case below: ...
  • 183
1 vote
1 answer
77 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 ...
2 votes
2 answers
212 views

How to use make-frame to bring up "maximized windows" like -mm does for the first window (using WSL 2)?

I am running emacs under (Ubuntu under) WSL 2 and I can bring up the first frame maximized (i.e. almost full screen, leaving the Windows "task bar" exposed, the -mm option does that). I ...
0 votes
1 answer
80 views

frame-background-mode leads `Args out of range: #<buffer doo.py>, 0, 1` error

I am using following answer to search and replace a word in the entire buffer: (defun query-replace-region-or-from-top () "If marked, query-replace for the region, else for the whole buffer (...
  • 1,114
2 votes
3 answers
291 views

local variable set to nil after switch-to-buffer call

Emacs 26.1 user here. I know some common-lisp but new to elisp, so I wonder if I'm missing something obvious. I'm trying a rather simple frame setup with a function I wrote, and there's this strange ...
0 votes
0 answers
102 views

Minibuffer not showing the bottom line

When I use multiple monitors, the bottom line of the minibuffer doesn't render; ie there's a line at the bottom of the list that I can select but doesn't render on screen. I'm pretty stumped on how to ...
0 votes
1 answer
34 views

`pop-to-buffer` in other frame if file is already visited

Say I have two frames open. Frame A is visiting a file foo.org. Calling (pop-to-buffer "foo.org") in the other frame (B) opens foo.org in frame B instead of moving the focus to frame A where ...
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 ...
  • 632
1 vote
1 answer
38 views

Deleting a minibuffer only frame on C-g

What I'm trying to achieve I'm trying to create a popup that runs an elisp funtion I've written which searches my library directory for pdfs, gets the user to choose an option (using completing read) ...
  • 331
1 vote
2 answers
44 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.
1 vote
0 answers
22 views

Why "set-face-attribute" needs to be executed twice when switching from a TTF font to a bitmap font?

I'm trying to write a function which switches between fonts in all frames. In order to do this, I first wrote the following commands: This font is a TTF font and is located in ~/.local/share/fonts/...
  • 487
1 vote
0 answers
28 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 ...
  • 111
0 votes
2 answers
316 views

Undecorated Frame with header line as titlebar

I am trying to remove all window manager decorations from emacs. This works well using: (set-frame-parameter nil 'undecorated t) But now what I want to have is a one line (global) header line (which ...
0 votes
0 answers
157 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 ...
  • 1,193
0 votes
0 answers
49 views

How to keep mode-line in title bar even in new poped up frames?

I am using the following code to keep the org-pomodoro clock in the title bar, (setq frame-title-format '("" invocation-name "@" system-name " " org-pomodoro-mode-line)) ...
  • 101
2 votes
1 answer
188 views

How to focus or change point on child frame

I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I ...
  • 133
1 vote
1 answer
102 views

How to setup ediff to open a new frame with the two comparison buffers

When I issue M-x ediff-buffersI'd like ediff to create a new frame with the two buffers (and close this frame when done with the comparison). How can I customise ediff to do so? I tried (defun leo-...
  • 1,111
2 votes
1 answer
104 views

how to move a line from one window to another?

I have two files open, shown in two windows. Some lines in one file belong in the other file. I could cut the line here, move to the other window, paste there, and come back. That's a lot of work with ...
3 votes
1 answer
392 views

How can I set WM_CLASS for Emacs 27?

I use scratchpads in XMonad (my WM) extensively for quickly capturing (notes, TODOs etc) from anyhwere. I have an instance of Emacs running permanently in a workspace, and launch emacsclient as my ...
  • 131
1 vote
1 answer
136 views

How can I create a frame and open two files split vertically in it?

I am trying to write an Elisp function that will create a new frame and in that new frame open two files split vertically. I have been unable to find anything about this in the Elisp manual, node ...
  • 121

1
2 3 4 5
7