From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: Emacs as an IDE Date: Tue, 16 Oct 2007 00:33:57 +0200 Message-ID: <87y7e457oq.fsf@post.rwth-aachen.de> References: <1192388519.268928.197890@q3g2000prf.googlegroups.com> <87zlylwjy6.fsf@post.rwth-aachen.de> <5nh89pFia5ciU1@mid.uni-berlin.de> <873awc6ruf.fsf@post.rwth-aachen.de> <5ni64aFi61kaU1@mid.uni-berlin.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192491081 7115 80.91.229.12 (15 Oct 2007 23:31:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2007 23:31:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 16 01:31:10 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IhYco-0005zd-97 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Oct 2007 00:41:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhYch-00080g-Cp for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Oct 2007 18:41:19 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 169 Original-X-Trace: news.dfncis.de rQf9Hxeyau3iPCUmQNQUjgJ3CDnoHw7ZUSeciXoD3/56E/caZP72rlpCZh Cancel-Lock: sha1:jZDUkFGUpIIuhaFCfDim8n7JeTc= sha1:o2tLD6QcfR2hzMUSK+eGAiG8IVg= User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.20 (linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:152975 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48472 Archived-At: >>>>> "Richard" == Richard G Riley writes: [...] >> If you are interested, I can post my setup here, but be warned: there are >> a lot of settings related to cedet and ecb, and I have no time to sort >> everything superflous for your problem out. >> >> Toto Richard> Please do. Here it comes; you have been warned :-) Feel free to ask questions... I hope I have more time in the next days... Toto ;; ** cedet and ecb (defvar my-cedet-directory (concat "~" init-file-user "/elisp/" "emacs/" "cedet-1.0pre3") "Directory where cedet is installed.") (if (not (file-exists-p my-cedet-directory)) (message "Not loading cedet...") (message "Loading cedet...") ;; Load CEDET ;; (setq semantic-load-turn-useful-things-on t) (load-file (concat my-cedet-directory "/common/" "cedet.elc")) ;; Enabling various SEMANTIC minor modes. See semantic/INSTALL for more ideas. ;; Select one of the following (semantic-load-enable-code-helpers) ;; (semantic-load-enable-guady-code-helpers) ;; (semantic-load-enable-excessive-code-helpers) (if (file-exists-p "/var/tmp/semantic") (setq semanticdb-default-save-directory "/var/tmp/semantic") (message "/var/tmp/semantic directory does not exist!")) ;; ECB (defvar my-ecb-directory (concat "~" init-file-user "/elisp/" "emacs/" "ecb-2.32") "Directory where cedet is installed.") (if (not (file-exists-p my-ecb-directory)) (message "Not loading ECB...") (message "Loading ECB...") (add-to-list 'load-path my-ecb-directory) (require 'ecb) (setq ecb-tip-of-the-day nil) (set-face-background 'ecb-tag-header-face "brown") (set-face-background 'ecb-default-highlight-face "maroon") ;; *** my-ecb-goto-other-edit-window ;; bound to viper macro "ESC ee" (defun my-ecb-goto-other-edit-window () "Call ecb-goto-window-edit2, if that returns nil, call ecb-goto-window-edit1." (interactive) (if (ecb-goto-window-edit2) () (ecb-goto-window-edit1))) ;; *** solve incompatibilities of ecb with other packages ;; **** ecb and partial windows (setq truncate-partial-width-windows nil) ;; **** ecb and calendar (add-hook 'initial-calendar-window-hook (function (lambda () (or (one-window-p t) (/= (frame-width) (window-width)) (and ecb-minor-mode (ecb-point-in-edit-window))) (shrink-window (- (window-height) 9))))) ;; **** ecb and calculator (not calc) (setq calculator-electric-mode t) ;; **** ecb and calc (defvar my-ecb-windows-hidden-for-calc nil "Indicate if ECB windows were visible before `calc' was called.") (defun my-ecb-calc-adapt () "This defun hides ECB windows if ECB is active and ECB windows are not hidden. Only to be called by advice to `calc' function." (if (equal ecb-minor-mode nil) (setq my-ecb-windows-hidden-for-calc nil) (ecb-deactivate) (setq my-ecb-windows-hidden-for-calc t))) (defun my-ecb-calc-quit-adapt () "This defun unhides ECB windows if ECB is active and ECB windows are hidden and my-ecb-windows-hidden-for-calc is t. Only to be called by advice to `calc-quit'." (if (equal my-ecb-windows-hidden-for-calc t) (ecb-activate))) (defadvice calc (before my-ecb-calc-advise) "Delete other windows and hide ECB windows before running `calc'." (delete-other-windows) (my-ecb-calc-adapt)) (defadvice calc-quit (after my-ecb-calc-quit-advise) "Restore ECB windows when quitting `calc' if necessary." (my-ecb-calc-quit-adapt)) (ad-activate 'calc) (ad-activate 'calc-quit) ;; **** ecb and mew (defvar my-ecb-windows-hidden-for-mew nil "Indicate if ECB windows were visible before `mew' was called.") (defun my-ecb-mew-adapt () "This defun hides ECB windows if ECB is active and ECB windows are not hidden. Only to be called by advice to `mew' function." (if (equal ecb-minor-mode t) (if (equal ecb-frame (selected-frame)) (if (equal ecb-windows-hidden t) (setq my-ecb-windows-hidden-for-mew nil) (ecb-toggle-ecb-windows) (setq my-ecb-windows-hidden-for-mew t))))) (defun my-ecb-mew-summary-suspend-or-quit-adapt () "This defun unhides ECB windows if ECB is active and ECB windows are hidden and my-ecb-windows-hidden-for-mew is t. Only to be called by advice to `mew-summary-suspend' or `mew-summary-quit'." (if (equal ecb-minor-mode t) (if (equal ecb-frame (selected-frame)) (if (equal ecb-windows-hidden t) (if (equal my-ecb-windows-hidden-for-mew t) (ecb-toggle-ecb-windows))))) (setq my-ecb-windows-hidden-for-mew nil)) (defadvice mew (before my-ecb-mew-advise) "Delete other windows and hide ECB windows before running `mew'." (delete-other-windows) (my-ecb-mew-adapt)) (defadvice mew-summary-suspend (after my-ecb-mew-summary-suspend-advise) "Restore ECB windows when suspending `mew-summary' if necessary." (my-ecb-mew-summary-suspend-or-quit-adapt)) (defadvice mew-summary-quit (after my-ecb-mew-summary-quit-advice) "Restore ECB windows when quitting `mew-summary' if necessary." (my-ecb-mew-summary-suspend-or-quit-adapt)) (ad-activate 'mew) (ad-activate 'mew-summary-suspend) (ad-activate 'mew-summary-quit) ;; *** ecb customization (setq ecb-process-non-semantic-files t) (setq ecb-fix-window-size 'auto) (setq ecb-layout-name "left3") (setq ecb-toggle-layout-sequence '("leftright1" "left3")) (cond ((string-match "herrrossi" (system-name)) (setq ecb-windows-width 0.20) ) ((string-match "gastone" (system-name)) (setq ecb-windows-width 0.31) )) (add-hook 'ecb-activate-hook (lambda () 'vc-delete-logbuf-window nil)) (add-hook 'ecb-deactivate-hook (lambda () 'vc-delete-logbuf-window t)) (defun my-ecb-toggle-ecb-windows() "Call `ecb-toggle-ecb-windows' or `ecb-activate' if ECB has not been activated before." (interactive) (if (equal ecb-minor-mode t) (ecb-toggle-ecb-windows) (ecb-activate))) (global-set-key [f3] 'my-ecb-toggle-ecb-windows) (global-set-key [S-f3] 'ecb-toggle-layout) )) -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow It was Christmas Eve and all the salamis in the window of the Carnegie Deli had been hung with care. It was two o'clock in the morning and I was drifting by the window like a secular ghost in the rain when suddenly, between two salamis, I saw something that made me stop on a dime and pick it up. Kinky Friedman: Musical Chairs