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

ement-room-image-show unconditionally sets fullscreen frame-parameter #223

Closed
progfolio opened this issue Sep 24, 2023 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@progfolio
Copy link
Contributor

OS/platform

Arch linux

Emacs version and provenance

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-20
From arch user repository.

Emacs command

emacs

Emacs frame type

GUI

Actions taken

  1. Customize display-buffer-alist to prevent ement images from displaying in a new frame:
  (add-to-list 'display-buffer-alist
               (cons "^\\*Ement image: "
                     (cons 'display-buffer-below-selected
                           '((inhibit-same-window . t)
                             (reusable-frames . nil)))))
  1. Invoke ement-room-image-show on an image in any room.

Results

The altered display-buffer-alist rule is obeyed, but the current frame is resized.

Expected results

The frame should retain it's dimensions.

Backtrace

No response

Etc.

ement.el @ commit: 52faf4a

In ement-room-image-show:

    (pop-to-buffer new-buffer '((display-buffer-pop-up-frame)))
    (set-frame-parameter nil 'fullscreen 'maximized)))

would it be possible to set the frame parameter as part of the ACTION argument to pop-to-buffer?

@progfolio progfolio added the bug Something isn't working label Sep 24, 2023
@alphapapa
Copy link
Owner

Probably the ACTION argument to pop-to-buffer should be in a defcustom, and the frame parameters should be passed in it via pop-up-frame-parameters (cf. Elisp manual 29.13.3).

@alphapapa alphapapa added enhancement New feature or request help wanted Extra attention is needed and removed bug Something isn't working labels Sep 25, 2023
@alphapapa alphapapa added this to the 0.13 milestone Sep 25, 2023
@alphapapa alphapapa assigned progfolio and unassigned alphapapa Sep 25, 2023
@alphapapa
Copy link
Owner

@progfolio Tag, you're it. ;)

progfolio added a commit to progfolio/ement.el that referenced this issue Sep 26, 2023
Prevents frame from being resized when display-buffer-alist has been customized
for image buffer.
See: alphapapa#223
@progfolio
Copy link
Contributor Author

progfolio commented Sep 26, 2023

Probably the ACTION argument to pop-to-buffer should be in a defcustom

I don't think this would be necessary if the ACTION specifies the parameters.
That part could still be overridden in display-buffer-alist.

the frame parameters should be passed in it via pop-up-frame-parameters (cf.
Elisp manual 29.13.3).

Thanks for hunting down that section of the manual.
Let me know what you think of #225.

My current config:

(add-to-list 'display-buffer-alist
               (cons "^\\*Ement image: "
                     (cons 'display-buffer-below-selected
                           '((inhibit-same-window . t)
                             (reusable-frames . nil)))))

alphapapa pushed a commit that referenced this issue Oct 3, 2023
Prevents frame from being resized when display-buffer-alist has been
customized for image buffer.

See #223.
@alphapapa
Copy link
Owner

Merged the PR as-is. Let me know if it needs anything else. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants