From: Dov Grobgeld <dov.grobgeld@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Different face for org-table fields with formulas
Date: Mon, 5 Dec 2011 23:29:41 +0200 [thread overview]
Message-ID: <CA++fsGFHs+wAgP349P9AaBxPaBs2dea=dZ9N3jJ7Egbiteo2qg@mail.gmail.com> (raw)
In-Reply-To: <CA++fsGEM5cGwn=hJqHrPUXLTp5=v6yF3SPEqeYOFHvULPxBmpw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
I had a look at the org-mode sources and found that this was quite trivial
to implement on the source level. E.g. the following patch embeds the
output of an org formula in ~~ to make it org-verbatim. This is easily
changed to another couple of characters that may then be set in
org-emphasis-alist to whatever formatting I fancy.
index edcdbe1..9ad01d4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2572,7 +2572,7 @@ $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 "~%s~" (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)))
On Sun, Dec 4, 2011 at 09:15, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:
> Has anyone hacked up the use of using a different face for org-table
> fields with formulas. This would be useful for quickly realizing what are
> inputs and outputs in a org spreadsheet. Currently I do this by adding the
> formatting ";~%.4f~" to my formulas. But it would be nicer if this was a
> settable property.
>
> Thanks!
> Dov
>
>
[-- Attachment #2: Type: text/html, Size: 3250 bytes --]
next prev parent reply other threads:[~2011-12-05 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-04 7:15 Different face for org-table fields with formulas Dov Grobgeld
2011-12-05 21:29 ` Dov Grobgeld [this message]
2011-12-06 8:06 ` Rainer M Krug
2011-12-11 13:05 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA++fsGFHs+wAgP349P9AaBxPaBs2dea=dZ9N3jJ7Egbiteo2qg@mail.gmail.com' \
--to=dov.grobgeld@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.