From: Michael Brand <michael.ch.brand@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: tables, comment in one line, export to html
Date: Tue, 26 Apr 2016 18:25:34 +0200 [thread overview]
Message-ID: <CALn3zoiKpprP-G0ZTmyrOJaqXXGPFKa6TC9iJk_iBfGnsy_zgw@mail.gmail.com> (raw)
In-Reply-To: <87inzdhn50.fsf@mat.ucm.es>
Hi Uwe
On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer <oub@mat.ucm.es> wrote:
> I would like to have a table entry in which the last colum contains
> comments which I don't want to export to html.
>
> Like this
>
> | Joe Smith | 7 | 25 | 5 | | 37 | | #+begin_comment from group B B #+end_comment |
>
> But this does not work. So how can I achieve it?
I have the same need now and just hacked something simple together to
export
| / | / | | <r> |
| | 1n | 2y | 3y |
| / | <r> | / | |
| | 1y | 2n | 3y |
| / | <r> | / |
| 1y | 2y | 3n |
| / | / | / | <r> | / | / | / |
| | 1n | 2n | 3y | 4n | 5n | 6n |
| / | <r> | <l> | <r> | <l> | <r> | <l> |
| / | / | / | / | | / | / |
| | 1n | 2n | 3n | 4y | 5n | 6n |
# Same result with a less useful notation:
| / | <r> | <l> | <r> | <l> | <r> | <l> |
| / | / | / | | | / | / |
| / | | / | / | | | |
| | 1n | 2n | 3n | 4y | 5n | 6n |
# Deletion must not get trapped with this:
| / | <r> | <l> | <r> | <l> | <r> | <l> |
| / | | | | | | |
| | / | / | / | | | |
| | 1y | 2y | 3y | 4y | 5y | 6y |
as e. g. ASCII to
: 2y 3y
:
: 1y 3y
:
: 1y 2y
:
: 3y
:
: 4y
:
: 4y
:
: / / /
: 1y 2y 3y 4y 5y 6y
with
(add-hook 'org-export-before-processing-hook
'f-ox-filter-table-column-del)
(defun f-ox-filter-table-column-del (back-end)
"Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1.
If you want a non-empty column $1 to be deleted make it $2 by
inserting an empty column before or rearrange column order in
some other way. Make sure \"/\" is in $1 again after that."
(while (re-search-forward
"^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t)
(goto-char (match-beginning 2))
(org-table-delete-column)
(beginning-of-line)))
Michael
next prev parent reply other threads:[~2016-04-26 16:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 11:08 tables, comment in one line, export to html Uwe Brauer
[not found] ` <6pkhucxunh.ln2@news.c0t0d0s0.de>
2016-04-19 13:40 ` Uwe Brauer
2016-04-19 13:42 ` Uwe Brauer
2016-04-26 16:25 ` Michael Brand [this message]
2016-04-26 16:49 ` Uwe Brauer
2016-04-26 16:55 ` Tory S. Anderson
2016-04-26 19:14 ` Nicolas Goaziou
2016-04-26 20:56 ` Michael Brand
2016-04-26 21:10 ` Nicolas Goaziou
2016-04-27 5:56 ` Michael Brand
2016-04-27 8:04 ` Nicolas Goaziou
2016-04-27 8:19 ` Nicolas Goaziou
2016-04-27 10:18 ` Michael Brand
2016-04-27 11:45 ` Nicolas Goaziou
[not found] <55d89bd56ed0429d8029b34af3a8f866@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-19 17:01 ` Eric S Fraga
[not found] ` <caa61e02395342579726b84d3cbca9e0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-19 19:02 ` Eric S Fraga
2016-04-19 19:54 ` Uwe Brauer
[not found] ` <5fe8d3fe10224e88baac3f6665607e4d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-20 7:38 ` Eric S Fraga
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=CALn3zoiKpprP-G0ZTmyrOJaqXXGPFKa6TC9iJk_iBfGnsy_zgw@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=oub@mat.ucm.es \
/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).