Closed theherk closed 2 years ago
It seems I can affect size changes this way:
(setq emacs-everywhere-frame-parameters '((name . "emacs-everywhere") (height . 18) (width . 80)))
But positioning directives don't work, and this window is all over the place.
The position is set in "emacs-everywhere-set-frame-position". The current behavior is relative to the cursor, the frame is barely visible when the cursor is at the bottom edge of the display. Maybe just put the frame at the bottom of the current display.
I am settled with this:
(require 'frame-cmds)
(defun emacs-everywhere-set-frame-position ()
"Set the size and position of the emacs-everywhere frame."
(sleep-for 0.02)
(move-frame-to-screen-bottom 0))
(defun emacs-everywhere-set-frame-position () "Set the size and position of the emacs-everywhere frame." (sleep-for 0.02) (move-frame-to-screen-bottom 0))
Overriding an existing function like this is quite bad practice. Just remove emacs-everywhere-set-frame-position
from emacs-everywhere-init-hooks
and add your own function. This sort of difference in personal taste is exactly why that's customisable.
Thanks for the response, @tecosaur. Unfortunately, the contents of this function you mention are precisely what I seek. I'm not sure why this is an invalid question. I'm sure there is a good reason the frame launches out of view every time, but I'm looking for how to resolve that.
This is invalid in the sense that it's trying to use emacs-everywhere in a way it's not designed to handle.
Re: the behaviour you're trying to seek:
emacs-everywhere-set-frame-position
emacs-everywhere-set-frame-position
is only run because it is in emacs-everywhere-init-hooks
emacs-everywhere-set-frame-position
from emacs-everywhere-init-hooks
and add your own function implementing whatever behaviour you wantI suspect I am out of my depth here. I am not directly making any calls to emacs-everywhere-set-frame-position
, so I presume it is happening in the doom module somewhere. I'm not sure how to get the behavior where it is on the screen, but that is a shortcoming of mine. Thanks for your time.
emacs-everywhere-set-frame-position
is only run because it is inemacs-everywhere-init-hooks
Just to clarify, when you say "This is invalid in the sense that it's trying to use emacs-everywhere in a way it's not designed to handle," I assume that doesn't mean this is not designed to handle being on screen, but that is actually the only thing I mean to learn. I genuinely not clear on what I've done wrong here.
"invalid" because tweaking the created frame properties via --eval
is not the way emacs-everywhere has been designed to work.
Cool. Am I barking up the wrong tree then by asking, what is the designed method for having this be on screen?
IDK what you mean by "on screen", but:
you can remove
emacs-everywhere-set-frame-position
fromemacs-everywhere-init-hooks
and add your own function implementing whatever behaviour you want
By on screen, I simply mean not off the screen as shown here.
Nevertheless, it seems clear that the option is to learn how to write the function you reference. Thank you.
Yep, so I'd use that function as a reference and tweak it so it works better for you. If there's a heuristic that you think generally improves the positioning logic, feel free to open a PR :slightly_smiling_face:.
I'd like to control how the everywhere frame opens. It seems the eval statement actually launches the frame which means running with
/opt/homebrew/bin/emacsclient --eval "(progn (emacs-everywhere) (toggle-frame-maximized))"
doesn't work as hoped.On my macos machine the popup launches mostly off the window every time, and I can't sort how to configure this without access to frame options.
Any help is appreciated.