From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug, patch, ox] INCLUDE and footnotes Date: Mon, 22 Dec 2014 10:05:59 +0100 Message-ID: <874msoxde0.fsf@nicolasgoaziou.fr> References: <87h9x5hwso.fsf@gmx.us> <87oarcbppe.fsf@nicolasgoaziou.fr> <87fvcozfhf.fsf@gmx.us> <87h9x4bj33.fsf@nicolasgoaziou.fr> <87iohks4ne.fsf@gmx.us> <87d27rbvio.fsf@nicolasgoaziou.fr> <87bnnbhg2x.fsf@gmx.us> <878uifbjc7.fsf@nicolasgoaziou.fr> <87388j9qbv.fsf@gmx.us> <87y4q57t2i.fsf@nicolasgoaziou.fr> <87lhm4n9ky.fsf@pank.eu> <87y4q3a8tc.fsf@pank.eu> <87d27cyas6.fsf@nicolasgoaziou.fr> <878ui039wv.fsf@gmx.us> <878ui0y3nx.fsf@nicolasgoaziou.fr> <87mw6g1mu7.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2yvQ-0001OX-1e for emacs-orgmode@gnu.org; Mon, 22 Dec 2014 04:05:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2yvH-0001F6-UR for emacs-orgmode@gnu.org; Mon, 22 Dec 2014 04:05:11 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:50437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2yvH-0001Cw-NJ for emacs-orgmode@gnu.org; Mon, 22 Dec 2014 04:05:03 -0500 In-Reply-To: <87mw6g1mu7.fsf@gmx.us> (rasmus@gmx.us's message of "Mon, 22 Dec 2014 02:42:56 +0100") 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: > That's a nice solution. Implemented in attached patch. Thanks. Two minor comments follow. > Should this be added to ORG-NEWS? Is a "feature" or a "bug-fix"? Bug-fix I'd say. There was an attempt to do it (see MINLEVEL binding), but it was incorrect. > + ;; Add :minlevel to all include words that no explicitly have one. Please update this comment, as it is no longer valid (property instead of :minlevel). In particular, it would be nice to describe how we use :org-include-induced-level. > (goto-char (point-min)) > + (while (re-search-forward include-re nil t) > + (add-text-properties (line-beginning-position) (line-end-position) > + `(org-include-induced-level > + ,(1+ (org-reduced-level (or (org-current-level) 0)))))) Properties are usually keywords, not plain symbols. Also, for single properties, `put-text-property' is slightly more lightweight. (put-text-property (line-beginning-position) (line-end-position) :org-include-induced-level (1+ (org-reduced-level (or (org-current-level) 0)))) > + (get-text-property (point) 'org-include-induced-level)))) As a consequence: (get-text-property (point) :org-include-induced-level) You can push the patch once this is fixed. Regards,