29

Is there a built-in command to delete the contents of a cell in a single keystroke within an org-mode table? Note, I don't want to delete the row, just the cell contents.

 | some text |  ==> |             |

If not, how would you write this?

2 Answers 2

40

org-table-blank-field, present in the “Tbl” menu.

It used to be bound to C-c SPC, but version 9.5 removed that default binding.

It's been around at least since version 6.01 in 2008, but for some reason it was only added to the manual as a consequence of this question.

5
  • exactly what I was looking for. Thanks!
    – wdkrnls
    Commented Sep 23, 2014 at 20:57
  • It has documented in the doc because of this question. The commit is orgmode.org/cgit.cgi/org-mode.git/commit/?id=9aa58fa . Requested lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00493.html Commented Feb 8, 2016 at 11:23
  • org-table-blank-field will clear the current line in a cell, but if the cell has multiple lines, it will still only affect the current line
    – rdcdr
    Commented Feb 2, 2017 at 18:50
  • Note that you can also set the mark with C-SPC, move the cursor, and use this command to clear a range of rows and/or columns in one go.
    – shawkinaw
    Commented Nov 13, 2019 at 18:52
  • To reset the binding: (define-key org-mode-map (kbd "C-c SPC") 'org-table-blank-field)
    – kotchwane
    Commented May 10, 2023 at 15:40
15

org-table-blank-field as already said, but also if you move to the cell with TAB, then typing will clear the cell content and replace it with what you type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.