all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs as an IDE
Date: Tue, 16 Oct 2007 00:33:57 +0200	[thread overview]
Message-ID: <87y7e457oq.fsf@post.rwth-aachen.de> (raw)
In-Reply-To: 5ni64aFi61kaU1@mid.uni-berlin.de

>>>>> "Richard" == Richard G Riley <Richard> 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

  reply	other threads:[~2007-10-15 22:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14 19:01 Emacs as an IDE polymedes
2007-10-14 19:54 ` Thorsten Bonow
2007-10-15 13:29   ` Richard G Riley
2007-10-15 20:33     ` Thorsten Bonow
2007-10-15 21:58       ` Richard G Riley
2007-10-15 22:33         ` Thorsten Bonow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-04  1:06 Emacs IDE Ahmed Sorour
2017-03-04  8:34 ` tomas
2017-03-04  8:42   ` Krishnakant
2017-03-05 14:47     ` Emacs as an IDE Francis Belliveau
2017-03-05 15:41       ` tomas
2017-03-08  1:12         ` Francis Belliveau
2017-03-08  7:13           ` Krishnakant
2017-03-05 16:45       ` Anast Gramm
2017-03-06  7:59         ` Krishnakant
2003-10-09  8:11 emacs as an ide Martin
2003-10-09 13:06 ` Phillip Lord
2003-10-09 17:56 ` Pascal Bourguignon
2003-10-09 18:52 ` kgold
2003-10-10 10:05 ` Martin
2003-10-10 12:59   ` Phillip Lord
2003-10-16 21:18   ` Kai Grossjohann
2003-10-17 15:39     ` Bruce Ingalls
2003-10-17 21:38       ` LEE Sau Dan
2003-10-17 21:43       ` Jason Rumney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7e457oq.fsf@post.rwth-aachen.de \
    --to=thorsten.bonow@post.rwth-aachen.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.