Re: [OpenIndiana-discuss] Mate constrains window size
On Thu, Aug 06, 2020 at 04:53:34PM +0200, Andreas Wacknitz wrote: > Your code should work but ~/.emacs is not the only possible init file. > Emacs looks for your init file using the filenames ~/.emacs, > ~/.emacs.el, or ~/.emacs.d/init.el. The only one I have is .emacs . > I suggest to make sure you have only one file and then create an .emacs > file with only > your two lines > > (add-to-list 'default-frame-alist '(height . 36)) > (add-to-list 'default-frame-alist '(width . 80)) > > and see what happens. I tried that, and the same thing with the --no-init-file option. The two windows are identical, with 79x35 geometry. By the way, I get those numbers by a left mouse click on the border of the window. When I change the values in .emacs to 37 and 81, I still get the 79x35 geometry. Something is constraining the window size. It's the smaller font that allows the width to increase to 79. When I press the Maximize Window button in the title bar, the geometry does increase in both dimensions. Maybe this is how Mate is supposed to work. > If it works you can add your other settings peu à peu. -- -Gary Mills--refurb--Winnipeg, Manitoba, Canada- ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] Mate constrains window size
Am 06.08.20 um 00:55 schrieb Gary Mills: On Wed, Aug 05, 2020 at 09:37:11PM +0200, Andreas Wacknitz wrote: I'd check .Xresources and .Xdefaults first for any geometry settings. I don't have either of those files. From what I've read, the first step in debugging is to run emacs without the .emacs file. I did this with: $ emacs --no-init-file The editing area changed from 63x31 to 79x35, much closer to what I wanted. Emacs also had a smaller font but a brighter background. The conclusion is inescapable: something in my .emacs file was making those changes. I removed these lines: (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:inherit nil :stipple nil :background "#AE00B200C300" :foreground "#" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "unknown" :family "DejaVu Sans Mono") After that, the screen looked the same as with --no-init-file . I suspect that what I'm seeing now are built-in emacs defaults. This is a great improvement. Then maybe there is something beneath .config/, perhaps marco has some geometry settings stored for emacs sessions. There are many things below .config . The ones from August will be after the update. The ones from 2017 and 2018 will be from my previous OI version. The ones from 2010 will be from an even older version: drwxr-xr-x 2 millsstaff 3 Aug 5 07:34 dconf drwxr-xr-x 3 millsstaff 5 Aug 4 20:46 caja -rw-r--r-- 1 millsstaff 1613 Aug 3 08:27 mimeapps.list drwx-- 3 millsroot 6 Aug 2 19:29 menus drwx-- 2 millsother 3 Jul 13 13:12 gtk-2.0 drwxr-xr-x 3 millsstaff 3 Sep 3 2018 libreoffice drwxr-xr-x 3 millsstaff 3 Jul 28 2018 mate-session drwx-- 3 millsstaff 3 Jul 10 2018 mate drwxr-xr-x 2 millsstaff 2 Jul 7 2018 yelp drwxr-xr-x 2 millsstaff 3 Jul 3 2018 gtk-3.0 drwx-- 2 millsstaff 3 Jul 3 2018 pulse drwx-- 2 millsstaff 3 Apr 1 2018 brasero drwx-- 2 millsstaff 3 Dec 14 2017 totem drwxr-xr-x 3 millsstaff 3 Aug 22 2017 gnome-session drwxr-xr-x 2 millsstaff 5 Aug 22 2017 session-state drwx-- 3 millsstaff 3 Dec 3 2010 metacity drwx-- 2 millsstaff 4 Dec 3 2010 tracker -rw-r--r-- 1 millsstaff 11 Dec 3 2010 user-dirs.locale -rw--- 1 millsstaff672 Dec 3 2010 user-dirs.dirs You can try this: Enter the following line in a buffer (eg. scratch), position the cursor at the end: (setq default-frame-alist '((left . 0) (top . 0) (width . 80) (height . 30))) Then press C-x X-e (eval-last-sexp) followed by C-x 5 2 (make-frame-command). This should open a new frame with the given width and height. That seemed to work. Thanks for the help. I appreciate it. Alternatively, you can change the actual frame: (set-frame-width (selected-frame) 80) (set-frame-height (selected-frame) 30) and press C-x C-e (for each line). That works too. In fact, by making them 81 and 37, I can enlarge the screen to 80x36 like I want it. When I put those two lines in my .emacs file, nothing happens. I assume they are not being executed. Your code should work but ~/.emacs is not the only possible init file. Emacs looks for your init file using the filenames ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el. I suggest to make sure you have only one file and then create an .emacs file with only your two lines (add-to-list 'default-frame-alist '(height . 36)) (add-to-list 'default-frame-alist '(width . 80)) and see what happens. If it works you can add your other settings peu à peu. Regards, Andreas ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] Mate constrains window size
On Wed, Aug 05, 2020 at 09:37:11PM +0200, Andreas Wacknitz wrote: > > I'd check .Xresources and .Xdefaults first for any geometry settings. I don't have either of those files. From what I've read, the first step in debugging is to run emacs without the .emacs file. I did this with: $ emacs --no-init-file The editing area changed from 63x31 to 79x35, much closer to what I wanted. Emacs also had a smaller font but a brighter background. The conclusion is inescapable: something in my .emacs file was making those changes. I removed these lines: (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:inherit nil :stipple nil :background "#AE00B200C300" :foreground "#" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "unknown" :family "DejaVu Sans Mono") After that, the screen looked the same as with --no-init-file . I suspect that what I'm seeing now are built-in emacs defaults. This is a great improvement. > Then maybe there is something beneath .config/, perhaps marco has some > geometry settings stored for emacs sessions. There are many things below .config . The ones from August will be after the update. The ones from 2017 and 2018 will be from my previous OI version. The ones from 2010 will be from an even older version: drwxr-xr-x 2 millsstaff 3 Aug 5 07:34 dconf drwxr-xr-x 3 millsstaff 5 Aug 4 20:46 caja -rw-r--r-- 1 millsstaff 1613 Aug 3 08:27 mimeapps.list drwx-- 3 millsroot 6 Aug 2 19:29 menus drwx-- 2 millsother 3 Jul 13 13:12 gtk-2.0 drwxr-xr-x 3 millsstaff 3 Sep 3 2018 libreoffice drwxr-xr-x 3 millsstaff 3 Jul 28 2018 mate-session drwx-- 3 millsstaff 3 Jul 10 2018 mate drwxr-xr-x 2 millsstaff 2 Jul 7 2018 yelp drwxr-xr-x 2 millsstaff 3 Jul 3 2018 gtk-3.0 drwx-- 2 millsstaff 3 Jul 3 2018 pulse drwx-- 2 millsstaff 3 Apr 1 2018 brasero drwx-- 2 millsstaff 3 Dec 14 2017 totem drwxr-xr-x 3 millsstaff 3 Aug 22 2017 gnome-session drwxr-xr-x 2 millsstaff 5 Aug 22 2017 session-state drwx-- 3 millsstaff 3 Dec 3 2010 metacity drwx-- 2 millsstaff 4 Dec 3 2010 tracker -rw-r--r-- 1 millsstaff 11 Dec 3 2010 user-dirs.locale -rw--- 1 millsstaff672 Dec 3 2010 user-dirs.dirs > You can try this: > Enter the following line in a buffer (eg. scratch), position the cursor > at the end: > (setq default-frame-alist '((left . 0) (top . 0) (width . 80) (height . > 30))) > > Then press C-x X-e (eval-last-sexp) followed by C-x 5 2 > (make-frame-command). This should open a new frame with the given width > and height. That seemed to work. Thanks for the help. I appreciate it. > Alternatively, you can change the actual frame: > (set-frame-width (selected-frame) 80) > (set-frame-height (selected-frame) 30) > and press C-x C-e (for each line). That works too. In fact, by making them 81 and 37, I can enlarge the screen to 80x36 like I want it. When I put those two lines in my .emacs file, nothing happens. I assume they are not being executed. -- -Gary Mills--refurb--Winnipeg, Manitoba, Canada- ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] Mate constrains window size
Am 04.08.20 um 15:26 schrieb Gary Mills: On Tue, Aug 04, 2020 at 08:02:23AM +0200, Andreas Wacknitz wrote: I am also using emacs quite heavily and I can definitely say that resizing emacs' frame works for me on OI. I'm happy to meet another emacs user. Of course, this problem may not be specific to emacs. Does Mate have a default window size? Does emacs appear in the Applications/Programming menu on your desktop, like it does in mine? Does emacs have a blue-grey background? So it must be your configuration that prevents the resizing. That was my conclusion, and also my question. Maybe this behavior is caused by something left over from the Gnome desktop. Where should I look? I'd check .Xresources and .Xdefaults first for any geometry settings. Then maybe there is something beneath .config/, perhaps marco has some geometry settings stored for emacs sessions. It might also be your emacs configuration, check if you haven't multiple settings and also make sure your code is really executed. You can try this: Enter the following line in a buffer (eg. scratch), position the cursor at the end: (setq default-frame-alist '((left . 0) (top . 0) (width . 80) (height . 30))) Then press C-x X-e (eval-last-sexp) followed by C-x 5 2 (make-frame-command). This should open a new frame with the given width and height. Alternatively, you can change the actual frame: (set-frame-width (selected-frame) 80) (set-frame-height (selected-frame) 30) and press C-x C-e (for each line). Regards, Andreas ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] Mate constrains window size
On Tue, Aug 04, 2020 at 08:02:23AM +0200, Andreas Wacknitz wrote: > > I am also using emacs quite heavily and I can definitely say that > resizing emacs' frame works for me on OI. I'm happy to meet another emacs user. Of course, this problem may not be specific to emacs. Does Mate have a default window size? Does emacs appear in the Applications/Programming menu on your desktop, like it does in mine? Does emacs have a blue-grey background? > So it must be your configuration that prevents the resizing. That was my conclusion, and also my question. Maybe this behavior is caused by something left over from the Gnome desktop. Where should I look? -- -Gary Mills--refurb--Winnipeg, Manitoba, Canada- ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] Mate constrains window size
Am 04.08.20 um 02:09 schrieb Gary Mills: I just updated a system from hipster-20180701 to hipster-20200802 . I assume it changed from gnome to mate in the update. Almost everything worked afterwards. I was quite impressed. One thing that fails to work now is the window size for emacs. Emacs is the only text editor that I use. The size now is 63 x 31. I know I can resize it by pulling on the window frame with my mouse, but I'd like it to start out at 80 x 36. This used to happen with gnome when I added these lines to my .emacs file: (add-to-list 'default-frame-alist '(height . 36)) (add-to-list 'default-frame-alist '(width . 80)) I've tried many things. I tried the command-line option -geometry, setting geometry in my .Xdefaults, and adding this line to my .emacs file: (when window-system (set-frame-size (selected-frame) 80 36)) All of these attempts have failed. I conclude that the mate window manager is constraining the window size. Is there some way I can tell the window manager to set the default size the way I want it? Hi Gary, I am also using emacs quite heavily and I can definitely say that resizing emacs' frame works for me on OI. This is my variant for resizing the frame: #+begin_src emacs-lisp (defun set-frame-size-according-to-resolution () (interactive) (if window-system (progn (if (> (x-display-pixel-width) 1280) (add-to-list 'default-frame-alist (cons 'width 120)) (add-to-list 'default-frame-alist (cons 'width 80))) (add-to-list 'default-frame-alist (cons 'height (min 38 (/ (- (x-display-pixel-height) 320) (frame-char-height (set-frame-size-according-to-resolution) #+end_src So it must be your configuration that prevents the resizing. Regards, Andreas ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss
[OpenIndiana-discuss] Mate constrains window size
I just updated a system from hipster-20180701 to hipster-20200802 . I assume it changed from gnome to mate in the update. Almost everything worked afterwards. I was quite impressed. One thing that fails to work now is the window size for emacs. Emacs is the only text editor that I use. The size now is 63 x 31. I know I can resize it by pulling on the window frame with my mouse, but I'd like it to start out at 80 x 36. This used to happen with gnome when I added these lines to my .emacs file: (add-to-list 'default-frame-alist '(height . 36)) (add-to-list 'default-frame-alist '(width . 80)) I've tried many things. I tried the command-line option -geometry, setting geometry in my .Xdefaults, and adding this line to my .emacs file: (when window-system (set-frame-size (selected-frame) 80 36)) All of these attempts have failed. I conclude that the mate window manager is constraining the window size. Is there some way I can tell the window manager to set the default size the way I want it? -- -Gary Mills--refurb--Winnipeg, Manitoba, Canada- ___ openindiana-discuss mailing list openindiana-discuss@openindiana.org https://openindiana.org/mailman/listinfo/openindiana-discuss