emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Include other files?


From: Richard G Riley
Subject: Re: [Orgmode] Include other files?
Date: Fri, 02 Nov 2007 15:24:42 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50.6 (gnu/linux)

Bastien <address@hidden> writes:

> Richard G Riley <address@hidden> writes:
>
>> common.inc:
>>
>> #+SEQ_TODO: TODO(t) WAITING(w@) INPROGRESS(p@) | DONE(d) CANCELLED(x@) 
>> DELEGATED(l@)
>> #+SEQ_TODO: apple(a) | orange(d)
>>
>> todo.org:
>>
>> #+include common.inc
>
> This is not that straitforward, because org needs to read options like
> #+SEQ_TODO before being able to fontify the buffer correctly.
>
> But you can use a dynamic block for that:
>
> (defun org-dblock-write:insert-file (params)
>   "Insert a header from a file."
>   (let ((file (plist-get params :file)))
>     (if (file-exists-p file)
>       (insert-file-contents file)
>       (error "File %s cannot be found" file))))
>
> Then at the beginning of your file:
>
> #+BEGIN: insert-file :file "~/org/my-header.org"
> #+END:

Wonderful stuff.




reply via email to

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