[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] parsing of emphasis versus links

From: Eric S Fraga
Subject: [O] parsing of emphasis versus links
Date: Thu, 16 Mar 2017 19:48:07 +0000


I have been playing with using embedded calc equations in org mode.  I
have tried filters and with org emphasis markers but finally have come
around to using the new org link capabilities.  Thank you John for

I've defined the following:

#+begin_src emacs-lisp
   :export (lambda (path desc backend)
              ((eq 'latex backend)
               (format "\\texttt{%s}" desc))))
   :face '(:foreground "chartreuse"))

which I then use like this:

#+begin_src org
  [[calc:][Pv := 10^(6.886 - 1175.817 / (100 + 224.867)) => 1847.653]]

and with appropriate settings for calc [1], calc can manipulate and
evaluate the expressions.  So far, so good.

Two minor issues:

1. the fontification doesn't colour the links in the colour I would like
   (chartreuse, #7fff00).

2. if I have two expressions close enough, both with := and =>
   operators, org seems to get confused and interprets two of the =
   symbols, each from one expression, as emphasis markers, as in this

   #+begin_src org
     [[calc:][y := 3 x - 5 => 55]] [[calc:][z := sqrt(y) => 7.416]]

Screenshot attached showing both problems: colour and second = sign
disappearing in first link and first = sign in second link.

Any suggestions on how to improve/fix these aspects?  Both are minor
presentation issues and everything else is working very well.  Calc
allows me to work with these expressions easily in org now!

Many thanks,

[1]  Settings using calc: links:

     #+begin_src emacs-lisp
       (defun esf/org-mode-calc-settings ()
         (setq calc-embedded-open-formula "\\[\\[calc:]\\["
               calc-embedded-open-new-formula "[[calc:]["
               calc-embedded-close-formula "]]"
               calc-embedded-close-new-formula "]]"))
       (add-hook 'org-mode-hook #'esf/org-mode-calc-settings)

: Eric S Fraga (0xFFFCF67D), Emacs, Org 

Attachment: screendump-20170316193437.png
Description: PNG image

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]