From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Myles English" Subject: org-export-expand-include-keyword doesn't handle inline tasks well Date: Tue, 16 Oct 2012 12:07:45 +0100 Message-ID: <87mwzmhdz2.fsf@ed.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO4sa-0003aK-Ja for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 07:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO4sS-0008Ld-LV for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 07:00:06 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:44618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO4sS-0008LQ-B8 for emacs-orgmode@gnu.org; Tue, 16 Oct 2012 07:00:00 -0400 Received: by mail-wi0-f171.google.com with SMTP id hj13so2595323wib.12 for ; Tue, 16 Oct 2012 03:59:59 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hi, When a tree includes another file tree by using the #+INCLUDE keyword, the imported headlines are demoted by appending an appropriate number of asterisks. The problem is when an inline task is included, the number of asterisks seems to make it unrecognisable as an inline task. Can someone confirm this as a bug? This has two problems that I can see: 1) if the resulting file is subsequently included again in another file, the inline tasks are thought to be headings so anything coming after it is demoted beneath it, 2) some functions seem to expect a maximum number of asterisks (I'll leave this bit a little vague; it was something to do with dynamic blocks). Org-mode version 7.9.2 (release_7.9.2-441-gf287ab @ /home/myles/.emacs.d/plugins/org-mode/lisp/) Herewith a minimum example: Start with emacs -Q -l [your_minimal.el] _____________________________ file: a.org ______________ #+BEGIN_SRC emacs-lisp (require 'org-inlinetask) #+END_SRC * A heading ** Another heading *************** Here is an inline task *************** END #+BEGIN_SRC emacs-lisp (require 'org-export) (org-export-with-current-buffer-copy (org-export-expand-include-keyword) (clipboard-kill-ring-save (point-min) (point-max))) (find-file "./results.org") (clipboard-yank) #+END_SRC ________________________________________ ______________ _____________________________ file: b.org ______________ * A Heading in b.org *************** An inline task in b.org *************** END #+BEGIN_SRC emacs-lisp (require 'org-inlinetask) #+END_SRC ________________________________________________________ Buffer results.org contains inline tasks of different levels: ** Another heading *************** Here is an inline task *************** END *** A Heading in b.org ***************** An inline task in b.org ***************** END Thanks, Myles