From b8a48767798865518e3fa604dfb2b9f712391903 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 13 Sep 2023 21:02:23 -0400 Subject: [PATCH] Disable auto-aligning tables when Emacs loads Org-mode. Emacs will auto-align tables when org-mode is loaded if the document contains "#+STARTUP: align". Since Organic is just a parser, it has no business editing the input it receives so we are disabling this auto-align in Emacs to make the tests work properly. --- src/compare/parse.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compare/parse.rs b/src/compare/parse.rs index 700b5b1f..6170ce73 100644 --- a/src/compare/parse.rs +++ b/src/compare/parse.rs @@ -11,6 +11,8 @@ where let elisp_script = format!( r#"(progn (erase-buffer) + (require 'org) + (defun org-table-align () t) (insert "{escaped_file_contents}") (org-mode) (message "%s" (pp-to-string (org-element-parse-buffer))) @@ -42,6 +44,8 @@ where ))?; let elisp_script = format!( r#"(progn + (require 'org) + (defun org-table-align () t) (org-mode) (message "%s" (pp-to-string (org-element-parse-buffer))) )"#