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

vundo-box (displaying vundo like eldoc-box) #113

Open
gs-101 opened this issue Dec 13, 2024 · 8 comments
Open

vundo-box (displaying vundo like eldoc-box) #113

gs-101 opened this issue Dec 13, 2024 · 8 comments

Comments

@gs-101
Copy link

gs-101 commented Dec 13, 2024

I seet that you're also the creator of eldoc-box (love this package, btw), and, when trying out Neomacs, I noticed they have an undo system similar to the one found on this package, but it's not displayed at the bottom:

07:42 AM 13-12-2024

Would it be possible to make an option to display vundo in a childframe, like how it's done in eldoc-box?

@gs-101 gs-101 changed the title undo-box (displaying vundo like eldoc-box) vundo-box (displaying vundo like eldoc-box) Dec 16, 2024
@casouri
Copy link
Owner

casouri commented Dec 24, 2024

Hey sorry for the late reply. Do you want to display the undo tree in a childframe, or display the undo tree vertically?

@gs-101
Copy link
Author

gs-101 commented Dec 24, 2024

Hey sorry for the late reply. Do you want to display the undo tree in a childframe, or display the undo tree vertically?

In a childframe.

@casouri
Copy link
Owner

casouri commented Dec 25, 2024

Shouldn't be hard to make it configurable. Let me see.

@casouri
Copy link
Owner

casouri commented Dec 26, 2024

Ok, now you should be able to configure how to display the vundo buffer by adding an entry todisplay-buffer-alist. You can use display-buffer-in-child-frame.

@gs-101
Copy link
Author

gs-101 commented Dec 26, 2024

Thank! I'll test it right away.

@gs-101
Copy link
Author

gs-101 commented Dec 26, 2024

Ah, forgot to ask, to what function should I set display-buffer-in-child-frame to?

I tried:

(add-to-list 'display-buffer-alist '(vundo-1 (display-buffer-in-child-frame)))

But that broke buffer display.

@casouri
Copy link
Owner

casouri commented Jan 8, 2025

Hey sorry, didn't see you second message. You should use something like

(add-to-list 'display-buffer-alist
             `(" *vundo tree*"
               display-buffer-in-child-frame
               (child-frame-parameters . ((undecorated . t)
                                          (menu-bar-lines . 0)
                                          (internal-border-width . 1)
                                          (tool-bar-lines . 0)
                                          (vertical-scroll-bars . nil)
                                          (horizontal-scroll-bars . nil)
                                          (tab-bar-lines . 0)
                                          (mouse-wheel-frame . nil)
                                          ))))

But you probably want to use something like posframe to handle the details (all the childframe parameters and positioning) for you.

@gs-101
Copy link
Author

gs-101 commented Jan 8, 2025

Thanks. I was going to report to you that it didn't work, then I noticed I actually had the stable version (2.3.0) installed for all this time.

(add-to-list 'display-buffer-alist
               `("\\*vundo tree\\*"
                 display-buffer-in-child-frame
                 (child-frame-parameters . ((undecorated . t)
                                            (menu-bar-lines . 0)
                                            (internal-border-width . 1)
                                            (tool-bar-lines . 0)
                                            (vertical-scroll-bars . nil)
                                            (horizontal-scroll-bars . nil)
                                            (tab-bar-lines . 0)
                                            (mouse-wheel-frame . nil)
                                            ))))

It works, but since it's a child-frame I can't exactly interact with it. I'll try it out with a posframe:

(add-to-list 'display-buffer-alist
               `("\\*vundo tree\\*"
                 posframe-show
                 :poshandler #'posframe-poshandler-frame-top-right-corner))

And, again, it displays in correctly (a posframe), but I can't interact with it.

I was going to send a video, but OBS just keeps dying on me, so here are some screenshots:

Childframe

scratch - GNU Emacs at nobara-pc 08:37 PM 08-01-2025

The vundo frame covers the area highlighted in red. As shown by the Typing... from keycast, I can't use the Vundo commands (f to go fowrads, b...) and instead I just type regularly in the buffer.

Posframe

Backtrace - GNU Emacs at nobara-pc 08:45 PM 08-01-2025

Way smaller. It doesn't display in the top right (but I kind of like that, actually), but I once again can't interact with it.

There's also a window-live-p error.

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