Re: bump : *EDE Shell v2* buffer consecutively kills other windows content
"Eric M. Ludlam" <[email protected]>
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
On 10/13/2014 11:15 AM, Xaver Gerster wrote: > Hi Eric, > > > ... you may need to start commenting out chunks of your .emacs file > > to see what might be the cause. > > Actually, I did that before settling down to post the issue here. The > simplest init.el I get this problem with is just > > (global-ede-mode 1) > (setq ede-project-directories t) > (require 'ede/proj-prog) > > where probably the 2nd and 3rd line could also be dropped. Moreover, I > get the issue with both, the ede version built into Emacs (ver. 24.3.1) > and the one from bazar. > So I don't really know what other tools should interfere with EDE at > that level. > Once again: using just this init.el, starting Emacs, opening some > 'main.cc' from a project, typing 'C-c . R' once, pops up an *EDE Shell > v2* window, which splits the Emacs pane. Typing 'C-c . R' a 2nd time, > will not reuse the *EDE Shell v2* window, but place another *EDE Shell > v2* buffer into the window previously containing 'main.cc'. I installed GNU hello to try out the shell, and found what it is. The program that runs the command in the shell calls `shell' to init the buffer. This used to be harmless, but now it calls a function that effectively replaces the contents of the current window with the shell buffer. I hadn't understood what you had originally asked, and thought you meant that the buffer was killed, not that the window contents were replaced. I've attached a patch. I would have just checked it in, but bzr is giving me some sort of lock error on that file preventing me from checking it in. > PS.: when you say > > I haven't used that feature in a while, .... > do you imply that there are other, more preferred ways to run > executables from within EDE? These days the code I write in Emacs is for Emacs, Arduino, Android, and Matlab, none of which have a "run on the unix command line" thing to do. Eric ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel
shell.el.patch
(text/x-patch, 1.7 KB)
=== modified file 'lisp/cedet/ede/shell.el' *** lisp/cedet/ede/shell.el 2013-01-31 20:50:32 +0000 --- lisp/cedet/ede/shell.el 2014-10-14 01:32:40 +0000 *************** *** 1,6 **** ;;; ede/shell.el --- A shell controlled by EDE. ;; ! ;; Copyright (C) 2009-2013 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam <[email protected]> --- 1,6 ---- ;;; ede/shell.el --- A shell controlled by EDE. ;; ! ;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam <[email protected]> *************** *** 42,51 **** ;; Show the new buffer. (when (not (get-buffer-window buff)) (switch-to-buffer-other-window buff t)) ! ;; Force a shell into the buffer. ! (shell buff) ! (while (eq (point-min) (point)) ! (accept-process-output)) ;; Change the default directory (if (not (string= (file-name-as-directory (expand-file-name default-directory)) (file-name-as-directory (expand-file-name dd)))) --- 42,56 ---- ;; Show the new buffer. (when (not (get-buffer-window buff)) (switch-to-buffer-other-window buff t)) ! ;; Force a shell into the buffer, but only if the buffer ! ;; doesn't already have a shell in it. ! ;; Newer versions of `shell' pop the window forward. ! (set-buffer buff) ! (when (not (eq major-mode 'shell-mode)) ! (shell buff) ! ;; Make sure the shell has started. ! (while (eq (point-min) (point)) ! (accept-process-output))) ;; Change the default directory (if (not (string= (file-name-as-directory (expand-file-name default-directory)) (file-name-as-directory (expand-file-name dd))))