emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [bug, patch, ox] INCLUDE and footnotes


From: Nicolas Goaziou
Subject: Re: [O] [bug, patch, ox] INCLUDE and footnotes
Date: Mon, 22 Dec 2014 10:05:59 +0100

Rasmus <address@hidden> 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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]