Re: ECB Window management bug (Customize/EShell/VC-Log...)

finalpatch <[email protected]>
Newsgroups gmane.emacs.code-browser
Message-ID <[email protected]>
finalpatch <[email protected]> writes:

> finalpatch <[email protected]> writes:
>
>> Hi, 
>>
>> I found this bug particularly annoying. Steps to reproduce:
>>
>> Start Emacs (emacs shows the scratch buffer)
>> M-x ecb-activate (ecb windows created around the scratch window)
>> M-x customize (emacs switches to an EMPTY Customize buffer, the
>> customize stuff is inserted to the scratch buffer rather than the
>> customize buffer)
>>
>> The same thing happens for Eshell as well(and VC-log when you hit C-x v
>> v on a version controled file to commit it). With ECB active, running
>> Eshell will cause the command prompt being insert into the buffer you
>> were editing.
>
> Sorry, forgot to mention that my Emacs version is 
>
> GNU Emacs 23.0.60.1 (i386-mingw-nt6.0.6001) of 2008-12-31
>
> And I use the latest CVS ECB.

After digging into the code a bit, I've come up with a solution. The
following patch should fix the problem described in the orignial
post. This is due to Emacs's 'pop-to-buffer' implies selecting that
buffer, but ECB's adviced version does do this, which causes all
subsequent commands get sent to the wrong buffer.

--- ecb-layout.el.~1.258.~	Thu May  8 22:03:44 2008
+++ ecb-layout.el	Mon Jan  5 16:48:43 2009
@@ -1707,6 +1707,7 @@
                                    (ad-get-arg 0) (ad-get-arg 1))
            (select-window (display-buffer (ad-get-arg 0)
                                           (ad-get-arg 1)))
+           (switch-to-buffer (ad-get-arg 0))
            (if (ad-get-arg 2)
                ;; not the best solution but for now....
                (bury-buffer (ad-get-arg 0))))


-- 
finalpatch


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.