From: Matt Proud <matt.proud@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help
Date: Wed, 20 Jan 2010 08:52:28 -0800 (PST) [thread overview]
Message-ID: <bc5b411c-75cc-49e3-ac60-1985d82b0535@y23g2000yqm.googlegroups.com> (raw)
In-Reply-To: 87k4vpoaec.fsf@lion.rapttech.com.au
This is an especially good idea. I declared .emacs bankruptcy about
two years ago, refactored for configuration and third-party imports
into separate files, and never turned back.
Another good tip is to put your Emacs configuration directory into
version control---e.g., Git. If you're dilligent about keeping good
comments in revision logs, you could just roll back to other dates
when things go South. I declared general dot-file bankruptcy and put
all my major ones in Git a while back. It makes life so simple
between work, my laptop, and my desktop, too.
Good luck!
On Jan 10, 2:36 pm, Tim X <t...@nospam.dev.null> wrote:
> Cecil Westerhof <Ce...@decebal.nl> writes:
> > "Rhey, David" <dr...@umich.edu> writes:
>
> >> There is a list of things that comes before this error, and a small suggestion
> >> to run ??debug-init? after it. I?ve been working on this off and on for awhile
> >> now, but haven?t made any breakthroughs. Any help or insight would be most
> >> appreciated.
>
> > What I always find useful when debugging -and that is what you need to
> > do- is commenting things out.
> > I just would comment almost everything out and then start Emacs. If it
> > goes alright, there is no problem with that. Then uncomment something,
> > etc. When you know which code gives the problem, it is easier to solve.
> > And if you can not solve it, you can 'exactly' tell what the problem is
> > and it is easier for the people here to solve it.
>
> When you have an error in a .emacs file, especially if its a very large
> one, I find the following useful.
>
> 1. Run with --debug-init. This will provide a backtrace which is often
> enough to find the offending line.
>
> 2. If that doesn't help, a 'binary search' approach is often helpful.
> Rather than commenting out all the lines, put a couple of message lines
> in. Start with a line at around half way in the file i.e.
>
> (Message "Got to checkpoint 1")
>
> The error will either be in the first half or the second half. So, next
> time you start emacs, check the messages buffer. If your message is in
> there, you know your error is in the second half of the file, otherwise,
> its in the first half.
>
> Once you have narrowed it down to which half, put another message
> halfway in that half i.e.
>
> (message "Got to checkpoint 2)
>
> Keep repeating the process until you narrow down to the command with the
> error.
>
> Another thing I do to make management of my .emacs easier is that I
> break of related functionality into its own file. I put all these files
> into a directory and add that directory to the emacs load-path. Each
> file ends with a 'provides' line. I then just have 'require' lines in my
> .emacs. For example, I have all my org mode stuff in a file called
> tx-org.el. The last line of that file is
>
> (provide 'tx-org)
>
> In my .emacs I have a couple of lines at the top which set my private
> elisp directories and then I have something like
>
> (require 'tx-org)
>
> I find this helps prevent my .emacs from becoming to large and clutterd
> and I can add/remove related config settings just by
> commenting/uncommenting one line in my .emacs. Another nice side effect
> is that when I do have an error and I run debug-init, it usually clearly
> indicates which of my config files the error is in, making it quick to
> track down.
>
> Tim
>
> --
> tcross (at) rapttech dot com dot au
next prev parent reply other threads:[~2010-01-20 16:52 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.771.1263114721.18930.help-gnu-emacs@gnu.org>
2010-01-10 9:57 ` Help Cecil Westerhof
2010-01-10 22:36 ` Help Tim X
2010-01-20 16:52 ` Matt Proud [this message]
2023-01-13 2:43 help josh parson
2023-01-16 4:25 ` help Richard Stallman
2023-01-16 5:20 ` help Jim Porter
-- strict thread matches above, loose matches on Subject: below --
2016-05-07 15:07 Help 庄 子恒
2016-05-08 4:03 ` Help Kaushal Modi
2016-05-08 7:12 ` Help Guillermo Vaya
2016-05-08 13:39 ` Help John Mastro
2016-05-09 0:47 ` Help Emanuel Berg
2016-05-09 8:42 ` Help Dejan Jocic
2016-05-09 9:30 ` Help Bob Proulx
2016-05-09 10:03 ` Help Dejan Jocic
2016-05-10 5:36 ` Help Bob Proulx
2016-05-10 6:09 ` Help Dejan Jocic
2016-05-10 23:17 ` Help Emanuel Berg
2016-05-11 8:57 ` Help Dejan Jocic
2016-05-14 3:52 ` Help Emanuel Berg
2016-05-11 0:31 ` Help John Mastro
2016-05-11 8:45 ` Help Dejan Jocic
2016-05-14 3:49 ` Help Emanuel Berg
[not found] <mailman.80.1454259641.17556.emacs-orgmode@gnu.org>
2016-01-31 21:51 ` Help Heartsayer
[not found] <mailman.1794.1443178478.19560.help-gnu-emacs@gnu.org>
2015-09-25 11:07 ` help Joost Kremers
2015-09-25 7:18 help ss
2015-09-25 11:00 ` help tomas
2015-09-27 17:21 ` help Artur Malabarba
2015-09-27 17:49 ` help Marcin Borkowski
2015-09-27 18:28 ` help Artur Malabarba
2015-09-27 20:02 ` help Marcin Borkowski
2015-09-28 1:37 ` help Kaushal Modi
2015-09-28 11:03 ` help Artur Malabarba
2014-09-02 16:07 help Moritz Kiefer
2014-10-12 12:10 ` help Bastien
2010-01-05 16:17 Help Rhey, David
2010-01-05 19:11 ` Help Tassilo Horn
2008-06-09 16:36 Help ila
2008-06-09 19:47 ` Help Xah
2008-06-10 0:29 ` Help Nikolaj Schumacher
2008-06-10 17:01 ` Help Joel J. Adamson
2008-06-09 16:00 help 江林
2008-06-09 19:39 ` help Xah
2007-12-13 5:42 help HANS jackman
2007-12-13 17:38 ` help Mike Mattie
2007-12-13 19:16 ` help Sebastian Tennant
[not found] <mailman.2698.1177883418.7795.help-gnu-emacs@gnu.org>
2007-04-29 22:07 ` Help Harald Hanche-Olsen
2007-04-29 6:45 Help Mahesh HM
2005-08-03 14:07 Help Rich Hojsack
2005-12-15 15:35 ` Help Kevin Rodgers
2004-12-15 12:53 help fisherssml
2004-06-08 7:52 Help patrizia d'ippolito
2005-12-13 23:32 ` Help Richard M. Stallman
2005-12-14 7:55 ` Help Juri Linkov
2005-12-14 16:34 ` Help Kevin Rodgers
2005-12-14 19:15 ` Help Eli Zaretskii
2005-12-15 2:07 ` Help Richard M. Stallman
2005-12-15 8:16 ` Help Werner LEMBERG
2002-10-20 7:57 Help swk
2002-10-24 13:01 ` Help Jesper Harder
2002-10-24 21:45 ` Help swk
2002-10-29 21:56 ` Help swk
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=bc5b411c-75cc-49e3-ac60-1985d82b0535@y23g2000yqm.googlegroups.com \
--to=matt.proud@gmail.com \
--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.