0

Is there any command to save the org file from the org table edit field buffer? If not, is there any way to check if the current buffer is an org table edit field buffer?

More details: When I am editing a cell in a org-table in a file, say tmp.org, I can edit the content of that cell in a separate buffer, called "Org Table Edit Field". I want to save the file tmp.org when I am in the buffer "Org Table Edit Field". Here is an example:

enter image description here

UPDATE (Oct, 2018): I am currently using the following workaround:

(defun my-org-save-file()
  (interactive)
  (if org-field-marker
      (progn
        (setq tb-field-current-pos (point))
        (org-ctrl-c-ctrl-c)
        (save-buffer)
        (org-table-edit-field (save-excursion))
        (goto-char tb-field-current-pos)
      )
    (save-buffer)
    )
  )
  • Would you provide an simple example please? Adding some detail and context to your end goal would also be helpful. Thanks! – Melioratus Jul 13 '18 at 1:29
  • 1
    There is org-save-all-org-buffers if that is doing what you want. For testing whether you are in a org-table-edit-field buffer you can use something like (if org-field-marker (with-current-buffer (marker-buffer org-field-marker) (save-buffer)) ...). – Tobias Oct 12 '18 at 22:23
  • org-field-marker is what I was looking for... – Diogo Oct 15 '18 at 15:38
  • Calling (save-excursion) without a body form doesn't do anything, I don't think you need it here. – Tyler Oct 15 '18 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.