all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hadron Quark <hadronquark@gmail.com>
Subject: Re: emacs and buffer switching
Date: Wed, 06 Dec 2006 18:30:30 +0100	[thread overview]
Message-ID: <c1vekpyls9.fsf@gmail.com> (raw)
In-Reply-To: mailman.1603.1165425138.2155.help-gnu-emacs@gnu.org

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Hadron Quark wrote:
>> I have a c-mode-common hook which activates ecb (code browser) when I
>> load a c file. But how to activate it when I switch to an existing c
>> buffer? I am already switching layouts with winring, but wish for the
>> ecb layout to pop up if I switch from a single buffer frame to an
>> already loaded c file.
>
> c-mode-common-hook is the wrong place to do that.  But something like
> this might work for you:
>
> (defun ecb-window-configuration ()
>   (when (derived-mode-p 'c-mode)
>     ;; activate ECB here
>     ))
>
> (add-hook 'window-configuration-change-hook 'ecb-window-configuration)

Thanks Kevin : almost there.

ecb activates, but I get (instead of the c file in the right hand buffer):

Warning: `semantic-before-toplevel-bovination-hook' is an obsolete variable;
    use `semantic--before-fetch-tags-hook' instead.
Error: Wrong type argument: window-live-p, #<window 53>


Advice on how to track down the problem?

Also, what code to turn off ecb if its not a c-mode derivative? Some
form of "else" in the code above which then calls ecb-deactivate()?

  parent reply	other threads:[~2006-12-06 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06  0:09 emacs and buffer switching Hadron Quark
2006-12-06 17:11 ` Kevin Rodgers
     [not found] ` <mailman.1603.1165425138.2155.help-gnu-emacs@gnu.org>
2006-12-06 17:30   ` Hadron Quark [this message]
2006-12-06 20:57     ` Kevin Rodgers
     [not found]     ` <mailman.1615.1165438755.2155.help-gnu-emacs@gnu.org>
2006-12-06 21:32       ` Hadron Quark
2006-12-07 19:39         ` Kevin Rodgers
     [not found]         ` <mailman.1649.1165520479.2155.help-gnu-emacs@gnu.org>
2006-12-13  0:01           ` Hadron Quark

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=c1vekpyls9.fsf@gmail.com \
    --to=hadronquark@gmail.com \
    /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.