瀏覽代碼

ox-ascii: Justify correctly with indent-tabs-mode

* lisp/ox-ascii.el (org-ascii--justify-lines): Ensure that
`indent-tabs-mode' is nil when applying indentation to justify lines.
As other parts of ox-ascii use spaces for adjustments, if
`indent-tabs-mode' is respected, ox-ascii will produce an an
inconsistently formatted export.  It's preferable to just force spaces
by binding `indent-tabs-mode' to nil.

TINYCHANGE
Morgan Willcock 3 年之前
父節點
當前提交
3a77e59fc9
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lisp/ox-ascii.el

+ 3 - 0
lisp/ox-ascii.el

@@ -480,6 +480,9 @@ HOW determines the type of justification: it can be `left',
     (insert s)
     (goto-char (point-min))
     (let ((fill-column text-width)
+          ;; Ensure that `indent-tabs-mode' is nil so that indentation
+          ;; will always be achieved using spaces rather than tabs.
+          (indent-tabs-mode nil)
 	  ;; Disable `adaptive-fill-mode' so it doesn't prevent
 	  ;; filling lines matching `adaptive-fill-regexp'.
 	  (adaptive-fill-mode nil))