emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [SOLVED]


From: Uwe Brauer
Subject: Re: [O] [SOLVED]
Date: Wed, 04 Apr 2018 15:29:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)



   > To answer my own question

   > | / | /     |     |       | /   |
   > |   | Name  | Res | Letra | Obs |
   > |---+-------+-----+-------+-----|
   > |   | Smith |   0 |       |     |
   > |   | Jones | 1.4 |       |     |
   > |   | Bond  | 5.6 | *     |     |

   > All columns starting with / are ignored when exporting. Sorry for the
   > noise and the double posting.


That is not entirely correct. Someone (I forgot who it was, sorry)
provided me with the following hack


(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)))


That is very useful and I wonder why there is nothing in org vanilla
(but then it might and I did not find it.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]