From: Hsiu-Khuern Tang <hsiu-khuern.tang@hp.com>
To: emacs-orgmode@gnu.org
Subject: Re: Unnecessary comma escapes in HTML export of #+INCLUDE files
Date: Tue, 1 Sep 2009 17:09:13 -0700 [thread overview]
Message-ID: <20090902000913.GS4172@hplhtang.hpl.hp.com> (raw)
In-Reply-To: <9119.1251845271@alphaville.usa.hp.com>
* On Tue 10:47PM +0000, 01 Sep 2009, Dokos, Nicholas (nicholas.dokos@hp.com) wrote:
> Hsiu-Khuern Tang <hsiu-khuern.tang@hp.com> 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.
next prev parent reply other threads:[~2009-09-02 0:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 1:13 Unnecessary comma escapes in HTML export of #+INCLUDE files Tang, Hsiu-Khuern
2009-07-22 7:50 ` Bastien
2009-07-22 17:35 ` Hsiu-Khuern Tang
2009-07-24 1:22 ` Bastien
2009-07-24 5:45 ` Hsiu-Khuern Tang
2009-09-01 22:03 ` Hsiu-Khuern Tang
[not found] ` <hsiu-khuern.tang@hp.com>
2009-09-01 22:47 ` Nick Dokos
2009-09-02 0:09 ` Hsiu-Khuern Tang [this message]
2009-09-02 6:25 ` Carsten Dominik
2009-09-02 7:40 ` Nick Dokos
2009-09-02 9:33 ` Carsten Dominik
2009-09-03 5:34 ` Hsiu-Khuern Tang
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090902000913.GS4172@hplhtang.hpl.hp.com \
--to=hsiu-khuern.tang@hp.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.