Fix bug with including files without markup

File contents that are included with "#+include: file"
should be processed as normal Org stuff.  This used to be so,
and it is so now again.
This commit is contained in:
Carsten Dominik 2009-08-08 00:14:54 +02:00
parent ab2ed6adb8
commit dfd3749a27
3 changed files with 6 additions and 2 deletions

View File

@ -8265,7 +8265,7 @@ include your @file{.emacs} file, you could use:
#+INCLUDE: "~/.emacs" src emacs-lisp
@end example
@noindent
The optional second and third parameter are the markup (@samp{quote},
The optional second and third parameter are the markup (e.g. @samp{quote},
@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
language for formatting the contents. The markup is optional, if it is not
given, the text will be assumed to be in Org mode format and will be

View File

@ -1,5 +1,8 @@
2009-08-07 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-get-file-contents): Only quote org lines when
the markup is src or example.
* org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
New option
(org-agenda-get-day-entries): Remember deadline results and pass

View File

@ -2136,6 +2136,7 @@ If PREFIX is a string, prepend it to each line. If PREFIX1
is a string, prepend it to the first line instead of PREFIX.
If MARKUP, don't protect org-like lines, the exporter will
take care of the block they are in."
(if (stringp markup) (setq markup (downcase markup)))
(with-temp-buffer
(insert-file-contents file)
(when (or prefix prefix1)
@ -2145,7 +2146,7 @@ take care of the block they are in."
(setq prefix1 nil)
(beginning-of-line 2)))
(buffer-string)
(unless markup
(when (member markup '("src" "example"))
(goto-char (point-min))
(while (re-search-forward "^\\(\\*\\|[ \t]*#\\)" nil t)
(goto-char (match-beginning 0))