emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Re: Bug: subtree export fails with src block
  2010-09-23  7:25 ` Noorul Islam K M
@ 2010-09-23 15:17   ` Eric Schulte
  2010-09-23 18:22     ` Christian Moe
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2010-09-23 15:17 UTC (permalink / raw)
  To: Noorul Islam K M; +Cc: Org Mode, mail

Hi Christian,

Thanks for the complete bug report and reproduction information.
Unfortunately I was unable to reproduce the error you described.  Does
the file /Users/CM/org/test2.org exist on your system?  Presumably that
is the file from which you are exporting.  Is it saved before you
export?

Thanks -- Eric

I doubt the following is relevant, but...

I'm using the latest Org-mode from git.
Org-mode version 7.01trans (release_7.01h.566.gc33c)

and the latest Emacs from git
GNU Emacs 23.1.90.1

Noorul Islam K M <noorul@noorul.com> writes:

> Christian Moe <mail@christianmoe.com> writes:
>
>> Hi,
>>
>> Selecting a subtree only, export to html fails if the subtree contains
>> a src block. Using 7.01trans, freshly pulled, on Emacs 23.
>>
>> Example
>>
>> file: test2.org
>> -----------------------
>>
>> * Heading 1
>>
>> Text
>>
>> * Heading 2
>>
>> Text
>>
>> #+begin_src emacs-lisp
>>   (message "Something funny with export")
>> #+end_src
>>
>> -----------------------
>>
>> Exporting the whole works fine.
>>
>> Exporting the first subtree (C-c C-e 1 b) works, but leaves an active
>> region around the subtree.
>
> Yes you are right. I am able to reproduce this.
>
>>
>> Exporting the second subtree fails, producing no output, with these
>> messages:
>>
>> : Exporting...
>> : org-babel-exp processing...
>> : org-open-file: No such file: /Users/CM/org/test2.org::
>>
>
> I am not able to reproduce this. I did not get any errors.
>
> I have
>
> Org-mode version 7.01trans (release_7.01h.555.g90cc.dirty)
> GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of 2010-01-30 on noorul
>
> Thanks and Regards
> Noorul
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-09-23 15:17   ` Eric Schulte
@ 2010-09-23 18:22     ` Christian Moe
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Moe @ 2010-09-23 18:22 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Hi, Eric,

Yes, the file is saved, and is the one I'm trying to export from.

If neither you nor Noorul can reproduce it, I may have messed up 
something. But I can't think what.

It looks like the problem arises in this part of org-babel-exp-src-blocks

	   (link (org-make-link-string
		  (concat
		   org-current-export-file
		   "::"
		   (nth 4 (ignore-errors (org-heading-components))))))

and that org-heading-components fails to return the heading text. 
Can't see why, though.

Yours,
Christian


On 9/23/10 5:17 PM, Eric Schulte wrote:
> Hi Christian,
>
> Thanks for the complete bug report and reproduction information.
> Unfortunately I was unable to reproduce the error you described.  Does
> the file /Users/CM/org/test2.org exist on your system?  Presumably that
> is the file from which you are exporting.  Is it saved before you
> export?
>
> Thanks -- Eric
>
> I doubt the following is relevant, but...
>
> I'm using the latest Org-mode from git.
> Org-mode version 7.01trans (release_7.01h.566.gc33c)
>
> and the latest Emacs from git
> GNU Emacs 23.1.90.1
>
> Noorul Islam K M<noorul@noorul.com>  writes:
>
>> Christian Moe<mail@christianmoe.com>  writes:
>>
>>> Hi,
>>>
>>> Selecting a subtree only, export to html fails if the subtree contains
>>> a src block. Using 7.01trans, freshly pulled, on Emacs 23.
>>>
>>> Example
>>>
>>> file: test2.org
>>> -----------------------
>>>
>>> * Heading 1
>>>
>>> Text
>>>
>>> * Heading 2
>>>
>>> Text
>>>
>>> #+begin_src emacs-lisp
>>>    (message "Something funny with export")
>>> #+end_src
>>>
>>> -----------------------
>>>
>>> Exporting the whole works fine.
>>>
>>> Exporting the first subtree (C-c C-e 1 b) works, but leaves an active
>>> region around the subtree.
>>
>> Yes you are right. I am able to reproduce this.
>>
>>>
>>> Exporting the second subtree fails, producing no output, with these
>>> messages:
>>>
>>> : Exporting...
>>> : org-babel-exp processing...
>>> : org-open-file: No such file: /Users/CM/org/test2.org::
>>>
>>
>> I am not able to reproduce this. I did not get any errors.
>>
>> I have
>>
>> Org-mode version 7.01trans (release_7.01h.555.g90cc.dirty)
>> GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of 2010-01-30 on noorul
>>
>> Thanks and Regards
>> Noorul
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


-- 

Christian Moe
E-mail:  mail@christianmoe.com
Website: http://christianmoe.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
@ 2010-10-04  3:02 Giovanni Moretti
  2010-10-04 13:21 ` Eric Schulte
  0 siblings, 1 reply; 8+ messages in thread
From: Giovanni Moretti @ 2010-10-04  3:02 UTC (permalink / raw)
  To: emacs-orgmode

I'm just starting with Babel and have been puzzled about why one file
worked and another didn't.

I have been playing in a new file without any headers at all (no lines
starting with '*') and while I could execute the code in the buffer,
exporting to HTML always failed with:

   No such file: c:/org/babel-python-test.org::

When searching, I found this thread and wondered if the heading were
important. It turns out they are. In the block below, exporting to HTML
fails if the first line isn't a heading.

This seems like a clue ...

Cheers and thanks
Giovanni

PS: the BOTH option for :export is hard to find - only :export none is in
the intro page.

===============================
* Python Babel test

Now let's see what happens:

#+begin_src python :results output :exports both
print "Babel"
limits = [1,2,3,4,5,6,7,8,9,10]

for i in limits:
  print "Hello" * i
#+end_src python
================================

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-10-04  3:02 Re: Bug: subtree export fails with src block Giovanni Moretti
@ 2010-10-04 13:21 ` Eric Schulte
  2010-10-04 13:48   ` Eric Schulte
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2010-10-04 13:21 UTC (permalink / raw)
  To: Giovanni; +Cc: emacs-orgmode

Hi Giovanni,

I'm unable to reproduce your bug.  I can successfully export the
following to html w/o issue.

--8<---------------cut here---------------start------------->8---
Now let's see what happens:

#+begin_src python :results output :exports both
print "Babel"
limits = [1,2,3,4,5,6,7,8,9,10]

for i in limits:
  print "Hello" * i
#+end_src python
--8<---------------cut here---------------end--------------->8---

Are you using the latest version of Org-mode?  Could you try exporting
the above and see if it works for you.

some more comments inline below.

"Giovanni Moretti" <Giovanni@reflections.co.nz> writes:

> I'm just starting with Babel and have been puzzled about why one file
> worked and another didn't.
>
> I have been playing in a new file without any headers at all (no lines
> starting with '*') and while I could execute the code in the buffer,
> exporting to HTML always failed with:
>
>    No such file: c:/org/babel-python-test.org::
>

Hmm, it looks like it's trying to find a file with "::" attached to the
end which is probably the source of the issue.  I wonder if this is a
windows specific problem?

>
> When searching, I found this thread and wondered if the heading were
> important. It turns out they are. In the block below, exporting to HTML
> fails if the first line isn't a heading.
>
> This seems like a clue ...
>
> Cheers and thanks
> Giovanni
>
> PS: the BOTH option for :export is hard to find - only :export none is in
> the intro page.
>

The documentation [1] is the place to look for header arguments and
their usage, but I suppose we should mention that more explicitly (at
all?)  from the introduction page.

Best -- Eric

>
> ===============================
> * Python Babel test
>
> Now let's see what happens:
>
> #+begin_src python :results output :exports both
> print "Babel"
> limits = [1,2,3,4,5,6,7,8,9,10]
>
> for i in limits:
>   print "Hello" * i
> #+end_src python
> ================================
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Footnotes: 
[1]  http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-10-04 13:21 ` Eric Schulte
@ 2010-10-04 13:48   ` Eric Schulte
  2010-10-04 15:02     ` Jörg Hagmann
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2010-10-04 13:48 UTC (permalink / raw)
  To: Giovanni; +Cc: emacs-orgmode

"Eric Schulte" <schulte.eric@gmail.com> writes:

[...]
>
> "Giovanni Moretti" <Giovanni@reflections.co.nz> writes:
>
>> I'm just starting with Babel and have been puzzled about why one file
>> worked and another didn't.
>>
>> I have been playing in a new file without any headers at all (no lines
>> starting with '*') and while I could execute the code in the buffer,
>> exporting to HTML always failed with:
>>
>>    No such file: c:/org/babel-python-test.org::
>>
>
> Hmm, it looks like it's trying to find a file with "::" attached to the
> end which is probably the source of the issue.  I wonder if this is a
> windows specific problem?
>

a-ha,

I just noticed that while my test file "python.org" was exporting w/o
problem, it was opening a "python.org::" buffer in the process, so maybe
the reason this throws errors for you and not for me is just Unix's more
permissive file names.

I've just pushed up a change to the Babel exporter that will only concat
the "::" to the end of a file name, where there is actually a heading to
following it.  Hopefully this will fix the error you described, please
let me know if that is not the case.

Best -- Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-10-04 13:48   ` Eric Schulte
@ 2010-10-04 15:02     ` Jörg Hagmann
  2010-10-04 15:06       ` Eric Schulte
  0 siblings, 1 reply; 8+ messages in thread
From: Jörg Hagmann @ 2010-10-04 15:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, Giovanni

  This might be the same problem I discussed recently?
See this thread: 
http://thread.gmane.org/gmane.emacs.orgmode/31241/focus=31289

Jörg

On 10/4/10 3:48 PM, Eric Schulte wrote:
> "Eric Schulte"<schulte.eric@gmail.com>  writes:
>
> [...]
>> "Giovanni Moretti"<Giovanni@reflections.co.nz>  writes:
>>
>>> I'm just starting with Babel and have been puzzled about why one file
>>> worked and another didn't.
>>>
>>> I have been playing in a new file without any headers at all (no lines
>>> starting with '*') and while I could execute the code in the buffer,
>>> exporting to HTML always failed with:
>>>
>>>     No such file: c:/org/babel-python-test.org::
>>>
>> Hmm, it looks like it's trying to find a file with "::" attached to the
>> end which is probably the source of the issue.  I wonder if this is a
>> windows specific problem?
>>
> a-ha,
>
> I just noticed that while my test file "python.org" was exporting w/o
> problem, it was opening a "python.org::" buffer in the process, so maybe
> the reason this throws errors for you and not for me is just Unix's more
> permissive file names.
>
> I've just pushed up a change to the Babel exporter that will only concat
> the "::" to the end of a file name, where there is actually a heading to
> following it.  Hopefully this will fix the error you described, please
> let me know if that is not the case.
>
> Best -- Eric
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-10-04 15:02     ` Jörg Hagmann
@ 2010-10-04 15:06       ` Eric Schulte
  2010-10-05  7:07         ` Jörg Hagmann
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2010-10-04 15:06 UTC (permalink / raw)
  To: Jörg Hagmann; +Cc: emacs-orgmode, Giovanni

Similar,

I think this thread is also related
http://thread.gmane.org/gmane.emacs.orgmode/31312/focus=31392

either way the issue should be fixed in the latest Org-mode.  Please let
me know if that is not the case.

Best -- Eric

Jörg Hagmann <joerg.hagmann@unibas.ch> writes:

>  This might be the same problem I discussed recently?
> See this thread:
> http://thread.gmane.org/gmane.emacs.orgmode/31241/focus=31289
>
> Jörg
>
> On 10/4/10 3:48 PM, Eric Schulte wrote:
>> "Eric Schulte"<schulte.eric@gmail.com>  writes:
>>
>> [...]
>>> "Giovanni Moretti"<Giovanni@reflections.co.nz>  writes:
>>>
>>>> I'm just starting with Babel and have been puzzled about why one file
>>>> worked and another didn't.
>>>>
>>>> I have been playing in a new file without any headers at all (no lines
>>>> starting with '*') and while I could execute the code in the buffer,
>>>> exporting to HTML always failed with:
>>>>
>>>>     No such file: c:/org/babel-python-test.org::
>>>>
>>> Hmm, it looks like it's trying to find a file with "::" attached to the
>>> end which is probably the source of the issue.  I wonder if this is a
>>> windows specific problem?
>>>
>> a-ha,
>>
>> I just noticed that while my test file "python.org" was exporting w/o
>> problem, it was opening a "python.org::" buffer in the process, so maybe
>> the reason this throws errors for you and not for me is just Unix's more
>> permissive file names.
>>
>> I've just pushed up a change to the Babel exporter that will only concat
>> the "::" to the end of a file name, where there is actually a heading to
>> following it.  Hopefully this will fix the error you described, please
>> let me know if that is not the case.
>>
>> Best -- Eric
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Bug: subtree export fails with src block
  2010-10-04 15:06       ` Eric Schulte
@ 2010-10-05  7:07         ` Jörg Hagmann
  0 siblings, 0 replies; 8+ messages in thread
From: Jörg Hagmann @ 2010-10-05  7:07 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, Giovanni

  On 10/4/10 5:06 PM, Eric Schulte wrote:
> Similar,
>
> I think this thread is also related
> http://thread.gmane.org/gmane.emacs.orgmode/31312/focus=31392
>
> either way the issue should be fixed in the latest Org-mode.  Please let
> me know if that is not the case.
Yes, it works with today's org version.
Many thanks!
Jörg
> Best -- Eric
>
> Jörg Hagmann<joerg.hagmann@unibas.ch>  writes:
>
>>   This might be the same problem I discussed recently?
>> See this thread:
>> http://thread.gmane.org/gmane.emacs.orgmode/31241/focus=31289
>>
>> Jörg
>>
>> On 10/4/10 3:48 PM, Eric Schulte wrote:
>>> "Eric Schulte"<schulte.eric@gmail.com>   writes:
>>>
>>> [...]
>>>> "Giovanni Moretti"<Giovanni@reflections.co.nz>   writes:
>>>>
>>>>> I'm just starting with Babel and have been puzzled about why one file
>>>>> worked and another didn't.
>>>>>
>>>>> I have been playing in a new file without any headers at all (no lines
>>>>> starting with '*') and while I could execute the code in the buffer,
>>>>> exporting to HTML always failed with:
>>>>>
>>>>>      No such file: c:/org/babel-python-test.org::
>>>>>
>>>> Hmm, it looks like it's trying to find a file with "::" attached to the
>>>> end which is probably the source of the issue.  I wonder if this is a
>>>> windows specific problem?
>>>>
>>> a-ha,
>>>
>>> I just noticed that while my test file "python.org" was exporting w/o
>>> problem, it was opening a "python.org::" buffer in the process, so maybe
>>> the reason this throws errors for you and not for me is just Unix's more
>>> permissive file names.
>>>
>>> I've just pushed up a change to the Babel exporter that will only concat
>>> the "::" to the end of a file name, where there is actually a heading to
>>> following it.  Hopefully this will fix the error you described, please
>>> let me know if that is not the case.
>>>
>>> Best -- Eric
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-05  7:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-04  3:02 Re: Bug: subtree export fails with src block Giovanni Moretti
2010-10-04 13:21 ` Eric Schulte
2010-10-04 13:48   ` Eric Schulte
2010-10-04 15:02     ` Jörg Hagmann
2010-10-04 15:06       ` Eric Schulte
2010-10-05  7:07         ` Jörg Hagmann
  -- strict thread matches above, loose matches on Subject: below --
2010-09-23  7:13 Christian Moe
2010-09-23  7:25 ` Noorul Islam K M
2010-09-23 15:17   ` Eric Schulte
2010-09-23 18:22     ` Christian Moe

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).