From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch, ox] #+INCLUDE resolves links Date: Sun, 21 Sep 2014 21:51:31 +0200 Message-ID: <87fvfkn458.fsf@nicolasgoaziou.fr> References: <87k34x6bjd.fsf@gmx.us> <87lhpdurfh.fsf@gmx.us> <87bnq984hd.fsf@nicolasgoaziou.fr> <87fvflghfy.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVn9y-0003GH-DN for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:51:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVn9q-0001Ed-73 for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:51:02 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:39123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVn9q-0001E4-0Z for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:50:54 -0400 In-Reply-To: <87fvflghfy.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 21 Sep 2014 16:46:09 +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: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: >> 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)) `org-export--prepare-file-contents' is not called with the same number of arguments when it is an Org file. You can activate `org-mode' if you are in this situation (look for (when ind ...) and (when minlevel ...) in the function). Regards, -- Nicolas Goaziou