railwaycat / homebrew-emacsmacport

Emacs mac port formulae for the Homebrew package manager
BSD 2-Clause "Simplified" License
1.67k stars 125 forks source link

Automatically open in Native Fullscreen Mac? #160

Open chrisvacc opened 5 years ago

chrisvacc commented 5 years ago

I have this in my init, but it still won't open in native fullscreen:

(add-to-list 'default-frame-alist '(fullscreen . fullboth))
(setq ns-use-native-fullscreen t)

I understand this is supposed to be a feature but i often use the split window view to use other apps with emacs, ad just prefer Native fullscreen.

railwaycat commented 5 years ago

Not sure why but this config snippet works for me. If I include these two lines of config at the end of my .emacs.d/init.el file. Emacs will in native fullscreen as soon as it starts.

Could you try with the latest emacs-mac from brew or cask or download from release page?

If that does not works, could you also try start emacs from an empty config file with just these two lines to isolate there's no other config makes different behavior?

Thanks!

7even commented 5 years ago

I also get this behaviour. It is possible to switch to the native fullscreen manually but that requires doing toggle-frame-fullscreen twice - after that the green button on top left brings you to the native fullscreen (before toggle-frame-fullscreen it just maximises the window).

Could you try with the latest emacs-mac from brew or cask or download from release page?

If that does not works, could you also try start emacs from an empty config file with just these two lines to isolate there's no other config makes different behavior?

I tried all that and it didn't change anything. It reproduces on my both Macs running High Sierra 10.13.6 and Mojave 10.14.4

abbaswasim commented 5 years ago

I had the same issue but I realised my init.el had '(initial-frame-alist (quote ((fullscreen . maximized)))) in (custom-set-variables and

(add-hook 'server-visit-hook
     (lambda ()
       (set-frame-parameter nil 'fullscreen 'fullboth)))

This was preventing the fullscreen at startup. Once I removed those and added (add-to-list 'default-frame-alist '(fullscreen . fullboth)) it works.