emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: org-export-as


From: Nicolas Goaziou
Subject: Re: [O] Bug: org-export-as
Date: Wed, 08 Mar 2017 11:58:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

drymer <address@hidden> writes:

> Hi,
>
> Thanks for your time. Could you please retry and evaluate this:
>
> ,----
> | (defun test-org-export ()
> |   (interactive)
> |   (save-excursion
> |     (org-mark-element)
> |     (forward-line) ;; donot export title
> |     (setq b (region-beginning))
> |     (setq e (region-end)))
> |   (message (org-export-as 'html t nil t)))
> `----
>
> And execute `M-x test-org-export RET' on the example header:
>
>  ,---
>  | * TODO Testing                                                    :test:
>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>  |   pulvinar nibh.  Nam a sapien.
>  `---
>
> And see if it happens?

It does, but the problem is in `test-org-export'. There, `org-export-as'
is called outside the `save-excursion' so region beginning is not the
same as b anymore. The region then includes the headline, and "subtree
export" feature is ignored since there is an active region.


Regards,

-- 
Nicolas Goaziou                                                0x80A93738



reply via email to

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