From f88f4fc4fb5f6eac898ae42fce3f15b707f01361 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 28 Aug 2009 09:15:52 +0200 Subject: [PATCH] Export: Remove table rows that only contain width and alignment markers The width and alignment in table columns can be set with a cookie like "<10>" or "" or "". In order to keep Org from exporting such lines, the first column of a line can contain only "/". However, for convenience, this commit implements a special case: If the entire row contains only sch markers, the line will automatically be discarded during export. --- doc/org.texi | 2 +- lisp/org-exp.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 812fe6082..602c21c4a 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -2595,7 +2595,7 @@ All lines that should be recalculated should be marked with @samp{#} or @samp{*}. @item / Do not export this line. Useful for lines that contain the narrowing -@samp{} markers. +@samp{} markers or column group markers. @end table Finally, just to whet your appetite for what can be done with the diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 7354be0db..fc1a81664 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1840,8 +1840,8 @@ When it is nil, all comments will be removed." (while (re-search-forward "^[ \t]*|" nil t) (beginning-of-line 1) (if (or (looking-at "[ \t]*| *[!_^] *|") - (and (looking-at ".*?| *<[0-9]+> *|") - (not (looking-at ".*?| *[^ <|]")))) + (and (looking-at "[ \t]*|\\( *\\(<[0-9]+>\\|<[rl]>\\|<[rl][0-9]+>\\)? *|\\)+[ \t]*$") + (not (looking-at ".*?| *[^ <|\n]")))) (delete-region (max (point-min) (1- (point-at-bol))) (point-at-eol)) (end-of-line 1)))) -- 2.11.4.GIT