-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Getting Emacs to tile #86
Comments
Just put the rule in your yabairc—it's just an executable shell script after all.
Assuming you installed via brew, do you have anything possibly relevant in your log files when doing this? stderr gets redirected to An alternative would be to run Emacs has always been an issue, sadly. |
Try using emacs-mac from the tap emacsmacport. It has much more better GUI support than the original, and a few additional features you might appreciate. All this is due to GNU Emacs's main role being an AXTextField instead of AXWindow mentioned https://github.com/koekeishiya/chunkwm/issues/105#issuecomment-312619814. :-( Sent with GitHawk |
Does Emacs not provide a good CLI alternative to its GUI version? |
There was no log file in
this will probably be my solution especially because there have always been some glitchiness with my emacs install with window resizing and what not, I'll give a try tomorrow.
It has a CLI alternative but I think it lacks things like following links to open files and URLs in orgmode files, which I use pretty heavily. I could be wrong about that though because I've only used CLI on a headless server in a pinch. |
@karrot42 I'm using emacs-mac and still have the same problem. The simple fix is to add (menu-bar-mode t) to configuration file. Hope it help! |
Closing this then. |
I added this information to the tips and tricks section of the wiki: https://github.com/koekeishiya/yabai/wiki/Tips-and-tricks#tiling-emacs I have not tested whether this works as I don't use Emacs myself, but maybe this will help some real programmers (xkcd). |
I'm using emacs-mac with menu-bar-mode on. Yabai mostly works, but if I try to do |
On macOS I use an emacs config based on doom emacs with emacs-plus installed with these options: I use this rule to contain emacs windows: With this setup emacs tiles just fine using yabai and seems well behaved. |
@webframp your comment helped me tile emacs but I still can't get it to focus by using commands. I get
|
Hi, I have been a user of chunkwm and Emacs tiled just as all other programs. Today I installed yabai because a macOS update bricked my chunkwm installation. And everything works as before except Emacs. Below is my Emacs installation
|
@brorbw
If you're using emacs-plus, you should set up a custom rule for it (which actually creates lots of problems relating to tooltips). |
@brorbw can you provide any more info on your emacs config? I use emacs-plus as I mentioned and have no tiling issues with it. It may be worth trying emacs-mac just to eliminate the cause of the issue |
I realise that my poor english skills might have come across as unfamiliarity with chunkwm. For that i apologise. @pcr910303 I appreciate your answer but all of the above mentioned methods does not work for me. I like having the
I will add that the official Homebrew install of emacs and emacs-plus does not work either.
@webframp My emacs config is almost the dev branch of spacemacs with some minor changes. |
Well, then I don't understand the question, why would you not add a custom rule for Emacs in your yabai init file?
Yes, as said, the official emacs and emacs-plus don't work without custom rules. Try something like this (this doesn't consider tooltips): have checked working on macOS 10.15 Catalina with Emacs built on master. yabai -m rule --add label=emacs app=Emacs manage=on |
Since
It's in 'experimental' state. And if it works reliably, I will make it on by default. Using it for several days (with yabai) and can confirm that doesn't require any special rules. |
Does it also work with the |
Yes, it works with |
Yeah, I just wrote what was on the top of my head. Of course it's |
For completeness I will answer your question. I tried adding a custom rule for emacs-plus but it simply wouldn't work hence why I kept asking. |
That option was merged and is not required anymore. Have fun :) |
Was it recently merged? Yesterday I still had to add it for brew install. |
@picaschaf it was merged just minutes before I posted about it here. Here is relevant commit: d12frosted/homebrew-emacs-plus@0017af1 |
I know this is closed, but I still have this issue. I installed the Emacs plus from @d12frosted above, and have the rule, |
I do not have |
That is the same Emacs I am using.
|
@TomFaulkner I also use
|
I was on 26.3, then tried 28 with the |
I installed emacs-plus |
I've also started using emacs recently, and even with proper accessibility attributes on the window tiling sometimes fails. From a brief investigation this is what happens:
This is mainly caused by the fact the Emacs actually takes a while to properly startup and properly responding to ax requests. Line 1623 in 4848ec0
@koekeishiya I think it would be worth to make that value a little higher or at least configurable, I've seen the same failure described above for other apps like Safari, especially when the system is under load. |
@choco nice catch. Most likely what's happening with me. It explains also why |
@choco Just a regression in the changes that were made on the-future branch. Should be back to working as before on the master branch now. |
A lot of the suggestions here will cause problems. For anyone confused, you should not use rules. All you need is to use emacs-plus or apply its fix-window-role patch. Here is a more detailed summary of what currently works to get Emacs tiled correctly without messing up e.g. completion popups:
|
@noctuid can I ask, to which emacs version in nixpkgs are you applying the patches to? I've tried applying the same patches from emacs-plus to get this to work with emacs29 emacs29-pgtk (fails to build) and emacs29-gtk3 but they dont tile correctly, or only tile when the titlebar is enabled, while the version from emacs-plus works without just fine :/ |
@saucoide I'm using brew install emacs-plus@29 --with-no-titlebar --with-native-comp Removing all rules for emacs. That works great. Sometimes when I reboot and emacs opens before yabai loads it wont tile. In that case I have to toggle tiling for the emacs window and then it works. |
@saucoide I'm using emacs-git from emacs-overlay. See here. Why are you trying to use pgtk or gtk on mac? I would not try to use pgtk unless on Wayland or WSL with Wayland. |
@noctuid thanks! I wasnt planing on using pgtk, but since the standard one was not working I wanted to try if different ones would behave differently, but thanks will try with that one :) @brorbw thanks, yes the brew version also works for me, but i've switched everything to nix and emacs is the last straggler that's why i asked noctiud since he mentioned he uses nix as well update: I'm giving up on getting emacs/yabai to work via nix, will just use the emacs-plus versions which works fine for me, nix + patches i can only get it to tile if i launch it with |
Yeah, I found The other issue is probably solvable by just explicitly setting |
yes, with emacs-plus i dont have any issues, everything works mostly, sometimes if i run |
I take back what I said about undecorated-round. I've been using it for months without issue. Not sure what your setup is, but I don't have any issues with skhd. |
I recently switched from "regular" brew emacs to https://github.com/railwaycat/homebrew-emacsmacport. Using spacemacs, tiling would not work until I changed the following line in
To check whether spacemacs is the problem, you can break your .spacemacs with a syntax error (or maybe rename it? didn't try). Broken .spacemacs will open in recovery mode which looks like: Try tiling this window. For me it worked, which pointed to spacemacs as the issue. |
Per yabai documentation, this makes emacs better behaved with yabi: koekeishiya/yabai#86
Has anyone encountered the issue where Steps to reproduce:
|
From a straight install Emacs won't tile with the rest of the windows, so I figured out that if I run
'yabai -m rule --add app=Emacs manage=on' after starting emacs it will tile with the other windows but I have 2 problems
The text was updated successfully, but these errors were encountered: