emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: wrong-type-argument when changing TODO state [7.7]


From: Nick Dokos
Subject: Re: [O] Bug: wrong-type-argument when changing TODO state [7.7]
Date: Mon, 29 Aug 2011 19:02:48 -0400

I'm pretty tired and I might have misunderstood what is happening here,
so don't put too much weight on the following. I'll need some sleep
before I can take a whack at it again however.

Nick

Nick Dokos <address@hidden> wrote:

> Stelian Iancu <address@hidden> wrote:
> 
> 
> > > So it is a customization issue. Now the question is what :-). I should
> > > mention that I am using both dev versions for Emacs and org-mode
> > > (Emacs from bzr from a few days ago and org-mode from git from a few
> > > days ago) on Mac OS X 10.7. Emacs is installed using homebrew.
> > >
> > 
> > Ok, it seems like I've found the culprit. It's this line:
> > 
> > ;; Make org-mode default for all the new files
> > (setq major-mode 'org-mode)
> > 
> > If I comment it out, it all works beautifully. I thought it was
> > because I was executing it before loading org-mode, but I've made sure
> > org-mode is loaded before executing that line and I still get the same
> > error.
> > 
> > Any ideas why it happens?
> > 
> 
> Yes - don't ever do that. The major mode of a buffer is set by calling a
> function (e.g. the org-mode function for buffers that should be in org
> mode).  That function does a million things to make sure that everything
> works properly: your setting a single variable does none of that and all
> you end up doing is confusing emacs.
> 
> In most cases, you don't even call the mode function explicitly: it is
> called for you automatically, e.g. through the setting of auto-mode-alist.
> I have the following in my basic customizations:
> 
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> 
> That says to emacs: when find-file is called to open a file whose name
> ends in `.org' arrange to call the function org-mode on it. The function
> takes care of the setting of major-mode.
> 
> Be sure to read Ch.23 of the emacs manual on major modes.
> 
> Nick
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]