From 421a33237386cefc089d34c1d009767a1d849c53 Mon Sep 17 00:00:00 2001 From: Chris Barrett Date: Tue, 26 Dec 2023 14:24:42 +1300 Subject: [PATCH] Fix org-format so that it works for non-file buffers --- lisp/org-format.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/org-format.el b/lisp/org-format.el index 5b5bcc4..7805f54 100644 --- a/lisp/org-format.el +++ b/lisp/org-format.el @@ -131,11 +131,10 @@ Only applies to level-1 headings in the document." "Format the current `org-mode' buffer." (interactive) (unless (org-capture-detect) - (let ((scope (if (org-format--in-archived-heading-p) - ;; archive files can be enormous--just format the heading at - ;; point after archiving. - 'tree - 'file))) + (let ((scope (when (org-format--in-archived-heading-p) + ;; archive files can be enormous--just format the heading at + ;; point after archiving. + 'tree))) (org-with-wide-buffer (when org-format-align-all-tables