emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Add org-habit to org-modules
@ 2010-04-05 15:10 Nathan Neff
  2010-04-05 15:30 ` Matt Lundin
  2010-04-05 15:34 ` Nick Dokos
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Neff @ 2010-04-05 15:10 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 334 bytes --]

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)))

Thanks,
--Nate

[-- Attachment #1.2: Type: text/html, Size: 452 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add org-habit to org-modules
  2010-04-05 15:10 Add org-habit to org-modules Nathan Neff
@ 2010-04-05 15:30 ` Matt Lundin
  2010-04-05 20:42   ` Nathan Neff
  2010-04-05 15:34 ` Nick Dokos
  1 sibling, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2010-04-05 15:30 UTC (permalink / raw)
  To: Nathan Neff; +Cc: emacs-orgmode

Nathan Neff <nathan.neff@gmail.com> writes:

> 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)))

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

Best,
Matt 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add org-habit to org-modules
  2010-04-05 15:10 Add org-habit to org-modules Nathan Neff
  2010-04-05 15:30 ` Matt Lundin
@ 2010-04-05 15:34 ` Nick Dokos
  2010-04-05 15:56   ` Nick Dokos
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2010-04-05 15:34 UTC (permalink / raw)
  To: Nathan Neff; +Cc: nicholas.dokos, emacs-orgmode

Nathan Neff <nathan.neff@gmail.com> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add org-habit to org-modules
  2010-04-05 15:34 ` Nick Dokos
@ 2010-04-05 15:56   ` Nick Dokos
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2010-04-05 15:56 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> wrote:

> ... 
> 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

Bah, humbug:     ^^^ This should be "note that..."

> don't need to assign the result to org-modules:
> 

Sorry about that,
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Add org-habit to org-modules
  2010-04-05 15:30 ` Matt Lundin
@ 2010-04-05 20:42   ` Nathan Neff
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Neff @ 2010-04-05 20:42 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 612 bytes --]

On Mon, Apr 5, 2010 at 10:30 AM, Matt Lundin <mdl@imapmail.org> wrote:

> Nathan Neff <nathan.neff@gmail.com> writes:
>
> > 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)))
>
> (add-to-list 'org-modules 'org-habit)
>
> Best,
> Matt
>

Thanks Matt and Nick -- I appreciate this very much -- I'm a Lisp noob.

--Nate

[-- Attachment #1.2: Type: text/html, Size: 1100 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-05 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 15:10 Add org-habit to org-modules Nathan Neff
2010-04-05 15:30 ` Matt Lundin
2010-04-05 20:42   ` Nathan Neff
2010-04-05 15:34 ` Nick Dokos
2010-04-05 15:56   ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).