tlh / workgroups.el

workgroups for windows -- sexy window management for emacs
242 stars 30 forks source link

"buffer name X is in use" error disrupts workgroup switch #26

Open simonmichael opened 13 years ago

simonmichael commented 13 years ago

When switching workgroups I get this "buffer name in use" error quite often, not sure why. Maybe when two workgroups have a window open on the same buffer, or the new workgroup has two windows open on it.

Secondly, when it happens the windows have changed to the new workgroup's layout, but you are actually still in the old workgroup. You probably won't notice and will end up saving over the old workgroup and confusing yourself.

So it would be great to have this just work. Here's a (cropped) traceback in case it helps:

 Debugger entered--Lisp error: (error "Buffer name `ANNOUNCE' is in use") 
   ad-Orig-rename-buffer("ANNOUNCE" nil)                                  
   rename-buffer("ANNOUNCE")                                              
   wg-switch-to-window-buffer(((type . window) (edges 59 0 118 10) (bname 
   wg-restore-window(((type . window) (edges 59 0 118 10) (bname . "ANNOUN
   inner(((type . window) (edges 59 0 118 10) (bname . "ANNOUNCE") (fname 
   inner(((type . wtree) (dir . t) (edges 59 0 118 65) (wlist ((type . win
   inner(((type . wtree) (dir) (edges 0 0 239 65) (wlist ((type . wtree) (
   wg-restore-wtree(((type . wtree) (dir) (edges 0 0 239 65) (wlist ((type
   wg-restore-wconfig(((type . wconfig) (left . 3) (top . 22) (width . 236
   wg-restore-workgroup(((type . workgroup) (uid . 52) (name . "hledger do
   wg-switch-to-workgroup(((type . workgroup) (uid . 52) (name . "hledger 
   call-interactively(wg-switch-to-workgroup nil nil)