From mboxrd@z Thu Jan 1 00:00:00 1970 From: drymer Subject: Re: Bug: org-export-as Date: Wed, 8 Mar 2017 12:43:56 +0000 Message-ID: <20170308124355.orq2no4nslehvs2l@laptop> References: <20170307185019.b7tzqlssrpab7gr6@laptop> <87bmtc3c21.fsf@nicolasgoaziou.fr> <20170308101932.lc6k34o7ssllykk3@laptop> <87k28011ce.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rpspmj7zs7vpmnwz" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clZyA-0002u4-9u for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 06:41:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clZy7-00006A-44 for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 06:41:26 -0500 Received: from perdizione.investici.org ([2001:41d0:2:33d0::19]:29439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clZy6-000060-R6 for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 06:41:23 -0500 Content-Disposition: inline In-Reply-To: <87k28011ce.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: lista de correo de org-mode --rpspmj7zs7vpmnwz Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Ah, I see, you're wright. I believe I can fix the problem, but I still don't understand why it behaves differently on that two versions. Anyway, thank you very much. On Wed, Mar 08, 2017 at 11:58:57AM +0100, Nicolas Goaziou wrote: >Hello, > >drymer 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 > --rpspmj7zs7vpmnwz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJYv/yLAAoJEKMH1k1d39qtJc8P/AsrW4RX/CrDcDyFrfPqyHhL Y758ILwijTbmT65KrOt5XBEwC+hI+N1YkXesiARjE0X2h8UaDQ2fWNNkh66bwA8W tHIUNrJUVbfJ+0Lhb8mpwDvWoZKbktlXqiU6iVPFInkT5M70uwLS07cwKHlQc6M2 dYDIxSd58hcOKQI/xQnRh/y1YMcf8WpIafAJ9ZiY4KngAo/8Jra/F9k7/9k3NFq/ OfCWqpQIb5rA9wVj2A8Ge7Y15bTHv7CoZ/VE+ql1LgeVTl+lq20p/EE52UtFJUyJ c7rnhw354TpUpmSJxo9yAMtOIv2T4efdRksCt1J83wrc8qV6fQRGuv6Zgy1TaABf ieaiUjMcH8pGVuZwQELbuFnJDJj7g1M1SRwKKkqNGpTLOTlpY3pbrr2ENHAmEdZb 36y3VbDau7nCmoYNEWJtZKr9VA/p48dQb4jBTMObI3m8B8hyV+TCjtIpVjBcLjON CvfcSNiFzL6HN3SPphtn1P8xbYnoWVvvoT8YjeG7aUHYibRvVcCZgIMpNP0xGjZ5 RDdZUdOFJM3jsxLcBcJVSkfckwbqVLL0bhh3ct3Wl7IXCvBe78+yBcHb/zz05jXz 6ecgdO175nmwLGNBVsVrLL64wlZH/b1uP0PZa39rBNyEB2wO677cK315jqVV0YCM /zmsc8QRzSVAYl7rJ9vu =cHm9 -----END PGP SIGNATURE----- --rpspmj7zs7vpmnwz--