Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-02 Thread Hsiu-Khuern Tang
* On Wed 09:33AM +, 02 Sep 2009, Carsten Dominik 
(carsten.domi...@gmail.com) wrote:
> Ah, yes, thank you for that detail.
> 
> Fixed now.

Yes, it works now, thank you very much!

-- 
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-02 Thread Carsten Dominik

Ah, yes, thank you for that detail.

Fixed now.

- Carsten

On Sep 2, 2009, at 9:40 AM, Nick Dokos wrote:


Carsten Dominik  wrote:


I am not able to reproduce the problem.



If the comment in a.sh starts with a space like this:

,
| #!/bin/sh
|
|  ## shell comment
| echo "This is a test"
`

then the .txt file has a comma before the comment:

,
| ...
| 1 test
| ~~~
|
|   #!/bin/sh
|
|   , ## shell comment
|   echo "This is a test"
`

If there is no space, then the comma is not present.  I'm really not
sure how this is supposed to work - is that the intention?

Thanks,
Nick

Versions: GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version  
2.12.9) of 2009-08-09 on gamaville.dokosmarshall.org

 Org-mode version 6.30 (release_6.30.8.g8b6ff)
(that includes my local changes, but nothing relating to this  
problem).


Carsten Dominik  wrote:


Hi Hsiu-Khuern,

I am not able to reproduce the problem.

- Carsten

On Sep 2, 2009, at 12:03 AM, Hsiu-Khuern Tang wrote:


* On Fri 05:45AM +, 24 Jul 2009, Tang, Hsiu-Khuern (hsiu-khuern.t...@hp.com
) wrote:

* On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com
) wrote:

Hi Hsiu-Khuern,

I've just pushed a fix for this: when the "src" switch is present,
including a file won't escape org-like lines.  With a bare # 
+include

we still escape lines starting with * or #.

Please test it and report any problem.


It works beautifully now.  Thank you very much for the fix!


It looks Org has reverted to the old behavior: inserting a comma at
a beginning
of every line in the #INCLUDE'd file that starts with whitespace
followed by #.

For example, if you export this as ascii (see
http://article.gmane.org/gmane.emacs.orgmode/15718):

File 1: a.org
==
* test

#+INCLUDE: "a.sh" src sh
==

File 2: a.sh
==
#!/bin/sh

## shell comment
echo "This is a test"
==

the output contains the line ", ## shell comment".

Related question: what git commands does one use to obtain all the
commits that
changed a particular range of lines in a file?  I'm quite lost with
git.

--
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: 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
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-02 Thread Nick Dokos
Carsten Dominik  wrote:

> I am not able to reproduce the problem.
> 

If the comment in a.sh starts with a space like this:

,
| #!/bin/sh
| 
|  ## shell comment
| echo "This is a test"
`

then the .txt file has a comma before the comment:

,
| ...
| 1 test 
| ~~~
| 
|   #!/bin/sh
|   
|   , ## shell comment
|   echo "This is a test"
`

If there is no space, then the comma is not present.  I'm really not
sure how this is supposed to work - is that the intention?

Thanks,
Nick

Versions: GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 
2009-08-09 on gamaville.dokosmarshall.org
  Org-mode version 6.30 (release_6.30.8.g8b6ff)
(that includes my local changes, but nothing relating to this problem).

Carsten Dominik  wrote:

> Hi Hsiu-Khuern,
> 
> I am not able to reproduce the problem.
> 
> - Carsten
> 
> On Sep 2, 2009, at 12:03 AM, Hsiu-Khuern Tang wrote:
> 
> > * On Fri 05:45AM +, 24 Jul 2009, Tang, Hsiu-Khuern 
> > (hsiu-khuern.t...@hp.com 
> > ) wrote:
> >> * On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com 
> >> ) wrote:
> >>> Hi Hsiu-Khuern,
> >>>
> >>> I've just pushed a fix for this: when the "src" switch is present,
> >>> including a file won't escape org-like lines.  With a bare #+include
> >>> we still escape lines starting with * or #.
> >>>
> >>> Please test it and report any problem.
> >>
> >> It works beautifully now.  Thank you very much for the fix!
> >
> > It looks Org has reverted to the old behavior: inserting a comma at  
> > a beginning
> > of every line in the #INCLUDE'd file that starts with whitespace  
> > followed by #.
> >
> > For example, if you export this as ascii (see
> > http://article.gmane.org/gmane.emacs.orgmode/15718):
> >
> > File 1: a.org
> > ==
> > * test
> >
> > #+INCLUDE: "a.sh" src sh
> > ==
> >
> > File 2: a.sh
> > ==
> > #!/bin/sh
> >
> > ## shell comment
> > echo "This is a test"
> > ==
> >
> > the output contains the line ", ## shell comment".
> >
> > Related question: what git commands does one use to obtain all the  
> > commits that
> > changed a particular range of lines in a file?  I'm quite lost with  
> > git.
> >
> > -- 
> > Best,
> > Hsiu-Khuern.
> >
> >
> > ___
> > Emacs-orgmode mailing list
> > Remember: 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
> Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-01 Thread Carsten Dominik

Hi Hsiu-Khuern,

I am not able to reproduce the problem.

- Carsten

On Sep 2, 2009, at 12:03 AM, Hsiu-Khuern Tang wrote:

* On Fri 05:45AM +, 24 Jul 2009, Tang, Hsiu-Khuern (hsiu-khuern.t...@hp.com 
) wrote:
* On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com 
) wrote:

Hi Hsiu-Khuern,

I've just pushed a fix for this: when the "src" switch is present,
including a file won't escape org-like lines.  With a bare #+include
we still escape lines starting with * or #.

Please test it and report any problem.


It works beautifully now.  Thank you very much for the fix!


It looks Org has reverted to the old behavior: inserting a comma at  
a beginning
of every line in the #INCLUDE'd file that starts with whitespace  
followed by #.


For example, if you export this as ascii (see
http://article.gmane.org/gmane.emacs.orgmode/15718):

File 1: a.org
==
* test

#+INCLUDE: "a.sh" src sh
==

File 2: a.sh
==
#!/bin/sh

## shell comment
echo "This is a test"
==

the output contains the line ", ## shell comment".

Related question: what git commands does one use to obtain all the  
commits that
changed a particular range of lines in a file?  I'm quite lost with  
git.


--
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-01 Thread Hsiu-Khuern Tang
* On Tue 10:47PM +, 01 Sep 2009, Dokos, Nicholas (nicholas.do...@hp.com) 
wrote:
> Hsiu-Khuern Tang  wrote:
> > It looks Org has reverted to the old behavior: inserting a comma at a 
> > beginning
> > of every line in the #INCLUDE'd file that starts with whitespace followed 
> > by #.
> > 
> > For example, if you export this as ascii (see
> > http://article.gmane.org/gmane.emacs.orgmode/15718):
> > 
> > File 1: a.org
> > ==
> > * test
> > 
> > #+INCLUDE: "a.sh" src sh
> > ==
> > 
> > File 2: a.sh
> > ==
> > #!/bin/sh
> > 
> >  ## shell comment
> > echo "This is a test"
> > ==
> > 
> > the output contains the line ", ## shell comment".
> > 
> > Related question: what git commands does one use to obtain all the commits 
> > that
> > changed a particular range of lines in a file?  I'm quite lost with git.
> > 
> 
> There was some churn for this particular functionality, but since I
> don't really understand what is *supposed* to happen, I'll just refer
> you (and Carsten and Bastien, both of whom made -possibly conflicting-
> changes to this functionality) to the following exchange in the archive,
> hoping it will shed some light and lead to a satisfactory resolution for
> all involved:
> 
>http://thread.gmane.org/gmane.emacs.orgmode/16244/focus=16259
> 
> 
> The relevant commits are
> 
> 68b65e8f480c17cfe1024001c236eb4065893f4d
> 
> and
> 
> dfd3749a273cc9f9a1d954363ea6de87049d17a7
> 
> Thanks,
> Nick

Thanks for pointing me to the relevant commits, both of which changed the
org-get-file-contents function.  I'm not sure what the correct behavior for
that function is, since it may ultimately be used for different purposes, e.g.,
to generate an agenda and for exporting.  For exporting to various formats, is
there any reason to escape Org-like lines -- headers and comments -- of an
#INCLUDE'd file, since the file contents are indented in the output anyway and
so there can be no confusion?  I'm not sure that the indentation occurs for all
export formats, but it seems to be the case for ASCII and HTML export.

At any rate, the docstring of org-get-file-contents is inconsistent with the
behavior:

"If MARKUP, don't protect org-like lines, the exporter will
take care of the block they are in."

It is actually protecting org-like lines when the markup is "src" or "example".

-- 
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-01 Thread Nick Dokos
Hsiu-Khuern Tang  wrote:

> * On Fri 05:45AM +, 24 Jul 2009, Tang, Hsiu-Khuern 
> (hsiu-khuern.t...@hp.com) wrote:
> > * On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com) 
> > wrote:
> > > Hi Hsiu-Khuern,
> > > 
> > > I've just pushed a fix for this: when the "src" switch is present,
> > > including a file won't escape org-like lines.  With a bare #+include 
> > > we still escape lines starting with * or #.
> > > 
> > > Please test it and report any problem. 
> > 
> > It works beautifully now.  Thank you very much for the fix!
> 
> It looks Org has reverted to the old behavior: inserting a comma at a 
> beginning
> of every line in the #INCLUDE'd file that starts with whitespace followed by 
> #.
> 
> For example, if you export this as ascii (see
> http://article.gmane.org/gmane.emacs.orgmode/15718):
> 
> File 1: a.org
> ==
> * test
> 
> #+INCLUDE: "a.sh" src sh
> ==
> 
> File 2: a.sh
> ==
> #!/bin/sh
> 
>  ## shell comment
> echo "This is a test"
> ==
> 
> the output contains the line ", ## shell comment".
> 
> Related question: what git commands does one use to obtain all the commits 
> that
> changed a particular range of lines in a file?  I'm quite lost with git.
> 

There was some churn for this particular functionality, but since I
don't really understand what is *supposed* to happen, I'll just refer
you (and Carsten and Bastien, both of whom made -possibly conflicting-
changes to this functionality) to the following exchange in the archive,
hoping it will shed some light and lead to a satisfactory resolution for
all involved:

   http://thread.gmane.org/gmane.emacs.orgmode/16244/focus=16259


The relevant commits are

68b65e8f480c17cfe1024001c236eb4065893f4d

and

dfd3749a273cc9f9a1d954363ea6de87049d17a7

Thanks,
Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-09-01 Thread Hsiu-Khuern Tang
* On Fri 05:45AM +, 24 Jul 2009, Tang, Hsiu-Khuern 
(hsiu-khuern.t...@hp.com) wrote:
> * On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com) 
> wrote:
> > Hi Hsiu-Khuern,
> > 
> > I've just pushed a fix for this: when the "src" switch is present,
> > including a file won't escape org-like lines.  With a bare #+include 
> > we still escape lines starting with * or #.
> > 
> > Please test it and report any problem. 
> 
> It works beautifully now.  Thank you very much for the fix!

It looks Org has reverted to the old behavior: inserting a comma at a beginning
of every line in the #INCLUDE'd file that starts with whitespace followed by #.

For example, if you export this as ascii (see
http://article.gmane.org/gmane.emacs.orgmode/15718):

File 1: a.org
==
* test

#+INCLUDE: "a.sh" src sh
==

File 2: a.sh
==
#!/bin/sh

 ## shell comment
echo "This is a test"
==

the output contains the line ", ## shell comment".

Related question: what git commands does one use to obtain all the commits that
changed a particular range of lines in a file?  I'm quite lost with git.

-- 
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-07-23 Thread Hsiu-Khuern Tang
* On Fri 01:22AM +, 24 Jul 2009, Bastien (bastiengue...@googlemail.com) 
wrote:
> Hi Hsiu-Khuern,
> 
> I've just pushed a fix for this: when the "src" switch is present,
> including a file won't escape org-like lines.  With a bare #+include 
> we still escape lines starting with * or #.
> 
> Please test it and report any problem. 

It works beautifully now.  Thank you very much for the fix!

-- 
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-07-23 Thread Bastien
Hi Hsiu-Khuern,

I've just pushed a fix for this: when the "src" switch is present,
including a file won't escape org-like lines.  With a bare #+include 
we still escape lines starting with * or #.

Please test it and report any problem. 

Thanks,

Hsiu-Khuern Tang  writes:

> I'm using 6.28trans.  Can you try to reproduce this using these two files:
>
> File 1: a.org
> ==
> * test
>
> #+INCLUDE: "a.sh" src sh
> ==
>
> File 2: a.sh
> ==
> #!/bin/sh
>
>  ## shell comment
> echo "This is a test"
> ==
>
> If I export a.org to HTML, the output has a comma before " ## shell comment"
> (but none before "#!/bin/sh", so maybe only lines with leading whitespace
> before a # are affected).
>
> Actually, the problem shows up even when exporting to ascii:
>
> ==
> Author:  
> Date: 2009-07-22 10:31:37 PDT
>
>
> Table of Contents
> =
> 1 test 
>
>
> 1 test 
> ~~~
>
>   #!/bin/sh
>   
>   , ## shell comment
>   echo "This is a test"
> ==
>
> Thanks for looking into this!

-- 
 Bastien


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-07-22 Thread Hsiu-Khuern Tang
* On Wed 07:50AM +, 22 Jul 2009, Bastien (bastiengue...@googlemail.com) 
wrote:
> Hi,
> 
> "Tang, Hsiu-Khuern"  writes:
> 
> > If I include a file in my Org file, say using
> >
> > #+INCLUDE: "script.sh" src sh
> >
> > and export to HTML, the included file shows up as a  block, which is 
> > nice.
> > However, a leading comma is put in front of every line that starts with a #,
> > even those with leading whitespace.  I understand that a comma is used to
> > escape # in the first column of literal examples, to distinguish from Org
> > comment lines.  (This escaping is no longer strictly necessary, since the
> > #+BEGIN_EXAMPLE block can now be indented.)
> 
> I cannot reproduce this.
> 
> Which version of Org are you using?

I'm using 6.28trans.  Can you try to reproduce this using these two files:

File 1: a.org
==
* test

#+INCLUDE: "a.sh" src sh
==

File 2: a.sh
==
#!/bin/sh

 ## shell comment
echo "This is a test"
==

If I export a.org to HTML, the output has a comma before " ## shell comment"
(but none before "#!/bin/sh", so maybe only lines with leading whitespace
before a # are affected).

Actually, the problem shows up even when exporting to ascii:

==
Author:  
Date: 2009-07-22 10:31:37 PDT


Table of Contents
=
1 test 


1 test 
~~~

  #!/bin/sh
  
  , ## shell comment
  echo "This is a test"
==

Thanks for looking into this!

-- 
Best,
Hsiu-Khuern.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unnecessary comma escapes in HTML export of #+INCLUDE files

2009-07-22 Thread Bastien
Hi,

"Tang, Hsiu-Khuern"  writes:

> If I include a file in my Org file, say using
>
> #+INCLUDE: "script.sh" src sh
>
> and export to HTML, the included file shows up as a  block, which is 
> nice.
> However, a leading comma is put in front of every line that starts with a #,
> even those with leading whitespace.  I understand that a comma is used to
> escape # in the first column of literal examples, to distinguish from Org
> comment lines.  (This escaping is no longer strictly necessary, since the
> #+BEGIN_EXAMPLE block can now be indented.)

I cannot reproduce this.

Which version of Org are you using?

PS: by commas do you mean columns?

-- 
 Bastien


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode