Fix bug in uncompilation of column format

* lisp/org-colview.el (org-columns-uncompile-format): Fix bug when retrieving
operator symbol.
This commit is contained in:
Carsten Dominik 2013-11-26 13:14:06 +01:00
parent f1583aab46
commit 0ae48c544b
1 changed files with 5 additions and 3 deletions

View File

@ -1121,7 +1121,7 @@ display, or in the #+COLUMNS line of the current buffer."
(defun org-columns-uncompile-format (cfmt) (defun org-columns-uncompile-format (cfmt)
"Turn the compiled columns format back into a string representation." "Turn the compiled columns format back into a string representation."
(let ((rtn "") e s prop title op op-match width fmt printf fun calc) (let ((rtn "") e s prop title op op-match width fmt printf fun calc ee map)
(while (setq e (pop cfmt)) (while (setq e (pop cfmt))
(setq prop (car e) (setq prop (car e)
title (nth 1 e) title (nth 1 e)
@ -1131,8 +1131,10 @@ display, or in the #+COLUMNS line of the current buffer."
printf (nth 5 e) printf (nth 5 e)
fun (nth 6 e) fun (nth 6 e)
calc (nth 7 e)) calc (nth 7 e))
(when (setq op-match (rassoc (list fmt fun calc) org-columns-compile-map)) (setq map (copy-list org-columns-compile-map))
(setq op (car op-match))) (while (setq ee (pop map))
(if (equal fmt (nth 1 ee))
(setq op (car ee) map nil)))
(if (and op printf) (setq op (concat op ";" printf))) (if (and op printf) (setq op (concat op ";" printf)))
(if (equal title prop) (setq title nil)) (if (equal title prop) (setq title nil))
(setq s (concat "%" (if width (number-to-string width)) (setq s (concat "%" (if width (number-to-string width))