From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Regression in #+include behavior [master] Date: Mon, 19 Mar 2018 20:00:02 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f23a590567c9676b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey0x6-0006Zz-54 for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:00:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ey0x5-0004lZ-0d for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:00:16 -0400 Received: from mail-yb0-x235.google.com ([2607:f8b0:4002:c09::235]:34215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ey0x4-0004ku-Rn for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:00:14 -0400 Received: by mail-yb0-x235.google.com with SMTP id e3-v6so527705ybk.1 for ; Mon, 19 Mar 2018 13:00:14 -0700 (PDT) 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: emacs-org list --000000000000f23a590567c9676b Content-Type: text/plain; charset="UTF-8" Hello, I believe a regression was introduced in https://code.orgmode.org/bzg/org-mode/commit/d81a1d088c74e605c99e90a2835c55df5144f43e I am unable to come with a minimal example, but I can link to the actual Org file that causes the failure. If I try to move that subtree along with the "included" subtrees into a separate Org file, the export works fine. - Download https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/all-posts.org (you can wget or curl that file using that URL). - Ensure that point is in the "* Alert Shortcode Lookalike" heading (around line 3416). - Do C-c C-e C-s h h You should get an error like this: Debugger entered--Lisp error: (wrong-type-argument stringp nil) looking-at(nil) org-element-context() org-export--prepare-file-contents("/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/ all-posts.org" "3311-3358" 0 5 1 # "/home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/ all-posts.org") org-export-expand-include-keyword() org-export-as(html t nil nil (:output-file "alert-short-code-lookalike.html")) org-export-to-file(html "alert-short-code-lookalike.html" nil t nil nil nil) org-html-export-to-html(nil t nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch) Let me know if this error can be reproduced by the above steps -- Kaushal Modi --000000000000f23a590567c9676b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am unable to come with a minimal example, but I can link to the = actual Org file that causes the failure. If I try to move that subtree alon= g with the "included" subtrees into a separate Org file, the expo= rt works fine.

- Download ht= tps://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/conten= t-org/all-posts.org (you can wget or curl that file using that URL).
- Ensure that point is in the "* Alert Shortcode Lookalike"= ; heading (around line 3416).
- Do C-c C-e C-s h h

You sh= ould get an error like this:

Debugger entered--Lisp error: (wrong-ty= pe-argument stringp nil)
=C2=A0 looking-at(nil)
=C2=A0 org-element-co= ntext()
=C2=A0 org-export--prepare-file-contents("/home/kmodi/stow/= pub_dotfiles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/all-posts.org" "3311-3358" 0 5= 1 #<hash-table equal 0/65 0x15ea311> "/home/kmodi/stow/pub_dotf= iles/emacs/dot-emacs.d/elisp/ox-hugo/test/site/content-org/all-posts.org")
=C2=A0 org-export-expand-inclu= de-keyword()
=C2=A0 org-export-as(html t nil nil (:output-file "ale= rt-short-code-lookalike.html"))
=C2=A0 org-export-to-file(html &quo= t;alert-short-code-lookalike.html" nil t nil nil nil)
=C2=A0 org-ht= ml-export-to-html(nil t nil nil)
=C2=A0 org-export-dispatch(nil)
=C2= =A0 funcall-interactively(org-export-dispatch nil)
=C2=A0 call-interacti= vely(org-export-dispatch nil nil)
=C2=A0 command-execute(org-export-disp= atch)

Let me know if this error can be reproduce= d by the above steps
--

Kaushal Modi

--000000000000f23a590567c9676b-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Regression in #+include behavior [master] Date: Mon, 19 Mar 2018 20:03:18 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a346d20567c9731f" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey10F-0007aU-MP for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:03:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ey10E-0007RW-Tu for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:03:31 -0400 Received: from mail-yb0-x22c.google.com ([2607:f8b0:4002:c09::22c]:43313) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ey10E-0007RC-PI for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 16:03:30 -0400 Received: by mail-yb0-x22c.google.com with SMTP id z5-v6so530462ybo.10 for ; Mon, 19 Mar 2018 13:03:30 -0700 (PDT) In-Reply-To: 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: emacs-org list --000000000000a346d20567c9731f Content-Type: text/plain; charset="UTF-8" On Mon, Mar 19, 2018 at 4:00 PM Kaushal Modi wrote: > Hello, > > I believe a regression was introduced in > https://code.orgmode.org/bzg/org-mode/commit/d81a1d088c74e605c99e90a2835c55df5144f43e > Actually the commit before that would have been the breaking commit as I was able to "fix" this locally by reverting to 594b2dbae85dca118253fa35b0681c66362587ee and re-evalling ox.el. -- Kaushal Modi --000000000000a346d20567c9731f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Mar 19= , 2018 at 4:00 PM Kaushal Modi <kaushal.modi@gmail.com> wrote:
Actually the commit before that would have been the breaking co= mmit as I was able to "fix" this locally by reverting to 594b2dba= e85dca118253fa35b0681c66362587ee and re-evalling ox.el.
--

Kaushal Modi

--000000000000a346d20567c9731f-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Regression in #+include behavior [master] Date: Mon, 19 Mar 2018 23:52:47 +0100 Message-ID: <871sgfd6f4.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey3eB-0001eB-Vf for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 18:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ey3e7-0005AU-27 for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 18:52:56 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36797) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ey3e6-00055y-Qy for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 18:52:50 -0400 In-Reply-To: (Kaushal Modi's message of "Mon, 19 Mar 2018 20:00:02 +0000") 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: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > I believe a regression was introduced in > https://code.orgmode.org/bzg/org-mode/commit/d81a1d088c74e605c99e90a2835c55df5144f43e > > I am unable to come with a minimal example, but I can link to the actual > Org file that causes the failure. If I try to move that subtree along with > the "included" subtrees into a separate Org file, the export works fine. > > - Download > https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/all-posts.org > (you can wget or curl that file using that URL). > - Ensure that point is in the "* Alert Shortcode Lookalike" heading (around > line 3416). > - Do C-c C-e C-s h h > > You should get an error like this: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > looking-at(nil) > org-element-context() Fixed. Thank you. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Regression in #+include behavior [master] Date: Tue, 20 Mar 2018 03:27:02 +0000 Message-ID: References: <871sgfd6f4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009812230567cfa62a" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey7vg-0006WX-KZ for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 23:27:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ey7vf-0004Q7-FO for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 23:27:16 -0400 Received: from mail-yb0-x22f.google.com ([2607:f8b0:4002:c09::22f]:46882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ey7vf-0004Pn-94 for emacs-orgmode@gnu.org; Mon, 19 Mar 2018 23:27:15 -0400 Received: by mail-yb0-x22f.google.com with SMTP id t5-v6so65869ybg.13 for ; Mon, 19 Mar 2018 20:27:15 -0700 (PDT) In-Reply-To: <871sgfd6f4.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: emacs-org list --0000000000009812230567cfa62a Content-Type: text/plain; charset="UTF-8" On Mon, Mar 19, 2018 at 6:52 PM Nicolas Goaziou wrote: > > Fixed. Thank you. > Hello, Thank you for quickly fixing this. Though I didn't understand why it failed when exporting from the large file, but not when moving the relevant subtrees (where the #+include was called, and the included) to a separate file.. I am just including content from one subtree to another in the same file.. What that the corner/pathological case?[1]. Sorry, I didn't quite understand the test in the commit. [1]: https://code.orgmode.org/bzg/org-mode/commit/beeb4bf23fd2b2339c2354457840d52c52d6dff5 -- Kaushal Modi --0000000000009812230567cfa62a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Mar 19= , 2018 at 6:52 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Fixed. Thank you.

Hello,

<= div>Thank you for quickly fixing this.

Though I didn'= t understand why it failed when exporting from the large file, but not when= moving the relevant subtrees (where the #+include was called, and the incl= uded) to a separate file..

I am just including content fr= om one subtree to another in the same file.. What that the corner/pathologi= cal case?[1]. Sorry, I didn't quite understand the test in the commit.<= br>

[1]: https://code.orgmode.org/bzg/org-mod= e/commit/beeb4bf23fd2b2339c2354457840d52c52d6dff5
--

Kaushal Modi

--0000000000009812230567cfa62a-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Regression in #+include behavior [master] Date: Tue, 20 Mar 2018 08:53:21 +0100 Message-ID: <87sh8vb2tq.fsf@nicolasgoaziou.fr> References: <871sgfd6f4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyC5J-0008JQ-1N for emacs-orgmode@gnu.org; Tue, 20 Mar 2018 03:53:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyC5F-0004pl-WC for emacs-orgmode@gnu.org; Tue, 20 Mar 2018 03:53:29 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:51193) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eyC5F-0004nK-OQ for emacs-orgmode@gnu.org; Tue, 20 Mar 2018 03:53:25 -0400 In-Reply-To: (Kaushal Modi's message of "Tue, 20 Mar 2018 03:27:02 +0000") 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: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > Though I didn't understand why it failed when exporting from the large > file, but not when moving the relevant subtrees (where the #+include was > called, and the included) to a separate file.. The code was fixing links in the whole document, not only in the subtree you were including. The problem lay somewhere else in the file, in the "* Hey! I have a link [[https://example.org][here]] (Awesome!)" headline. There, `org-element-context' needed to check the headline, by (looking-at org-complex-heading-regexp). However, since the changes were happening in Fundamental mode, the regexp was not set. Hence the error. So, the fix implements the following changes: - only modify links withing the included part of the document, - do not modify anything if includer and includee both live in the same directory, - switch to Org mode before proceeding with changes. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Regression in #+include behavior [master] Date: Wed, 21 Mar 2018 21:45:28 +0000 Message-ID: References: <871sgfd6f4.fsf@nicolasgoaziou.fr> <87sh8vb2tq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b9046f0567f31cbb" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eylYF-0002CO-8M for emacs-orgmode@gnu.org; Wed, 21 Mar 2018 17:45:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eylYD-0000kR-Fg for emacs-orgmode@gnu.org; Wed, 21 Mar 2018 17:45:43 -0400 Received: from mail-yb0-x236.google.com ([2607:f8b0:4002:c09::236]:46813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eylYD-0000jt-A4 for emacs-orgmode@gnu.org; Wed, 21 Mar 2018 17:45:41 -0400 Received: by mail-yb0-x236.google.com with SMTP id t5-v6so2258368ybg.13 for ; Wed, 21 Mar 2018 14:45:41 -0700 (PDT) In-Reply-To: <87sh8vb2tq.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: emacs-org list --000000000000b9046f0567f31cbb Content-Type: text/plain; charset="UTF-8" On Tue, Mar 20, 2018 at 3:53 AM Nicolas Goaziou wrote: > > The code was fixing links in the whole document, not only in the subtree > you were including. > > The problem lay somewhere else in the file, in the "* Hey! I have a link > [[https://example.org][here]] (Awesome!)" headline. That was a pathological test case for ox-hugo :) > There, `org-element-context' needed to check the headline, by (looking-at > org-complex-heading-regexp). However, since the changes were happening in > Fundamental mode, the regexp was not set. Hence the error. > Thanks! It makes sense now. > So, the fix implements the following changes: > - only modify links withing the included part of the document, > - do not modify anything if includer and includee both live in the same > directory, > - switch to Org mode before proceeding with changes. > -- Kaushal Modi --000000000000b9046f0567f31cbb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Mar 20= , 2018 at 3:53 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

The code was fixing links in the whole document, not only in the subtree you were including.

The problem lay somewhere else in the file, in the "* Hey! I have a li= nk
[[http= s://example.org][here]] (Awesome!)" headline.
That was a pathological test case for ox-hugo :)
=C2=A0
There, `org-element-context' needed to check the headline, by (looking-at
org-complex-heading-regexp). However, since the changes were happening in F= undamental mode, the regexp was not set. Hence the error.
<= div>
Thanks! It makes sense now.
=C2=A0
So, the fix implements the following changes:
- only modify links withing the included part of the document,
- do not modify anything if includer and includee both live in the same
=C2=A0 directory,
- switch to Org mode before proceeding with changes.
--

Kaushal Modi

--000000000000b9046f0567f31cbb--