Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I quickly strike-through every element of a row in a table in org-mode?

For example if I have the following table:

| h1    | h2    | h3    | h4     |
| foo   | bar   | baz   | bazong |
| lorem | ipsum | dolor | sit    |

I want to get this

| h1    | h2    | h3    | h4       |
| +foo+ | +bar+ | +baz+ | +bazong+ |
| lorem | ipsum | dolor | sit      |

Without manually adding a '+' at the beginning and the end of every cell.

share|improve this question
up vote 4 down vote accepted

If you put the point at the beginning of the line you want to strike through, you can use the following replace-regexp to strike through all the contents

C-M-%      ;; Query-regexp-replace
" +\(.+?\) +|" RET " +\1+ |"  ;; Strikethrough all content up to the next |

Then only do so for the length of that line (If you select the line first you can perform on the entire region with !.

share|improve this answer
Thanks, that looks like a good start. The RegExp is what I need. – Ocaso Protal Mar 1 '13 at 7:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .