emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: drymer <drymer@autistici.org>
Cc: lista de correo de org-mode <emacs-orgmode@gnu.org>
Subject: Re: Bug: org-export-as
Date: Wed, 08 Mar 2017 11:58:57 +0100	[thread overview]
Message-ID: <87k28011ce.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <20170308101932.lc6k34o7ssllykk3@laptop> (drymer@autistici.org's message of "Wed, 8 Mar 2017 10:19:32 +0000")

Hello,

drymer <drymer@autistici.org> 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	other threads:[~2017-03-08 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 18:50 Bug: org-export-as drymer
2017-03-07 23:24 ` Nicolas Goaziou
2017-03-08 10:19   ` drymer
2017-03-08 10:58     ` Nicolas Goaziou [this message]
2017-03-08 12:43       ` drymer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k28011ce.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=drymer@autistici.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).