[Top][All Lists]

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

Re: [Orgmode] Pretty org-entities in org-mode buffers

From: Carsten Dominik
Subject: Re: [Orgmode] Pretty org-entities in org-mode buffers
Date: Fri, 4 Jun 2010 10:57:47 +0200

On Jun 3, 2010, at 7:51 PM, Eric Schulte wrote:

Hi Carsten,

This appears to be an issue in the HEAD (as of two weeks ago) of the
Emacs git repository. I was able to get around this issue (and a couple of other font-lock related issues) by stepping back to an older version
of Emacs (tag EMACS_23_2 in the git repository).

I haven't tried to go back to the Emacs development HEAD, but I assume
that they'll take care of this issue sooner or later, either way it's
not a problem with any of the code in Org-mode.

You may or may not have noticed that there is now also support for subscripts and superscripts being displayed pretty. This is now realy how I wanted scientific note taking to work. Need to make a screencast to show how awesomely this does work.

The only thing missing is a little sketch tool in Emacs, fast enough to be used while taking notes... :-)

Thanks a lot for you initial implementation of pretty entities - this has been a breakthrough here.

Where do we stand with integrating org-babel? If you ask me, it is time to do that.

- Carsten

Best -- Eric

Carsten Dominik <address@hidden> writes:

Hi Eric,

have you been able to get past this issue?

- Carsten

On May 17, 2010, at 5:01 PM, Eric Schulte wrote:

So looking into this slightly deeper,

I do have org-pretty-entities set to t in my config.

Toggling entities display with C-c C-x \ has no effect.

The value of org-highlight-latex-fragments-and-specials is nil.

Entities are only displayed when I search for the "\\" character, no
other searches result in displayed entities.

Interestingly, when starting with a fresh "emacs -Q" and only loading

--8<---------------cut here---------------start------------->8---
(load-file "~/src/org/lisp/org-install.el")
(setq org-pretty-entities t)
--8<---------------cut here---------------end--------------->8---

I have the same problem, so maybe my version of Emacs is to blame, I'm
using the latest from the emacs git/bzr repo

--8<---------------cut here---------------start------------->8---
~/src/emacs/src/emacs --version
GNU Emacs
Copyright (C) 2010 Free Software Foundation, Inc.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
--8<---------------cut here---------------end--------------->8---

When I get some more time, I'll look into this further.

Thanks -- Eric

Carsten Dominik <address@hidden> writes:

On May 16, 2010, at 11:09 PM, Eric Schulte wrote:

Hi Carsten,

Thanks for folding in this feature.

I'm having some weird issues using the new entities display.  The
entities are not fontified in my org-mode buffers despite having set
org-pretty-entities variable to t.  However if I search
`isearch-forward-regexp' for the "\\" character in the buffer then
of the entities are displayed (e.g. \sum is replaced with ∑).

Any idea why the entity display is only working during a search?

One idea:  Do you have turned on org-highlight-latex-fragments-and-

- Carsten

Thanks -- Eric

Carsten Dominik <address@hidden> writes:

Hi everyone,

a modified version of Eric's code is now included into Org, I just
pushed it
to the git repo.

You can use the command `C-c C-x \' to toggle this feature.

The variable `org-pretty-entities' determines if this mode is on by

Finally, you can use

#+STARTUP: entitiespretty
#+STARTUP: entitiesplain

to change things on a per-file base.

Thanks to Eric for this great idea.

- Carsten

On May 5, 2010, at 6:19 PM, Eric Schulte wrote:


Recently I've been making use of org-entites for exporting my
heavy class notes to HTML.  I'm really loving the results.

This morning I've started playing around with the below function
`org-pretty-entities', which is adapted from Phil Hagelberg's
`pretty-lambdas'[1]. Calling this function in an org-mode buffer
have the effect of fontifying all org-entities text strings as the
character which they represent, so \Delta is replaced with Δ,
with λ, \in with ∈, and so forth.

I've just started playing with this, and I make no guarantees as
safety or utility, but I was very pleasantly surprised by the
of the function, and how nice it's been to see my special
appear in org-mode buffers as I type.

#+begin_src emacs-lisp :results silent
(defun org-pretty-entities ()
 nil (mapcar
      (lambda (el)
(concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
         `(0 (progn (compose-region (match-beginning 1) (-
end 1) 1)
                                    ,(nth 6 el)) nil))))


To try this out, just evaluate the above code block inside of an
org-mode buffer, then starting typing out org-entities.

Hope others find this useful.

Best -- Eric


Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.

- Carsten

- Carsten

- Carsten

- Carsten

reply via email to

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