Comment 18 for bug 1018996

Revision history for this message
Yaroslav Halchenko (yarikoptic) wrote : Re: [Bug 1018996] Re: inconvenient window splitting behavior

On Thu, 20 Dec 2012, Andreas Roehler wrote:
> > If splitting and switching are both off emacs should not change my
> > window layout in anyway, if the buffer with the results is hidden, that
> > is my problem.
> okay, that's reasonable.
good

> I would like if there was a toggle that was basically
> > 'leave-my-windows-exactly-as-they-were' that will turn off all of the
> > window management (if you think this is a reasonable idea, I will try to
> > write it).
> Great. So I'm looking forward for your patch.
> BTW would welcome a new report for this, not to mix up several different scenarios, but that's up to you.

yikes -- why 1 more switch??? as you guys discussed, when both flags are
off (i.e. no splitting, no focusing) -- it should already behave as
'leave-my-windows-exactly-as-they-were'

imho (and I think I described it before) it should be:

# sorry for py-seudo code -- I have little clue in elisp
if py-switch-buffers-on-execute-p:
   if *Python* buffer is visible:
       switch focus to it (no additional splitting, blinking, etc)
   else:
      if py-split-windows-on-execute-p:
         split code buffer and switch to the shell split
      else:
         do not split -- just bring *Python* buffer up inplace of
         current code buffer
else:
   if py-split-windows-on-execute-p:
       if *Python* buffer is visible already:
          # DO NOTHING
       else:
          split current buffer, show *Python* in the 2nd split
   else:
       # DO NOTHING

--
Yaroslav O. Halchenko
Postdoctoral Fellow, Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik