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

the side-bar takes a whole buffer #2

Open
kebairia opened this issue Aug 31, 2021 · 18 comments
Open

the side-bar takes a whole buffer #2

kebairia opened this issue Aug 31, 2021 · 18 comments

Comments

@kebairia
Copy link

when i use the nano-sidebar-toggle, it takes a whole buffer instead of just the "side"
is there a way so i can configure it on a specific width?

2021-08-31-1630385433_990x644

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Well, it's not supposed to do that! What is your system?

@kebairia
Copy link
Author

kebairia commented Aug 31, 2021

Well, it's not supposed to do that! What is your system?

OS: Gnu/Linux -- Artix (Arch based distro)
Emacs: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) of 2021-03-26

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Thanks. Can you check if a frame is actually created (and cover the initial frame) or if there's an error during the creation?

@kebairia
Copy link
Author

no, actually , when i activate the nano-side-bar, the screen blink with the nano-side-bar frame (the frame appear and immediately disappear).
these are the messages i get
2021-08-31-1630401702_715x103

After that, I can use ibuffer to locate the frame.
2021-08-31-1630401777_840x418

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Ok. Can you try to add a message here to check if the make-frame-visible function is called?

@kebairia
Copy link
Author

alright, i've added this message like that

    (when (not visible)
;;;;;;;;;;;;;;;;;the message;;;;;;;;;;;;;;;;;;;
      (message "Hello there")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      (make-frame-visible sidebar)
      (modify-frame-parameters sidebar `((top    . 0)
                                         (height . 1.0)
                                         (width  . ,sidebar-width)
                                         (left   . ,(* -1 width))))
      (select-frame-set-input-focus selected-frame))

These are the messages I got

t
nano-sidebar
Hello there
dark

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Ok. Do you know if there are actually two frames or only one after toggling the sidebar? For example, is one covering the other?

@kebairia
Copy link
Author

kebairia commented Aug 31, 2021

no, only one frame!
i toggled the sidebar from the scratch buffer

(nano-sidebar-toggle) ;; Using C-x C-e

2021-08-31-1630414414_791x327

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Can you try:

(make-frame `((parent-frame . ,(window-frame))
              (undecorated .  nil)
              (user-position . nil)
              (user-size . nil)
              (background-color . "black")
              (height . 12)
              (width  . 72)))

@kebairia
Copy link
Author

where should i put that
i use it as a configuration, and a black box appeared at the top left of the buffer.
2021-08-31-1630419395_1086x520

@kebairia
Copy link
Author

PS: when i execute (nano-sidebar-toggle), i loose my cursor, it seems that the focus goes to the new sidebar.
I can restore my cursor by clicking again.

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

The command was a test to chekc whether you can create a child frame and apparently you can. By the way, are you using a tiloing window manager or emacs in full screen (that won't play well with the sidebar)?

@kebairia
Copy link
Author

yes, i'm using dwm

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

That might be the reason. Can you try with a floating emacs window?

@kebairia
Copy link
Author

kebairia commented Sep 3, 2021

i tried with a floating mode in dwm... same problem 🤔

@rougier
Copy link
Owner

rougier commented Sep 3, 2021

What about the minimal example I posted above? I suspect that the new frame might be identified as new window by your wm and put somewhere else. Since this new frame is a child frame, I'm not sure how dwm would handle it. Can you try with a non-tiling window manager (if possible, don't break your configuration for the test)?

@DivineDominion
Copy link

Can you try:

(make-frame `((parent-frame . ,(window-frame))
              (undecorated .  nil)
              (user-position . nil)
              (user-size . nil)
              (background-color . "black")
              (height . 12)
              (width  . 72)))

@rougier I tried on macOS Monterey with Emacs 28 today, and this spawns a sub-window that is attached to the main one, much like macOS sheets used to maintain relative position.

image

Thing is, the sidebar also is a floating window. Much like old Mac OS X GUIs, or GIMP:

Screen Shot 2022-01-19 at 19 36 47

Is there anything else you do to customize the display of Emacs frames on your Mac?

@rougier
Copy link
Owner

rougier commented Jan 31, 2022

@DivineDominion Sorry for late answer. I think this the expected behavior. In my case (OSX Monterrey EmacsMac 27.1), I removed the title bar.

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

3 participants