Dear org-mode hackers, in a org-mode file I copy various information to a org-table. Sometimes there are empty rows in that org-table which I don't like. Therefore I wrote a little function that removes empty rows from a org-mode table.
Maybe this is of any for org-mode or for other people. I would like to hear of any improvements or better ways to do this. Maybe this already exists in org-mode somewhere? :-) #+BEGIN_SRC emacs-lisp (defun fa/org-table-remove-empty-rows () "Removes empty rows in a org-mode table." (interactive) (save-excursion (unless (org-table-p) (error "You are not in an org-table.")) (goto-char (org-table-begin)) (let ((tbl-list (org-table-to-lisp))) (while (let ((row-list (car tbl-list))) (cond ((and (listp row-list) (equal row-list (make-list (length row-list) (string)))) (kill-line) (kill-line)) (t (next-line))) (setq tbl-list (cdr tbl-list))))))) #+END_SRC This functions does the following: |------+------+-----| |------+------+-----| | test | foo | bar | | test | foo | bar | |------+------+-----| |------+------+-----| | 1 | 2 | 3 | | 1 | 2 | 3 | | | | | | 4 | | 6 | | 4 | | 6 | --> | | test | bla | | | | | |------+------+-----| | | test | bla | | | 2 | 4 | |------+------+-----| |------+------+-----| | | | | | | 2 | 4 | |------+------+-----| -- Florian Adamsky http://florian.adamsky.it/