all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: An alternative to a monolithic ~/.emacs init file
Date: Tue, 13 Nov 2007 20:26:31 +1100	[thread overview]
Message-ID: <87wssm4htk.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 1194927694.712025.269720@v23g2000prn.googlegroups.com

rustom <rustompmody@gmail.com> writes:

>> Note that your 'fix' i.e. putting a (provide 'sb.info) is only hiding the
>> problem and not actually fixing it. If your running emacs 22 and still have
>> a stand-alone version of speedbar installed, you could just remove the
>> stand-alone version.
>>
>> Tim
>
> Just tried this. Evidently ecb has a dependency to speedbar.  So
> removing speedbar means removing ecb.
> Anyhow went ahead with this assuming that in emacs 22 these things are
> in the base install.
> This removed cedet-contrib, cogre, ecb, ede, semantic and speedbar
> Now ecb does not work. speedbar standalone works but that is really
> ugly compared to ecb.
>
> I am running emacs-snapshot-gtk under debian etch
> M-x version gives GNU Emacs 22.1.50.1
>

Ah, yep, your running into one of the issues with using a distro packaging
system. Packages like ecb depend on a stand alone speedbar package (as do
the others you listed, but don't know about speedbar now being packaged in
emacs itself. I'm not sure if you could use the force option to apt to
install ecb or not. The other issue may also be that I think the bundled
speedbar version in emacs 22 is older than the version in the stand alone
package (at least, this was the case some time back before emacs 22 was
released.)

From memory, when I looked at this the problem was emacs getting confused
due to mixups in the emacs bundled speedbar .el files and the ones that are
part of the stand alone version. Due to changes in these files, a circular
dependency arises where one file 'requires' the second file and the second
file 'requires' the first one. 

I'm very surprised your (provide 'sb-info) works though. Essentially, by
putting a provide statement into your file tells it that the definitions
have been loaded and there is no need to load the file. I would have
thought this would break things as the file has not been loaded (unless its
somehow loaded somewhere else). 

I'd check the bug reports for ecb - its likely a bug has been reported and
there could be a better fix provided. Alternatively, it may be possible to
get around the issue by re-jigging load paths so that a more consistent
behavior occurs. 

On your original question regarding breaking up your .emacs. I've taken a
very simple approach, but it works really well for me. 

All my customizations apart from the auto-generated 'custom' sections are
in their own files (broken up into groups of functionality). At the end of
each file, I just put a (provides blah). All the files are in ~/.emacs.d
I add the directory to my load path in .emacs and then just have (require
'blah)  line for the things I want loaded. 

This means my .emacs consists of only a couple of add-to-list statements
that add to my load-path and lines of require statements followed by the
customize section. 

What I like about this approach is that if I want to stop loading some bit
of my extensions, I just comment out the appropriate require line. I find
this quick and simple. Its only downside is that I have to edit my .emacs
to stop one of my extensions from being loaded. 

Originally, I used a system that was very similar to the way Debian loads
its various setup files from /etc/emacs/site-start.d et. al. This wasn't
bad because I could change what was loaded by simply moving the file out of
my .emacs.d directory and didn't need to edit the .emacs file. However, I
ended up dropping this approach, but to be honest, can't remember why. 

There is also the initz emacs package. This package allows you to split
your emacs config over various files, can control what is loaded based on
the version of emacs you are running and had some other fairly advanced
features. However, it was a bit overly complex or over engineered for my
needs. Probably very good if your someone who uses emacs and xemacs at the
same time.

tim

-- 
tcross (at) rapttech dot com dot au

  reply	other threads:[~2007-11-13  9:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2759.1193756709.18990.help-gnu-emacs@gnu.org>
2007-11-07 17:13 ` An alternative to a monolithic ~/.emacs init file rustom
2007-11-08 13:08   ` Sebastian Tennant
     [not found]   ` <mailman.3126.1194527313.18990.help-gnu-emacs@gnu.org>
2007-11-08 19:53     ` rustom
2007-11-09 14:18       ` Sebastian Tennant
     [not found]       ` <mailman.3180.1194617919.18990.help-gnu-emacs@gnu.org>
2007-11-10 12:18         ` rustom
2007-11-10 17:13           ` Tom Tromey
     [not found]           ` <mailman.3247.1194750639.18990.help-gnu-emacs@gnu.org>
2007-11-11 15:29             ` rustom
2007-11-12 21:56               ` Tim X
2007-11-13  4:21                 ` rustom
2007-11-13  9:26                   ` Tim X [this message]
2007-11-14  3:52                     ` rustom
2007-11-13  1:22             ` rustom
2007-11-11  0:09       ` Francisco Miguel Colaço
2007-10-30 15:04 Sebastian Tennant
2007-10-30 20:30 ` Sebastian Tennant

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=87wssm4htk.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --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.