From: Stelian Iancu <stelian.iancu@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: wrong-type-argument when changing TODO state [7.7]
Date: Tue, 30 Aug 2011 09:47:28 +0200 [thread overview]
Message-ID: <CAKvLAoihCYQAYA5tpe8jzt2xEhf7ThqcvAmAG3oB00Yzdj=O8Q@mail.gmail.com> (raw)
In-Reply-To: <6210.1314657464@alphaville.americas.hpqcorp.net>
On Tue, Aug 30, 2011 at 00:37, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Stelian Iancu <stelian.iancu@gmail.com> 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
>
Many thanks Nick for all your help and detailed explanations! I am
doing the same thing as you do, I'm keeping the config for all the
different Emacs modules in different config files. This allowed me to
quickly find the issue and now I've removed that line from the generic
config.
S.
next prev parent reply other threads:[~2011-08-30 7:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-28 11:24 Bug: wrong-type-argument when changing TODO state [7.7] Stelian Iancu
2011-08-28 17:09 ` Nick Dokos
2011-08-29 7:41 ` Stelian Iancu
2011-08-29 7:59 ` Nick Dokos
2011-08-29 13:32 ` Stelian Iancu
2011-08-29 21:42 ` Stelian Iancu
2011-08-29 21:59 ` Stelian Iancu
2011-08-29 22:37 ` Nick Dokos
2011-08-29 23:02 ` Nick Dokos
2011-08-30 17:21 ` Nick Dokos
2011-08-31 11:03 ` Stelian Iancu
2011-08-30 7:47 ` Stelian Iancu [this message]
2011-08-29 22:25 ` Nick Dokos
[not found] ` <stelian.iancu@gmail.com>
2011-11-24 8:03 ` Org from ELPA question Stelian Iancu
2011-11-24 8:17 ` Nick Dokos
2011-11-24 8:38 ` Stelian Iancu
2011-11-24 12:23 ` Jambunathan K
2011-11-24 12:55 ` Stelian Iancu
2011-11-24 20:44 ` Achim Gratz
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='CAKvLAoihCYQAYA5tpe8jzt2xEhf7ThqcvAmAG3oB00Yzdj=O8Q@mail.gmail.com' \
--to=stelian.iancu@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.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.