From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch, ox] #+INCLUDE resolves links Date: Sun, 21 Sep 2014 16:46:09 +0200 Message-ID: <87fvflghfy.fsf@gmx.us> References: <87k34x6bjd.fsf@gmx.us> <87lhpdurfh.fsf@gmx.us> <87bnq984hd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XViPM-0008DD-9G for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 10:46:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XViPG-0006DL-43 for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 10:46:36 -0400 Received: from mout.gmx.net ([212.227.15.18]:58400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XViPF-0006DD-Q3 for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 10:46:30 -0400 Received: from W530 ([46.166.186.245]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MgcTf-1XhUFz00kp-00NwLE for ; Sun, 21 Sep 2014 16:46:20 +0200 In-Reply-To: <87bnq984hd.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 21 Sep 2014 15:53:18 +0200") 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@gnu.org Hi, A short comment. Nicolas Goaziou writes: >> + (org-export--prepare-file-contents file location only-contents lines)))) > > Couldn't location, only-contents and lines be merged into a single > argument? At the moment, you are either short-circuiting or breaking > guard against circular inclusions (which relies on a combination of > file-name and lines). Yeah, you are right. I will look into that. >> @@ -3420,6 +3437,26 @@ This is useful to avoid conflicts when more than one Org file >> with footnotes is included in a document." >> (with-temp-buffer >> (insert-file-contents file) >> + (org-mode) > > You cannot enforce `org-mode' as the current major mode since you can > include other file types. But then I can't use org-element-at-point: (with-temp-buffer (text-mode) (insert "* test\nmy txt") (goto-char (point-min)) (org-element-at-point)) (with-temp-buffer (org-mode) (insert "* test\nmy txt") (goto-char (point-min)) (org-element-at-point)) Thanks, Rasmus -- Send from my Emacs