exwm icon indicating copy to clipboard operation
exwm copied to clipboard

exwm loses track of, or can't switch back, to x app buffer under doom emacs

Open vigilancetech-com opened this issue 5 years ago • 8 comments

with this in my doom config.el file:

(use-package! exwm-config
  :commands exwm-config-example
  :custom ((exwm-layout-auto-iconify nil)
           (exwm-workspace-show-all-buffers t))
  :hook doom-mark-buffer-as-real-h)

(exwm-config-example)

and this in my packages.el file:

(package! exwm)

when I first power up doom and start an X app (e.g. the brave browser) then I switch away from it to a doom buffer, I can't switch back. Now that I've added those custom variables I can see the X buffer when I do SPC-b-B but I can't switch to it. Before I couldn't even see the buffer anymore.

Even when I bring up the buffer list with C-x b I can't put the cursor on it and hit RET and get into it. I can't hit it with buffer next/prev either. I basically have to start brave again and then I end up with "Brave-browser<2>" (e.g. a second version) and I can't even get there from the second one.

This may be due to switching away from the first buffer before it has fully come up (but it is definitely well on its way as the screen has cleared and the url field and bookmark/toolbar is visible).

vigilancetech-com avatar May 17 '20 03:05 vigilancetech-com

As an addendum, upon preliminary examination it only appears to be when my ~/.doom.d/config.el file is open (and then trying to switch to brave switches to that instead).

When I kill that buffer I can find brave again.

vigilancetech-com avatar May 17 '20 04:05 vigilancetech-com

Now that you have exwm-workspace-show-all-buffers turned on, you may also want to turn on exwm-layout-show-all-buffers. Not sure about your workflow but it seems you switched workspace.

ch11ng avatar May 17 '20 09:05 ch11ng

Now that you have exwm-workspace-show-all-buffers turned on, you may also want to turn on exwm-layout-show-all-buffers. Not sure about your workflow but it seems you switched workspace.

Thanks, I'll try it. It seems I kind of can get to my x-apps but only thru the "Frame" entry of my "Buffers" menu item.

I'm not exactly sure what ANY of these variables do precisely

vigilancetech-com avatar May 19 '20 04:05 vigilancetech-com

Try:

  • C-h v exwm-workspace-show-all-buffers, and
  • C-h v exwm-layout-show-all-buffers.

Let me know if it is not clear or you have further questions.

medranocalvo avatar May 20 '20 14:05 medranocalvo

Is there now a module for exwm maintained by Doom? Where did you get the exwm-config package from? That mark-buffer-as-real hook doesn't look right, there's a specific hook for that. Its exwm-mode-hook.

Therefore without using the doom (package!) syntax your hook would look like this: (add-hook 'exwm-mode-hook #'doom-mark-buffer-as-real-h)

You can read more about the workaround here: https://github.com/hlissner/doom-emacs/issues/1799

nanjigen avatar Jun 26 '20 07:06 nanjigen

Thanks @nanjigen !

@vigilancetech-com Is your problem solved?

ch11ng avatar Jul 12 '20 07:07 ch11ng

@ch11ng not really and I bailed on EXWM for now

vigilancetech-com avatar Aug 25 '20 19:08 vigilancetech-com

That happens to me too. I am not using doom. So far it only happens with brave and only when I switch from a non EXWM buffer to brave. Everything OK when I go from one EXWM to brave. By clicking on brave I gain the focus and everything is normal.

med-merchise avatar Sep 14 '22 18:09 med-merchise