Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sauron as a "side window" #59

Open
jave opened this issue Apr 16, 2018 · 1 comment
Open

sauron as a "side window" #59

jave opened this issue Apr 16, 2018 · 1 comment

Comments

@jave
Copy link

jave commented Apr 16, 2018

The following code makes Sauron be an emacs "side window" see
https://www.gnu.org/software/emacs/draft/manual/html_node/elisp/Frame-Layouts-with-Side-Windows.html

Basically it works like the sauron embedded window is supposed to, but is more robust in some ways.
The code is just POC.

(defvar parameters
'(window-parameters . ((no-other-window . t) (no-delete-other-windows . t))))

(setq fit-window-to-buffer-horizontally t)
(setq window-resize-pixelwise t)

(setq
display-buffer-alist
`(("\Sauron\" display-buffer-in-side-window
(side . top) (slot . 0) (window-height . fit-window-to-buffer)
(preserve-size . (nil . t)) ,parameters)))

@kchanqvq
Copy link
Contributor

Any update on this? Is the compatibility concern that prevents this to be added to Sauron? This function is introduced in probably emacs 26 (we can always make a switch anyway).

I'm able to hack sr-show-embedded to make it basically work. The only issue is that it seemly does not respect window-height -- it tries to display all lines even if I say 8. Not sure if I'm doing anything wrong.

Also, it turns out that you cannot C-x o to a side-window, this maybe another concern.

One nice thing is now you can specify the *Sauron* to be displayed anywhere, bottom or left or right or top. Displaying it on right side, for example, enable user to see more logs and have more notification-center feel. (which is what I want it to do for me, since I don't want a notification system outside emacs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants