From: Nick Dokos <nicholas.dokos@hp.com>
To: Michael Hannon <jm_hannon@yahoo.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Underline ONLY the first character of a word?
Date: Wed, 24 Aug 2011 20:26:38 -0400 [thread overview]
Message-ID: <8267.1314231998@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Wed\, 24 Aug 2011 19\:28\:19 EDT." <7670.1314228499@alphaville.americas.hpqcorp.net>
Here is an amusing aside[fn:1]. Take the org file I posted previously:
--8<---------------cut here---------------start------------->8---
* Table :noexport:
#+TBLNAME: actions
| abbrev | action |
|--------+-----------------|
| a | actionable |
| b | bibulous |
| c | califragilistic |
#+begin_src python :results output :exports none :var table=actions
print "* Results"
print "#+begin_html"
for row in table:
print "<b>%s</b> <u>%s</u>%s<br/>" % (row[0], row[1][0:1], row[1][1:])
print "#+end_html"
#+end_src
--8<---------------cut here---------------end--------------->8---
If I export this to html, I get nothing in the body because of the :noexport: tag.
But if I evaluate the source block:
--8<---------------cut here---------------start------------->8---
* Table :noexport:
#+TBLNAME: actions
| abbrev | action |
|--------+-----------------|
| a | actionable |
| b | bibulous |
| c | califragilistic |
#+begin_src python :results output :exports none :var table=actions
print "* Results"
print "#+begin_html"
for row in table:
print "<b>%s</b> <u>%s</u>%s<br/>" % (row[0],
row[1][0:1],
row[1][1:])
print "#+end_html"
#+end_src
#+results:
#+begin_example
* Results
#+begin_html
<b>a</b> <u>a</u>ctionable<br/>
<b>b</b> <u>b</u>ibulous<br/>
<b>c</b> <u>c</u>alifragilistic<br/>
#+end_html
#+end_example
--8<---------------cut here---------------end--------------->8---
and then export (*without* the manual excision of the #+{begin,end}_example),
I get:
--8<---------------cut here---------------start------------->8---
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Results </h2>
<div class="outline-text-2" id="text-1">
<b>a</b> <u>a</u>ctionable<br/>
<b>b</b> <u>b</u>ibulous<br/>
<b>c</b> <u>c</u>alifragilistic<br/>
</div>
</div>
--8<---------------cut here---------------end--------------->8---
which surprised me: the "* Results" line is interpreted as a new headline
during export, despite the fact that it appears within an example block
(that's probably a consequence of the ordering of actions
in org-export-preprocess-string [fn:2]): the noexport tag strips everything
to the "* Results" line, which I guess is surprising at first but makes sense,
and the #+end_example line is silently discarded).
Oh, no! Look what I've done: András will now insist that the whole thing has
to be either documented completely or thrown out bodily :-)
With-tongue-firmly-in-cheek-ly yours,
Nick
Footnotes:
[fn:1] For some value of "amusing".
[fn:2] See somewhere in this thread: http://thread.gmane.org/gmane.emacs.orgmode/46021.
next prev parent reply other threads:[~2011-08-25 0:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 20:16 Underline ONLY the first character of a word? Michael Hannon
2011-08-24 21:51 ` suvayu ali
2011-08-24 22:44 ` Michael Hannon
2011-08-24 22:50 ` John Hendy
2011-08-25 21:30 ` Michael Hannon
2011-08-24 23:28 ` Nick Dokos
2011-08-24 23:34 ` Nick Dokos
2011-08-26 8:35 ` Carsten Dominik
2011-08-28 9:41 ` Niels Giesen
2011-08-29 3:48 ` Michael Hannon
2011-08-25 0:26 ` Nick Dokos [this message]
2011-08-26 5:59 ` Jambunathan K
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8267.1314231998@alphaville.americas.hpqcorp.net \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=jm_hannon@yahoo.com \
/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 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).