commit 7a513b2c00e83f81c8bf1d3abe482d00a2946abc (patch)
parent c09b91963 Merge branch 'master' of orgmode.org:org-mode
tree 141b2bfbbd4115516a773b5fbf5a41a53b298e84
author Bastien Guerry <bzg@altern.org> 2011-12-11 14:05:13 +0100
committer Bastien Guerry <bzg@altern.org> 2011-12-11 14:05:13 +0100
New option `org-table-formula-field-format'.
Format for fields which contain the result of a formula.
For example, using \"~%s~\" will display the result within tilde
characters. Beware that modifying the display can prevent the
field from being used in another formula.
Based on an idea of Dov Grobgeld.
---
lisp/org-table.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 10c18df41..6ea072751 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -241,6 +241,14 @@ days."
(symbol :tag "Hours " 'hours)
(symbol :tag "Days " 'days)))
+(defcustom org-table-formula-field-format "%s"
+ "Format for fields which contain the result of a formula.
+For example, using \"~%s~\" will display the result within tilde
+characters. Beware that modifying the display can prevent the
+field from being used in another formula."
+ :group 'org-table-settings
+ :type 'string)
+
(defcustom org-table-formula-evaluate-inline t
"Non-nil means TAB and RET evaluate a formula in current table field.
If the current field starts with an equal sign, it is assumed to be a formula
@@ -2572,7 +2580,8 @@ $1-> %s\n" orig formula form0 form))
(message "")))
(if (listp ev) (setq fmt nil ev "#ERROR"))
(org-table-justify-field-maybe
- (if fmt (format fmt (string-to-number ev)) ev))
+ (format org-table-formula-field-format
+ (if fmt (format fmt (string-to-number ev)) ev)))
(if (and down (> ndown 0) (looking-at ".*\n[ \t]*|[^-]"))
(call-interactively 'org-return)
(setq ndown 0)))
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).