From 29c5bfd7b59c1eea26be360f5a03d7b2aca5de89 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 12 Nov 2008 11:48:46 +0100 Subject: [PATCH] Untabify ASCII image before returning to Org-mode. When an ASCII image is edited with C-c ', it will in the end be quoted by prepending colons to each line. If tabulators are used in the image, this may mess up the alignment. Since tabulators are not a good idea in ASCII images anyway, this patch makes sure that any tabulators are replaced by spaces. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/org.el | 1 + 2 files changed, 17 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 73b6aed24..591f05f97 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2008-11-12 Carsten Dominik + + * org.el (org-edit-src-exit): Untabify ASCII image before + returning. + + + + + + + + + + + + 2008-11-11 Carsten Dominik * org.el (org-yank): Make any prefix force normal yanking. diff --git a/lisp/org.el b/lisp/org.el index e0b082119..8a0147314 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5711,6 +5711,7 @@ the language, a switch telling of the content should be in a single line." (font-lock-unfontify-region (point-min) (point-max))) (put-text-property (point-min) (point-max) 'font-lock-fontified t)) (when (org-bound-and-true-p org-edit-src-picture) + (untabify (point-min) (point-max)) (goto-char (point-min)) (while (re-search-forward "^" nil t) (replace-match ": "))