emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Add org-habit to org-modules


From: Nick Dokos
Subject: Re: [Orgmode] Add org-habit to org-modules
Date: Mon, 05 Apr 2010 11:34:15 -0400

Nathan Neff <address@hidden> wrote:

> Is there a way to add org-habit to the
> org-modules list without using org-custom and without
> specifying all the modules at once, like this:
> 
> (setq org-modules (quote (org-bbdb org-bibtex blah blah blah)))
> 
> I'm looking for something like this:
> ;; Except this doesn't work :-)
> (append org-modules (list ('org-habit)))
>  

Remember: append will return a new list - it does *not* modify its
argument.

Here are some alternatives - to add at the beginning of org-modules:

        (setq org-modules (cons 'org-habit org-modules)

or at the end:

        (setq org-modules (append org-modules '(org-habit)))

It might be better to use the add-to-list function instead though
because it checks if the element is already in the list and only adds it
if it is not - not that this function *does* modify its argument so you
don't need to assign the result to org-modules:

        (add-to-list 'org-modules 'org-habit)

or to add to the end of the list:

        (add-to-list 'org-modules 'org-habit t)


[In all cases, watch the quotes!]

HTH,
Nick




reply via email to

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