Hot answers tagged

8

It's not enough to just duplicate the frame (e.g. C-x 5 2). You need to clone the Info buffer. Open Info to the first place, then use M-n to clone the buffer. Then navigate in the new Info window (new buffer) to the second place. In other words, it should just work, but you need to use M-n to clone the buffer (getting a new, different buffer). If you don'...


4

Apparently Emacs expects the value of alpha to be within [0, 100], as I can reproduce this issue with alpha set to a value outside of that exact range. Poking around in its codebase, you can find the x_set_alpha function in src/frame.c signaling an "Args out of range" error on the same condition. As an immediate fix you can specify an Emacs-specific alpha ...


3

This should work, as the test you want: (eq (frame-parameter nil 'fullscreen) 'maximized) See (elisp) Size Parameters.


3

There is an internal predicate in ediff-init.el, called ediff-window-display-p. When I redefined it (after loading ediff, of course) like so, everything works in a single frame, including the function you mentioned as a problem: (defun ediff-window-display-p () nil) I do agree with @lawlist that this is a nice feature request -- to fix ediff-window-setup-...


3

Because you're setting frame-title-format to "%b - GNU Emacs 26.1 ". You can try the following instead (setq frame-title-format `((buffer-file-name "%f" "%b") ,(format " - GNU Emacs %s" emacs-version))) The following does the same but it probably does some unneeded work (that is, computing the version string) repeatedly (setq frame-title-...


3

A bit of terminology that can help you find help and documentation: for historical reasons, what the rest of the world calls a window is called frame in Emacs. What Emacs calls a window is what the rest of the world sometimes calls a pane. The same metaphor grew in different directions. Emacs automatically sets its operating system window title (i.e. the ...


2

No need to fiddle with make-frame or hooks at all for this. Just use special-display-buffer-names to specify that those buffers get dedicated frames. You can even give their frames particular parameters (e.g. different background colors), if you want. For example: (setq special-display-buffer-names (append '(("FM" (background-color . "LightBlue"))...


2

I use switch-window. When switching windows, it labels each window with a key and then prompts for which one you want. There are several options, but I prefer to use the home row for the labels. You can use (setq switch-window-multiple-frames t) to have it span multiple frames. My init.el looks like: (use-package switch-window :ensure t :bind ;; ...


2

As far as I understand from the comments you want to change the title of the emacs window running in the terminal. So in fact you want to change the title of the terminal. In this case go to Menu: Terminal --> Set Title --> Enter new title then save. It should also be possible to do it using a shortcut which may depend on your system. (This is from https://...


2

In order for desktop-read (the function used to restore your desktop from a file) to restore the frameset that was saved in the desktop, it must call desktop-restoring-frameset-p (i.e., "should I restore the saved frameset?"), which in turn checks the function display-graphic-p (i.e., "is this a GUI or a TTY?"). This essentially means that, even though ...


2

The function other-frame, bound to C-x 5 o by default, moves you to the next frame, and calling it repeatedly will cycle you through all available frames. As I recall, that's what Alt-tab does? ace-window might also be useful for you. See this answer: https://emacs.stackexchange.com/a/46587/262


1

The answer has two parts. The function get-file-buffer returns the buffer visiting the file given as argument or nil if there is no such buffer. You can use it in the following way: (require 'subr-x) ;; for `when-let' (when-let ((buf (get-file-buffer file-name)) (win (get-buffer-window buf))) win) You do actually not need get-file-buffer ...


1

In file .XdefHiDPI, add the following line, adapting for your preferred font and size. I use the Hack TTF font at 14 point on a normal-resolution display. emacs*font: Hack-14 See: (info "(emacs) X Resources") and https://sourcefoundry.org/hack/


1

Your question title speaks about the command line. This answer instead talks about setting the font size in Emacs. zoom-frm-in is a command in Emacs-Lisp library zoom-frm.el. It's purpose is to zoom inward interactively. It sounds like you don't want to zoom in interactively but you instead want to start Emacs at the right zoom level - in other words, set ...


1

Emacs reads the .emacs after creating the initial frame, and after that it looks at default-frame-alist (and others) to see if it changed and then tries to update the initial frame accordingly. This update happens fairly late in the startup sequence, so apparently after running window-setup-hook. If you're running Emacs≥27, you can set default-frame-alist ...


1

This pull request, Only delete window when not opened in new frame, seems related to the problem you describe. It has been merged but it's not part of a release yet. You can try the development version of the package. If it doesn't fix the problem you should open a new issue on github.


1

If you want a replacement command for other-frame then this will do it. The definition is the same, except for the condition for a candidate frame not to be a member of the blacklist, my-frames-blacklist. (defvar my-frames-blacklist () "List of frames to be ignored by `my-other-frame'.") (defun my-other-frame (arg) "Select the ARGth different visible ...


1

set-background-color is an interactive compiled Lisp function in `frame.el'. (set-background-color COLOR-NAME) Set the background color of the selected frame to COLOR-NAME. When called interactively, prompt for the name of the color to use. To get the frame's current background color, use `frame-parameters'. I'm going to guess that you're ...


1

You can call (display-monitor-attributes-list), it will return a list where each element describe each monitor. In your case, you can simply check the length of the list. If it contains one element you can configure Emacs for the built-in screen. If it contains two or more elements you can configure it for the external monitor. An ambitious solution could ...


1

If you use Icicles then you can quickly select a frame by its name, with completion, using multi-command icicle-select-frame: icicle-select-frame is an interactive compiled Lisp function in icicles-cmd1.el. It is bound to C-x 5 o. (icicle-select-frame) Select frame by its name and raise it. A frame name in this context is suffixed as ...


1

Emacs is evaluating your expression at the time when you setq frame-title-format, whereas you want it to be evaluated dynamically. Try wrapping your code in :eval as explained at Mode-Line-Data


1

You can't make a frame background transparent by changing the background color. The alpha frame parameter is a separate parameter from background-color. Function x-show-tip accepts an alist of tooltip frame parameters as argument. If you are the caller of x-show-tip then you can add an alpha parameter and its value to the alist that you pass to x-show-tip....


1

What about frameshot by tarsius? I haven't tried it myself, but it seems to do what you want. According to its release history on GitHub, the package was born into this world on February 26, 2018 — later than the most recent update to this post. https://github.com/tarsius/frameshot Give it a shot! ;)


1

Here is the simplified example I have inserted into my init.el (it omits keybindings for switching to the frames): ;; 0. for the main frame this hook is not called (add-hook 'after-make-frame-functions (lambda (frame) (select-frame frame) (cond ((equal (frame-parameter frame 'name) "FM") (dired "~/...


1

Assuming both frames display the same buffer, then all that should be needed is to make sure the window-point and window-start of both frames are in sync. Sync'ing is easier if it only goes one way, which should be an acceptable restriction in your case. So you could try something like: ;; -*- lexical-binding:t -*- (defun my-clone-frame () (let* ((src (...


1

Another way of achieving this is to load the info page that you want and then use M-x rename-buffer to give it a more useful name (say *info-elisp-tutorial*). You can then run info again and repeat the process for the new info page. Having done this you can easily switch between the buffers based on their name.


1

I've asked a very similar question yesterday and stumbled upon your post only afterwards … Nevertheless, this answer might help (could not yet test it on an external monitor): https://emacs.stackexchange.com/a/44905/20389


1

Something like this? (defun my-compile-goto-error-condition (_buffer _action) "`display-buffer-alist' condition callback." (member this-command '(next-error previous-error compile-goto-error))) (defun my-display-buffer-full-frame (buffer _action) "`display-buffer' function." (let ((window (display-buffer-same-window buffer nil))) (delete-other-...


1

If I understand your question, I think ace-window does what you want. When you call the function ace-window, all of the visible windows (even on different frames) get a temporary label (letters or numbers). You press the key for the window you want to jump to. Here's an example from the project repository:


1

The keybinding is under the "quit" submenu: SPC q f. This answer is accurate as of Spacemacs 0.300.0@26.1 (if not an earlier version). StackExchange didn't allow me to modify the original answer because my edit was fewer than 6 characters.


Only top voted, non community-wiki answers of a minimum length are eligible