* Pretty org-entities in org-mode buffers
@ 2010-05-05 16:19 Eric Schulte
2010-05-05 21:48 ` Sebastian Rose
` (3 more replies)
0 siblings, 4 replies; 27+ messages in thread
From: Eric Schulte @ 2010-05-05 16:19 UTC (permalink / raw)
To: Org Mode
Hi,
Recently I've been making use of org-entites for exporting my greek/math
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 will
have the effect of fontifying all org-entities text strings as the
character which they represent, so \Delta is replaced with Δ, \lambda
with λ, \in with ∈, and so forth.
I've just started playing with this, and I make no guarantees as to it's
safety or utility, but I was very pleasantly surprised by the simplicity
of the function, and how nice it's been to see my special characters
appear in org-mode buffers as I type.
#+begin_src emacs-lisp :results silent
(defun org-pretty-entities ()
(interactive)
(font-lock-add-keywords
nil (mapcar
(lambda (el)
(list
(concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\\)")
`(0 (progn (compose-region (match-beginning 1) (- (match-end 1) 1)
,(nth 6 el)) nil))))
org-entities)))
(org-pretty-entities)
#+end_src
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
Footnotes:
[1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-05 16:19 Pretty org-entities in org-mode buffers Eric Schulte
@ 2010-05-05 21:48 ` Sebastian Rose
2010-05-07 7:11 ` Carsten Dominik
` (2 subsequent siblings)
3 siblings, 0 replies; 27+ messages in thread
From: Sebastian Rose @ 2010-05-05 21:48 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
"Eric Schulte" <schulte.eric@gmail.com> writes:
> Hi,
>
> Recently I've been making use of org-entites for exporting my greek/math
> 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 will
> have the effect of fontifying all org-entities text strings as the
> character which they represent, so \Delta is replaced with Δ, \lambda
> with λ, \in with ∈, and so forth.
>
> I've just started playing with this, and I make no guarantees as to it's
> safety or utility, but I was very pleasantly surprised by the simplicity
> of the function, and how nice it's been to see my special characters
> appear in org-mode buffers as I type.
>
> #+begin_src emacs-lisp :results silent
> (defun org-pretty-entities ()
> (interactive)
> (font-lock-add-keywords
> nil (mapcar
> (lambda (el)
> (list
> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\\)")
> `(0 (progn (compose-region (match-beginning 1) (- (match-end 1) 1)
> ,(nth 6 el)) nil))))
> org-entities)))
>
> (org-pretty-entities)
> #+end_src
>
> 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.
Wow :-)
:results beautiful
Sebastian
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-05 16:19 Pretty org-entities in org-mode buffers Eric Schulte
2010-05-05 21:48 ` Sebastian Rose
@ 2010-05-07 7:11 ` Carsten Dominik
2010-05-07 15:27 ` Eric Schulte
2010-05-07 15:01 ` Eric S Fraga
2010-05-16 5:51 ` Carsten Dominik
3 siblings, 1 reply; 27+ messages in thread
From: Carsten Dominik @ 2010-05-07 7:11 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
Dear Eric,
this is fantastic. This is kind of like X-symbol, only that I can
just write my trusted LaTeX macros and get all those characters.
Makes me think that I need to add a few more symbols that I commonly
use in math expressions.
I am wondering if we could be a bit more generous with the regular
expression. For example, I would love for $\alpha=\beta$ to show the
symbols as well.
Also there should be a switch for turning this on and off.
I would like to integrate this code into org-entities.el.
Thanks for all your contributions, which continue to make Org-mode so
much richer.
- Carsten
On May 5, 2010, at 6:19 PM, Eric Schulte wrote:
> Hi,
>
> Recently I've been making use of org-entites for exporting my greek/
> math
> 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 will
> have the effect of fontifying all org-entities text strings as the
> character which they represent, so \Delta is replaced with Δ, \lambda
> with λ, \in with ∈, and so forth.
>
> I've just started playing with this, and I make no guarantees as to
> it's
> safety or utility, but I was very pleasantly surprised by the
> simplicity
> of the function, and how nice it's been to see my special characters
> appear in org-mode buffers as I type.
>
> #+begin_src emacs-lisp :results silent
> (defun org-pretty-entities ()
> (interactive)
> (font-lock-add-keywords
> nil (mapcar
> (lambda (el)
> (list
> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
> \)")
> `(0 (progn (compose-region (match-beginning 1) (- (match-
> end 1) 1)
> ,(nth 6 el)) nil))))
> org-entities)))
>
> (org-pretty-entities)
> #+end_src
>
> 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
>
> Footnotes:
> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-05 16:19 Pretty org-entities in org-mode buffers Eric Schulte
2010-05-05 21:48 ` Sebastian Rose
2010-05-07 7:11 ` Carsten Dominik
@ 2010-05-07 15:01 ` Eric S Fraga
2010-05-16 5:51 ` Carsten Dominik
3 siblings, 0 replies; 27+ messages in thread
From: Eric S Fraga @ 2010-05-07 15:01 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]
On Wed, 05 May 2010 10:19:44 -0600, "Eric Schulte" <schulte.eric@gmail.com> wrote:
>
> Hi,
>
> Recently I've been making use of org-entites for exporting my greek/math
> 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 will
> have the effect of fontifying all org-entities text strings as the
> character which they represent, so \Delta is replaced with Δ, \lambda
> with λ, \in with ∈, and so forth.
>
> I've just started playing with this, and I make no guarantees as to it's
> safety or utility, but I was very pleasantly surprised by the simplicity
> of the function, and how nice it's been to see my special characters
> appear in org-mode buffers as I type.
>
> #+begin_src emacs-lisp :results silent
> (defun org-pretty-entities ()
> (interactive)
> (font-lock-add-keywords
> nil (mapcar
> (lambda (el)
> (list
> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\\)")
> `(0 (progn (compose-region (match-beginning 1) (- (match-end 1) 1)
> ,(nth 6 el)) nil))))
> org-entities)))
>
> (org-pretty-entities)
> #+end_src
>
> 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.
Eric,
I am indeed finding this useful (as my notes are often math heavy as
well). One question: I don't fully understand the regexp above,
especially as I would have expected a specific character after the \s,
so is it possible to make the mapping take effect if I type, say
"\alpha."? Note the punctuation instead of a space, say.
Other than that, it works really nicely and fits in very well with the
org philosophy (e.g. links) in that the underlying representation is
still simple text. I've added this to my org-mode-hook and so far
everything is fine.
Thanks,
eric
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-07 7:11 ` Carsten Dominik
@ 2010-05-07 15:27 ` Eric Schulte
2010-05-07 18:20 ` Eric S Fraga
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: Eric Schulte @ 2010-05-07 15:27 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Dear Eric,
>
> this is fantastic.
Great, Thanks
> This is kind of like X-symbol, only that I can just write my trusted
> LaTeX macros and get all those characters. Makes me think that I need
> to add a few more symbols that I commonly use in math expressions.
>
Yea, I have the following org-entites customization in my setup which
covers some of the symbol names I commonly expect. It's been growing
the more I use org-entities.
--8<---------------cut here---------------start------------->8---
(add-to-list 'org-entities
'("supseteq" "\\supseteq" t "⊇" "[superset of or equal to]"
"[superset of or equal to]" "⊇"))
(add-to-list 'org-entities
'("subseteq" "\\subseteq" t "⊆" "[subset of or equal to]"
"[subset of or equal to]" "⊆"))
(add-to-list 'org-entities
'("subseteq" "\\subseteq" t "⊆" "[subset of or equal to]"
"[subset of or equal to]" "⊆"))
(add-to-list 'org-entities
'("leq" "\\leq" t "≤" "<=" "<=" "≤"))
(add-to-list 'org-entities
'("geq" "\\geq" t "≥" ">=" ">=" "≥"))
--8<---------------cut here---------------end--------------->8---
>
> I am wondering if we could be a bit more generous with the regular
> expression. For example, I would love for $\alpha=\beta$ to show the
> symbols as well.
agreed, maybe this would be better (using [:alnum:])? The only reason
for the restriction is to keep symbols from appearing mid way through
typing out some other symbol or word.
--8<---------------cut here---------------start------------->8---
(defun org-pretty-entities ()
(font-lock-add-keywords
nil (mapcar
(lambda (el)
(list
(concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[^[:alnum:]]" "\\)")
`(0 (progn (compose-region (match-beginning 1) (- (match-end 1) 1)
,(nth 6 el)) nil))))
org-entities)))
--8<---------------cut here---------------end--------------->8---
>
> Also there should be a switch for turning this on and off.
>
> I would like to integrate this code into org-entities.el.
>
Those both sound great. It would take a little bit of effort to look
into how to remove font-lock keywords. If you have the time and
inclination please go ahead with this, otherwise I should be able to
take a shot at it myself in the next week or two -- I'm in the middle of
my final exams right now.
>
> Thanks for all your contributions, which continue to make Org-mode so
> much richer.
>
It's my Pleasure -- Eric
>
> - Carsten
>
>
> On May 5, 2010, at 6:19 PM, Eric Schulte wrote:
>
>> Hi,
>>
>> Recently I've been making use of org-entites for exporting my greek/
>> math
>> 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 will
>> have the effect of fontifying all org-entities text strings as the
>> character which they represent, so \Delta is replaced with Δ, \lambda
>> with λ, \in with ∈, and so forth.
>>
>> I've just started playing with this, and I make no guarantees as to
>> it's
>> safety or utility, but I was very pleasantly surprised by the
>> simplicity
>> of the function, and how nice it's been to see my special characters
>> appear in org-mode buffers as I type.
>>
>> #+begin_src emacs-lisp :results silent
>> (defun org-pretty-entities ()
>> (interactive)
>> (font-lock-add-keywords
>> nil (mapcar
>> (lambda (el)
>> (list
>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>> \)")
>> `(0 (progn (compose-region (match-beginning 1) (-
>> (match-
>> end 1) 1)
>> ,(nth 6 el)) nil))))
>> org-entities)))
>>
>> (org-pretty-entities)
>> #+end_src
>>
>> 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
>>
>> Footnotes:
>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-07 15:27 ` Eric Schulte
@ 2010-05-07 18:20 ` Eric S Fraga
2010-05-08 5:15 ` Carsten Dominik
2010-05-08 5:17 ` Carsten Dominik
2 siblings, 0 replies; 27+ messages in thread
From: Eric S Fraga @ 2010-05-07 18:20 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode, Carsten Dominik
[-- Attachment #1: Type: text/plain, Size: 446 bytes --]
On Fri, 07 May 2010 09:27:44 -0600, "Eric Schulte" <schulte.eric@gmail.com> wrote:
[...]
> agreed, maybe this would be better (using [:alnum:])? The only reason
> for the restriction is to keep symbols from appearing mid way through
> typing out some other symbol or word.
Eric,
ignore my previous email (which crossed yours in the
æther...). :alnum: more than satisfies my request! This is
brilliant.
Thanks again,
eric
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-07 15:27 ` Eric Schulte
2010-05-07 18:20 ` Eric S Fraga
@ 2010-05-08 5:15 ` Carsten Dominik
2010-05-08 5:17 ` Carsten Dominik
2 siblings, 0 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-05-08 5:15 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
On May 7, 2010, at 5:27 PM, Eric Schulte wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Dear Eric,
>>
>> this is fantastic.
>
> Great, Thanks
>
>> This is kind of like X-symbol, only that I can just write my trusted
>> LaTeX macros and get all those characters. Makes me think that I
>> need
>> to add a few more symbols that I commonly use in math expressions.
>>
>
> Yea, I have the following org-entites customization in my setup which
> covers some of the symbol names I commonly expect. It's been growing
> the more I use org-entities.
>
> --8<---------------cut here---------------start------------->8---
> (add-to-list 'org-entities
There is now a special user variable that can be used to add your own
entities, if you want to avoid messing with this constant. But I guess
this is a matter of taste.
I will also accept patches that will add to org-entities, in a limited
way.
- Carsten
> '("supseteq" "\\supseteq" t "⊇" "[superset of or
> equal to]"
> "[superset of or equal to]" "⊇"))
> (add-to-list 'org-entities
> '("subseteq" "\\subseteq" t "⊆" "[subset of or
> equal to]"
> "[subset of or equal to]" "⊆"))
> (add-to-list 'org-entities
> '("subseteq" "\\subseteq" t "⊆" "[subset of or
> equal to]"
> "[subset of or equal to]" "⊆"))
> (add-to-list 'org-entities
> '("leq" "\\leq" t "≤" "<=" "<=" "≤"))
> (add-to-list 'org-entities
> '("geq" "\\geq" t "≥" ">=" ">=" "≥"))
> --8<---------------cut here---------------end--------------->8---
>
>>
>> I am wondering if we could be a bit more generous with the regular
>> expression. For example, I would love for $\alpha=\beta$ to show the
>> symbols as well.
>
> agreed, maybe this would be better (using [:alnum:])? The only reason
> for the restriction is to keep symbols from appearing mid way through
> typing out some other symbol or word.
>
> --8<---------------cut here---------------start------------->8---
> (defun org-pretty-entities ()
> (font-lock-add-keywords
> nil (mapcar
> (lambda (el)
> (list
> (concat "(?\\(" (regexp-quote "\\") (nth 0 el)
> "[^[:alnum:]]" "\\)")
> `(0 (progn (compose-region (match-beginning 1) (- (match-
> end 1) 1)
> ,(nth 6 el)) nil))))
> org-entities)))
> --8<---------------cut here---------------end--------------->8---
>
>>
>> Also there should be a switch for turning this on and off.
>>
>> I would like to integrate this code into org-entities.el.
>>
>
> Those both sound great. It would take a little bit of effort to look
> into how to remove font-lock keywords. If you have the time and
> inclination please go ahead with this, otherwise I should be able to
> take a shot at it myself in the next week or two -- I'm in the
> middle of
> my final exams right now.
>
>>
>> Thanks for all your contributions, which continue to make Org-mode so
>> much richer.
>>
>
> It's my Pleasure -- Eric
>
>>
>> - Carsten
>>
>>
>> On May 5, 2010, at 6:19 PM, Eric Schulte wrote:
>>
>>> Hi,
>>>
>>> Recently I've been making use of org-entites for exporting my greek/
>>> math
>>> 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
>>> will
>>> have the effect of fontifying all org-entities text strings as the
>>> character which they represent, so \Delta is replaced with Δ,
>>> \lambda
>>> with λ, \in with ∈, and so forth.
>>>
>>> I've just started playing with this, and I make no guarantees as to
>>> it's
>>> safety or utility, but I was very pleasantly surprised by the
>>> simplicity
>>> of the function, and how nice it's been to see my special characters
>>> appear in org-mode buffers as I type.
>>>
>>> #+begin_src emacs-lisp :results silent
>>> (defun org-pretty-entities ()
>>> (interactive)
>>> (font-lock-add-keywords
>>> nil (mapcar
>>> (lambda (el)
>>> (list
>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>> \)")
>>> `(0 (progn (compose-region (match-beginning 1) (-
>>> (match-
>>> end 1) 1)
>>> ,(nth 6 el)) nil))))
>>> org-entities)))
>>>
>>> (org-pretty-entities)
>>> #+end_src
>>>
>>> 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
>>>
>>> Footnotes:
>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-07 15:27 ` Eric Schulte
2010-05-07 18:20 ` Eric S Fraga
2010-05-08 5:15 ` Carsten Dominik
@ 2010-05-08 5:17 ` Carsten Dominik
2 siblings, 0 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-05-08 5:17 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
On May 7, 2010, at 5:27 PM, Eric Schulte wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>> Also there should be a switch for turning this on and off.
>>
>> I would like to integrate this code into org-entities.el.
>>
>
> Those both sound great. It would take a little bit of effort to look
> into how to remove font-lock keywords. If you have the time and
> inclination please go ahead with this, otherwise I should be able to
> take a shot at it myself in the next week or two -- I'm in the
> middle of
> my final exams right now.
I think the right way would be to install a function into font-lock-
keywords, and
that function can then honor a switch. I can do that.
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-05 16:19 Pretty org-entities in org-mode buffers Eric Schulte
` (2 preceding siblings ...)
2010-05-07 15:01 ` Eric S Fraga
@ 2010-05-16 5:51 ` Carsten Dominik
2010-05-16 21:09 ` Eric Schulte
2010-06-05 18:36 ` Daniel E. Doherty
3 siblings, 2 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-05-16 5:51 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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
default.
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:
> Hi,
>
> Recently I've been making use of org-entites for exporting my greek/
> math
> 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 will
> have the effect of fontifying all org-entities text strings as the
> character which they represent, so \Delta is replaced with Δ, \lambda
> with λ, \in with ∈, and so forth.
>
> I've just started playing with this, and I make no guarantees as to
> it's
> safety or utility, but I was very pleasantly surprised by the
> simplicity
> of the function, and how nice it's been to see my special characters
> appear in org-mode buffers as I type.
>
> #+begin_src emacs-lisp :results silent
> (defun org-pretty-entities ()
> (interactive)
> (font-lock-add-keywords
> nil (mapcar
> (lambda (el)
> (list
> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
> \)")
> `(0 (progn (compose-region (match-beginning 1) (- (match-
> end 1) 1)
> ,(nth 6 el)) nil))))
> org-entities)))
>
> (org-pretty-entities)
> #+end_src
>
> 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
>
> Footnotes:
> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-16 5:51 ` Carsten Dominik
@ 2010-05-16 21:09 ` Eric Schulte
2010-05-17 8:09 ` Eric S Fraga
` (2 more replies)
2010-06-05 18:36 ` Daniel E. Doherty
1 sibling, 3 replies; 27+ messages in thread
From: Eric Schulte @ 2010-05-16 21:09 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
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 the
org-pretty-entities variable to t. However if I search
`isearch-forward-regexp' for the "\\" character in the buffer then all
of the entities are displayed (e.g. \sum is replaced with ∑).
Any idea why the entity display is only working during a search?
Thanks -- Eric
Carsten Dominik <carsten.dominik@gmail.com> 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
> default.
>
> 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:
>
>> Hi,
>>
>> Recently I've been making use of org-entites for exporting my greek/
>> math
>> 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 will
>> have the effect of fontifying all org-entities text strings as the
>> character which they represent, so \Delta is replaced with Δ, \lambda
>> with λ, \in with ∈, and so forth.
>>
>> I've just started playing with this, and I make no guarantees as to
>> it's
>> safety or utility, but I was very pleasantly surprised by the
>> simplicity
>> of the function, and how nice it's been to see my special characters
>> appear in org-mode buffers as I type.
>>
>> #+begin_src emacs-lisp :results silent
>> (defun org-pretty-entities ()
>> (interactive)
>> (font-lock-add-keywords
>> nil (mapcar
>> (lambda (el)
>> (list
>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>> \)")
>> `(0 (progn (compose-region (match-beginning 1) (-
>> (match-
>> end 1) 1)
>> ,(nth 6 el)) nil))))
>> org-entities)))
>>
>> (org-pretty-entities)
>> #+end_src
>>
>> 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
>>
>> Footnotes:
>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-16 21:09 ` Eric Schulte
@ 2010-05-17 8:09 ` Eric S Fraga
2010-05-17 14:28 ` Carsten Dominik
2010-05-17 14:32 ` Carsten Dominik
2 siblings, 0 replies; 27+ messages in thread
From: Eric S Fraga @ 2010-05-17 8:09 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode, Carsten Dominik
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
On Sun, 16 May 2010 15:09:27 -0600, "Eric Schulte" <schulte.eric@gmail.com> 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 the
> org-pretty-entities variable to t. However if I search
> `isearch-forward-regexp' for the "\\" character in the buffer then all
> of the entities are displayed (e.g. \sum is replaced with ∑).
>
> Any idea why the entity display is only working during a search?
>
> Thanks -- Eric
Eric,
the new entities display is working just fine for me (thanks both you
and Carsten for this!) with org-pretty-entities set to t. Even the
bug I mentioned last week has been fixed.
Org-mode version 6.36trans (release_6.36.58.g99afb)
GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2) of 2009-11-02 on raven, modified by Debian
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-16 21:09 ` Eric Schulte
2010-05-17 8:09 ` Eric S Fraga
@ 2010-05-17 14:28 ` Carsten Dominik
2010-05-17 14:32 ` Carsten Dominik
2 siblings, 0 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-05-17 14:28 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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
> the
> org-pretty-entities variable to t. However if I search
> `isearch-forward-regexp' for the "\\" character in the buffer then all
> of the entities are displayed (e.g. \sum is replaced with ∑).
>
> Any idea why the entity display is only working during a search?
Hmm, I am unable to reproduce this problem. What happens while you
toggle the variable using `C-c C-x \' ?
- Carsten
>
> Thanks -- Eric
>
> Carsten Dominik <carsten.dominik@gmail.com> 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
>> default.
>>
>> 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:
>>
>>> Hi,
>>>
>>> Recently I've been making use of org-entites for exporting my greek/
>>> math
>>> 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
>>> will
>>> have the effect of fontifying all org-entities text strings as the
>>> character which they represent, so \Delta is replaced with Δ,
>>> \lambda
>>> with λ, \in with ∈, and so forth.
>>>
>>> I've just started playing with this, and I make no guarantees as to
>>> it's
>>> safety or utility, but I was very pleasantly surprised by the
>>> simplicity
>>> of the function, and how nice it's been to see my special characters
>>> appear in org-mode buffers as I type.
>>>
>>> #+begin_src emacs-lisp :results silent
>>> (defun org-pretty-entities ()
>>> (interactive)
>>> (font-lock-add-keywords
>>> nil (mapcar
>>> (lambda (el)
>>> (list
>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>> \)")
>>> `(0 (progn (compose-region (match-beginning 1) (-
>>> (match-
>>> end 1) 1)
>>> ,(nth 6 el)) nil))))
>>> org-entities)))
>>>
>>> (org-pretty-entities)
>>> #+end_src
>>>
>>> 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
>>>
>>> Footnotes:
>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-16 21:09 ` Eric Schulte
2010-05-17 8:09 ` Eric S Fraga
2010-05-17 14:28 ` Carsten Dominik
@ 2010-05-17 14:32 ` Carsten Dominik
2010-05-17 15:01 ` Eric Schulte
2 siblings, 1 reply; 27+ messages in thread
From: Carsten Dominik @ 2010-05-17 14:32 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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
> the
> org-pretty-entities variable to t. However if I search
> `isearch-forward-regexp' for the "\\" character in the buffer then all
> 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-
specials?
- Carsten
>
> Thanks -- Eric
>
> Carsten Dominik <carsten.dominik@gmail.com> 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
>> default.
>>
>> 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:
>>
>>> Hi,
>>>
>>> Recently I've been making use of org-entites for exporting my greek/
>>> math
>>> 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
>>> will
>>> have the effect of fontifying all org-entities text strings as the
>>> character which they represent, so \Delta is replaced with Δ,
>>> \lambda
>>> with λ, \in with ∈, and so forth.
>>>
>>> I've just started playing with this, and I make no guarantees as to
>>> it's
>>> safety or utility, but I was very pleasantly surprised by the
>>> simplicity
>>> of the function, and how nice it's been to see my special characters
>>> appear in org-mode buffers as I type.
>>>
>>> #+begin_src emacs-lisp :results silent
>>> (defun org-pretty-entities ()
>>> (interactive)
>>> (font-lock-add-keywords
>>> nil (mapcar
>>> (lambda (el)
>>> (list
>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>> \)")
>>> `(0 (progn (compose-region (match-beginning 1) (-
>>> (match-
>>> end 1) 1)
>>> ,(nth 6 el)) nil))))
>>> org-entities)))
>>>
>>> (org-pretty-entities)
>>> #+end_src
>>>
>>> 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
>>>
>>> Footnotes:
>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-17 14:32 ` Carsten Dominik
@ 2010-05-17 15:01 ` Eric Schulte
2010-06-03 8:48 ` Carsten Dominik
0 siblings, 1 reply; 27+ messages in thread
From: Eric Schulte @ 2010-05-17 15:01 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
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 24.0.50.1
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
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 <carsten.dominik@gmail.com> 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
>> the
>> org-pretty-entities variable to t. However if I search
>> `isearch-forward-regexp' for the "\\" character in the buffer then all
>> 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-
> specials?
>
> - Carsten
>
>
>>
>> Thanks -- Eric
>>
>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>> default.
>>>
>>> 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:
>>>
>>>> Hi,
>>>>
>>>> Recently I've been making use of org-entites for exporting my greek/
>>>> math
>>>> 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
>>>> will
>>>> have the effect of fontifying all org-entities text strings as the
>>>> character which they represent, so \Delta is replaced with Δ,
>>>> \lambda
>>>> with λ, \in with ∈, and so forth.
>>>>
>>>> I've just started playing with this, and I make no guarantees as to
>>>> it's
>>>> safety or utility, but I was very pleasantly surprised by the
>>>> simplicity
>>>> of the function, and how nice it's been to see my special characters
>>>> appear in org-mode buffers as I type.
>>>>
>>>> #+begin_src emacs-lisp :results silent
>>>> (defun org-pretty-entities ()
>>>> (interactive)
>>>> (font-lock-add-keywords
>>>> nil (mapcar
>>>> (lambda (el)
>>>> (list
>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>>> \)")
>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>> (match-
>>>> end 1) 1)
>>>> ,(nth 6 el)) nil))))
>>>> org-entities)))
>>>>
>>>> (org-pretty-entities)
>>>> #+end_src
>>>>
>>>> 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
>>>>
>>>> Footnotes:
>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>> - Carsten
>
> - Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-17 15:01 ` Eric Schulte
@ 2010-06-03 8:48 ` Carsten Dominik
2010-06-03 17:51 ` Eric Schulte
0 siblings, 1 reply; 27+ messages in thread
From: Carsten Dominik @ 2010-06-03 8:48 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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 24.0.50.1
> Copyright (C) 2010 Free Software Foundation, Inc.
> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
> 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 <carsten.dominik@gmail.com> 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
>>> the
>>> org-pretty-entities variable to t. However if I search
>>> `isearch-forward-regexp' for the "\\" character in the buffer then
>>> all
>>> 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-
>> specials?
>>
>> - Carsten
>>
>>
>>>
>>> Thanks -- Eric
>>>
>>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>>> default.
>>>>
>>>> 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:
>>>>
>>>>> Hi,
>>>>>
>>>>> Recently I've been making use of org-entites for exporting my
>>>>> greek/
>>>>> math
>>>>> 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
>>>>> will
>>>>> have the effect of fontifying all org-entities text strings as the
>>>>> character which they represent, so \Delta is replaced with Δ,
>>>>> \lambda
>>>>> with λ, \in with ∈, and so forth.
>>>>>
>>>>> I've just started playing with this, and I make no guarantees as
>>>>> to
>>>>> it's
>>>>> safety or utility, but I was very pleasantly surprised by the
>>>>> simplicity
>>>>> of the function, and how nice it's been to see my special
>>>>> characters
>>>>> appear in org-mode buffers as I type.
>>>>>
>>>>> #+begin_src emacs-lisp :results silent
>>>>> (defun org-pretty-entities ()
>>>>> (interactive)
>>>>> (font-lock-add-keywords
>>>>> nil (mapcar
>>>>> (lambda (el)
>>>>> (list
>>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>>>> \)")
>>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>>> (match-
>>>>> end 1) 1)
>>>>> ,(nth 6 el)) nil))))
>>>>> org-entities)))
>>>>>
>>>>> (org-pretty-entities)
>>>>> #+end_src
>>>>>
>>>>> 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
>>>>>
>>>>> Footnotes:
>>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Emacs-orgmode mailing list
>>>>> Please use `Reply All' to send replies to the list.
>>>>> Emacs-orgmode@gnu.org
>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>
>>>> - Carsten
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-03 8:48 ` Carsten Dominik
@ 2010-06-03 17:51 ` Eric Schulte
2010-06-03 21:50 ` Carsten Dominik
2010-06-04 8:57 ` Carsten Dominik
0 siblings, 2 replies; 27+ messages in thread
From: Eric Schulte @ 2010-06-03 17:51 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
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.
Best -- Eric
Carsten Dominik <carsten.dominik@gmail.com> 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 24.0.50.1
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
>> 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 <carsten.dominik@gmail.com> 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
>>>> the
>>>> org-pretty-entities variable to t. However if I search
>>>> `isearch-forward-regexp' for the "\\" character in the buffer then
>>>> all
>>>> 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-
>>> specials?
>>>
>>> - Carsten
>>>
>>>
>>>>
>>>> Thanks -- Eric
>>>>
>>>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>>>> default.
>>>>>
>>>>> 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:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Recently I've been making use of org-entites for exporting my
>>>>>> greek/
>>>>>> math
>>>>>> 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
>>>>>> will
>>>>>> have the effect of fontifying all org-entities text strings as the
>>>>>> character which they represent, so \Delta is replaced with Δ,
>>>>>> \lambda
>>>>>> with λ, \in with ∈, and so forth.
>>>>>>
>>>>>> I've just started playing with this, and I make no guarantees as
>>>>>> to
>>>>>> it's
>>>>>> safety or utility, but I was very pleasantly surprised by the
>>>>>> simplicity
>>>>>> of the function, and how nice it's been to see my special
>>>>>> characters
>>>>>> appear in org-mode buffers as I type.
>>>>>>
>>>>>> #+begin_src emacs-lisp :results silent
>>>>>> (defun org-pretty-entities ()
>>>>>> (interactive)
>>>>>> (font-lock-add-keywords
>>>>>> nil (mapcar
>>>>>> (lambda (el)
>>>>>> (list
>>>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\
>>>>>> \)")
>>>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>>>> (match-
>>>>>> end 1) 1)
>>>>>> ,(nth 6 el)) nil))))
>>>>>> org-entities)))
>>>>>>
>>>>>> (org-pretty-entities)
>>>>>> #+end_src
>>>>>>
>>>>>> 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
>>>>>>
>>>>>> Footnotes:
>>>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Emacs-orgmode mailing list
>>>>>> Please use `Reply All' to send replies to the list.
>>>>>> Emacs-orgmode@gnu.org
>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>
>>>>> - Carsten
>>>
>>> - Carsten
>
> - Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-03 17:51 ` Eric Schulte
@ 2010-06-03 21:50 ` Carsten Dominik
2010-06-04 8:57 ` Carsten Dominik
1 sibling, 0 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-06-03 21:50 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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.
OK, thanks.
I actually did pull the latest git mirror, and I did not see any
problems....
- Carsten
>
> Best -- Eric
>
> Carsten Dominik <carsten.dominik@gmail.com> 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 24.0.50.1
>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
>>> 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 <carsten.dominik@gmail.com> 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
>>>>> the
>>>>> org-pretty-entities variable to t. However if I search
>>>>> `isearch-forward-regexp' for the "\\" character in the buffer then
>>>>> all
>>>>> 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-
>>>> specials?
>>>>
>>>> - Carsten
>>>>
>>>>
>>>>>
>>>>> Thanks -- Eric
>>>>>
>>>>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>>>>> default.
>>>>>>
>>>>>> 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:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Recently I've been making use of org-entites for exporting my
>>>>>>> greek/
>>>>>>> math
>>>>>>> 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
>>>>>>> will
>>>>>>> have the effect of fontifying all org-entities text strings as
>>>>>>> the
>>>>>>> character which they represent, so \Delta is replaced with Δ,
>>>>>>> \lambda
>>>>>>> with λ, \in with ∈, and so forth.
>>>>>>>
>>>>>>> I've just started playing with this, and I make no guarantees as
>>>>>>> to
>>>>>>> it's
>>>>>>> safety or utility, but I was very pleasantly surprised by the
>>>>>>> simplicity
>>>>>>> of the function, and how nice it's been to see my special
>>>>>>> characters
>>>>>>> appear in org-mode buffers as I type.
>>>>>>>
>>>>>>> #+begin_src emacs-lisp :results silent
>>>>>>> (defun org-pretty-entities ()
>>>>>>> (interactive)
>>>>>>> (font-lock-add-keywords
>>>>>>> nil (mapcar
>>>>>>> (lambda (el)
>>>>>>> (list
>>>>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]"
>>>>>>> "\
>>>>>>> \)")
>>>>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>>>>> (match-
>>>>>>> end 1) 1)
>>>>>>> ,(nth 6 el)) nil))))
>>>>>>> org-entities)))
>>>>>>>
>>>>>>> (org-pretty-entities)
>>>>>>> #+end_src
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> Footnotes:
>>>>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Emacs-orgmode mailing list
>>>>>>> Please use `Reply All' to send replies to the list.
>>>>>>> Emacs-orgmode@gnu.org
>>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>>
>>>>>> - Carsten
>>>>
>>>> - Carsten
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-03 17:51 ` Eric Schulte
2010-06-03 21:50 ` Carsten Dominik
@ 2010-06-04 8:57 ` Carsten Dominik
2010-06-04 23:42 ` Eric Schulte
1 sibling, 1 reply; 27+ messages in thread
From: Carsten Dominik @ 2010-06-04 8:57 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode
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 <carsten.dominik@gmail.com> 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 24.0.50.1
>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
>>> 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 <carsten.dominik@gmail.com> 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
>>>>> the
>>>>> org-pretty-entities variable to t. However if I search
>>>>> `isearch-forward-regexp' for the "\\" character in the buffer then
>>>>> all
>>>>> 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-
>>>> specials?
>>>>
>>>> - Carsten
>>>>
>>>>
>>>>>
>>>>> Thanks -- Eric
>>>>>
>>>>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>>>>> default.
>>>>>>
>>>>>> 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:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Recently I've been making use of org-entites for exporting my
>>>>>>> greek/
>>>>>>> math
>>>>>>> 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
>>>>>>> will
>>>>>>> have the effect of fontifying all org-entities text strings as
>>>>>>> the
>>>>>>> character which they represent, so \Delta is replaced with Δ,
>>>>>>> \lambda
>>>>>>> with λ, \in with ∈, and so forth.
>>>>>>>
>>>>>>> I've just started playing with this, and I make no guarantees as
>>>>>>> to
>>>>>>> it's
>>>>>>> safety or utility, but I was very pleasantly surprised by the
>>>>>>> simplicity
>>>>>>> of the function, and how nice it's been to see my special
>>>>>>> characters
>>>>>>> appear in org-mode buffers as I type.
>>>>>>>
>>>>>>> #+begin_src emacs-lisp :results silent
>>>>>>> (defun org-pretty-entities ()
>>>>>>> (interactive)
>>>>>>> (font-lock-add-keywords
>>>>>>> nil (mapcar
>>>>>>> (lambda (el)
>>>>>>> (list
>>>>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]"
>>>>>>> "\
>>>>>>> \)")
>>>>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>>>>> (match-
>>>>>>> end 1) 1)
>>>>>>> ,(nth 6 el)) nil))))
>>>>>>> org-entities)))
>>>>>>>
>>>>>>> (org-pretty-entities)
>>>>>>> #+end_src
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> Footnotes:
>>>>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Emacs-orgmode mailing list
>>>>>>> Please use `Reply All' to send replies to the list.
>>>>>>> Emacs-orgmode@gnu.org
>>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>>
>>>>>> - Carsten
>>>>
>>>> - Carsten
>>
>> - Carsten
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-04 8:57 ` Carsten Dominik
@ 2010-06-04 23:42 ` Eric Schulte
2010-06-05 9:06 ` Eric S Fraga
0 siblings, 1 reply; 27+ messages in thread
From: Eric Schulte @ 2010-06-04 23:42 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hi Carsten,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 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.
Oh, that is *very* nice, I hadn't noticed the sub/super scripts before,
It's great that even the _{} bracketed notation works.
> Need to make a screencast to show how awesomely this does work.
>
Yes, a screencast has been on the Babel TODO list for some time now as
well.
>
> The only thing missing is a little sketch tool in Emacs, fast enough
> to be used while taking notes... :-)
>
I often use ditaa or example blocks with artist mode when I'm taking
notes, but the use of artist mode isn't quite "natural" -- although I
doubt you could do any better encoding sketches in plain text.
>
> Thanks a lot for you initial implementation of pretty entities - this
> has been a breakthrough here.
>
my pleasure, the real work was done before my implementation in the
collection of the org-entities.
>
> Where do we stand with integrating org-babel? If you ask me, it is
> time to do that.
>
I know Dan and Tom have made a start on the documentation, to date I
haven't really done any work on the org-babel integration, but that
should change starting next week. Expect to hear about progress on the
org-babel integration in the next week or two.
Thanks -- Eric
>
> - Carsten
>
>>
>> Best -- Eric
>>
>> Carsten Dominik <carsten.dominik@gmail.com> 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 24.0.50.1
>>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>>> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
>>>> 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 <carsten.dominik@gmail.com> 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
>>>>>> the
>>>>>> org-pretty-entities variable to t. However if I search
>>>>>> `isearch-forward-regexp' for the "\\" character in the buffer then
>>>>>> all
>>>>>> 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-
>>>>> specials?
>>>>>
>>>>> - Carsten
>>>>>
>>>>>
>>>>>>
>>>>>> Thanks -- Eric
>>>>>>
>>>>>> Carsten Dominik <carsten.dominik@gmail.com> 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
>>>>>>> default.
>>>>>>>
>>>>>>> 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:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Recently I've been making use of org-entites for exporting my
>>>>>>>> greek/
>>>>>>>> math
>>>>>>>> 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
>>>>>>>> will
>>>>>>>> have the effect of fontifying all org-entities text strings as
>>>>>>>> the
>>>>>>>> character which they represent, so \Delta is replaced with Δ,
>>>>>>>> \lambda
>>>>>>>> with λ, \in with ∈, and so forth.
>>>>>>>>
>>>>>>>> I've just started playing with this, and I make no guarantees as
>>>>>>>> to
>>>>>>>> it's
>>>>>>>> safety or utility, but I was very pleasantly surprised by the
>>>>>>>> simplicity
>>>>>>>> of the function, and how nice it's been to see my special
>>>>>>>> characters
>>>>>>>> appear in org-mode buffers as I type.
>>>>>>>>
>>>>>>>> #+begin_src emacs-lisp :results silent
>>>>>>>> (defun org-pretty-entities ()
>>>>>>>> (interactive)
>>>>>>>> (font-lock-add-keywords
>>>>>>>> nil (mapcar
>>>>>>>> (lambda (el)
>>>>>>>> (list
>>>>>>>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]"
>>>>>>>> "\
>>>>>>>> \)")
>>>>>>>> `(0 (progn (compose-region (match-beginning 1) (-
>>>>>>>> (match-
>>>>>>>> end 1) 1)
>>>>>>>> ,(nth 6 el)) nil))))
>>>>>>>> org-entities)))
>>>>>>>>
>>>>>>>> (org-pretty-entities)
>>>>>>>> #+end_src
>>>>>>>>
>>>>>>>> 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
>>>>>>>>
>>>>>>>> Footnotes:
>>>>>>>> [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Emacs-orgmode mailing list
>>>>>>>> Please use `Reply All' to send replies to the list.
>>>>>>>> Emacs-orgmode@gnu.org
>>>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>>>
>>>>>>> - Carsten
>>>>>
>>>>> - Carsten
>>>
>>> - Carsten
>
> - Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-04 23:42 ` Eric Schulte
@ 2010-06-05 9:06 ` Eric S Fraga
2010-06-05 9:18 ` Carsten Dominik
0 siblings, 1 reply; 27+ messages in thread
From: Eric S Fraga @ 2010-06-05 9:06 UTC (permalink / raw)
To: Eric Schulte; +Cc: Org Mode, Carsten Dominik
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
On Fri, 04 Jun 2010 17:42:59 -0600, "Eric Schulte" <schulte.eric@gmail.com> wrote:
[...]
> > The only thing missing is a little sketch tool in Emacs, fast enough
> > to be used while taking notes... :-)
> >
>
> I often use ditaa or example blocks with artist mode when I'm taking
> notes, but the use of artist mode isn't quite "natural" -- although I
> doubt you could do any better encoding sketches in plain text.
Carsten,
I also use ditaa with artist although it's not the most pleasant
experience unfortunately. I find artist mode very useful but also
rather idiosyncratic at times...
More importantly, there are some issues with the interaction between
org-mode and artist diagrams, specifically that org-mode sometimes
interprets artist diagrams as tables (e.g. if you have a vertical line
as the first non-whitespace character on every line of the diagram,
something that often happens when drawing a graph, say. Once org-mode
has decided that the diagram is actually an org table, editing in
source mode no longer works.
For instance, the following diagram (something to do with heat
exchanger networks, if you really want to know ;-) is interpreted as a
table:
--8<---------------cut here---------------start------------->8---
#+begin_src ditaa :file test.png :result file
|
| ------------>
|
|
| <---------
|
|
| ----------->
|
|
#+end_src
--8<---------------cut here---------------end--------------->8---
There is, of course, an easy way out which is to type any character
other than a | as the first non-whitespace character of the first
line...
I guess org-mode should not be interpreting anything between begin_src
and end_src lines?
Anyway, not a serious issue as there's an easy workaround but I
thought I'd highlight it.
[-- Attachment #2: Type: text/plain, Size: 75 bytes --]
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-05 9:06 ` Eric S Fraga
@ 2010-06-05 9:18 ` Carsten Dominik
0 siblings, 0 replies; 27+ messages in thread
From: Carsten Dominik @ 2010-06-05 9:18 UTC (permalink / raw)
To: e.fraga; +Cc: Org Mode
On Jun 5, 2010, at 11:06 AM, Eric S Fraga wrote:
> On Fri, 04 Jun 2010 17:42:59 -0600, "Eric Schulte" <schulte.eric@gmail.com
> > wrote:
>
> [...]
>
>>> The only thing missing is a little sketch tool in Emacs, fast enough
>>> to be used while taking notes... :-)
>>>
>>
>> I often use ditaa or example blocks with artist mode when I'm taking
>> notes, but the use of artist mode isn't quite "natural" -- although I
>> doubt you could do any better encoding sketches in plain text.
>
> Carsten,
>
> I also use ditaa with artist although it's not the most pleasant
> experience unfortunately. I find artist mode very useful but also
> rather idiosyncratic at times...
>
> More importantly, there are some issues with the interaction between
> org-mode and artist diagrams, specifically that org-mode sometimes
> interprets artist diagrams as tables (e.g. if you have a vertical line
> as the first non-whitespace character on every line of the diagram,
> something that often happens when drawing a graph, say. Once org-mode
> has decided that the diagram is actually an org table, editing in
> source mode no longer works.
>
> For instance, the following diagram (something to do with heat
> exchanger networks, if you really want to know ;-) is interpreted as a
> table:
>
> --8<---------------cut here---------------start------------->8---
> #+begin_src ditaa :file test.png :result file
> |
> | ------------>
> |
> |
> | <---------
> |
> |
> | ----------->
> |
> |
> #+end_src
> --8<---------------cut here---------------end--------------->8---
>
> There is, of course, an easy way out which is to type any character
> other than a | as the first non-whitespace character of the first
> line...
Hi Eric,
under what circumstances does Org interpret this as a table?
Not during export, I find. Editing should be done with C-c '
I now see that this does indeed not work in this case.... :(
>
> I guess org-mode should not be interpreting anything between begin_src
> and end_src lines?
Certainly trying to do this...
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-05-16 5:51 ` Carsten Dominik
2010-05-16 21:09 ` Eric Schulte
@ 2010-06-05 18:36 ` Daniel E. Doherty
2010-06-18 18:16 ` Raghav Kumar Gautam
1 sibling, 1 reply; 27+ messages in thread
From: Daniel E. Doherty @ 2010-06-05 18:36 UTC (permalink / raw)
To: emacs-orgmode
Eric and Carsten,
This is a really swell feature, Mr. Cleaver. Just a reminder to those
who might be reading this list, enabling CDLateX and org-pretty-entities
make typing greek characters *really* easy. Backquote a (`a) is enough
to give you alpha, `b beta, etc.
These two features work really nicely together.
Regards,
====================================================
Daniel E. Doherty
7300 W. 110th Street, Suite 930
Overland Park, KS 66210
913.338.7182 (Phone)
913,338.7164 (FAX)
Up the airy mountain,
Down the rushy glen,
We daren't go a-hunting,
For fear of little men.
--- William Allingham (Donegal, Ireland)
On 05/16/2010 12:51 AM, Carsten Dominik wrote:
> 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
> default.
>
> 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:
>
>> Hi,
>>
>> Recently I've been making use of org-entites for exporting my greek/math
>> 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 will
>> have the effect of fontifying all org-entities text strings as the
>> character which they represent, so \Delta is replaced with Δ, \lambda
>> with λ, \in with ∈, and so forth.
>>
>> I've just started playing with this, and I make no guarantees as to it's
>> safety or utility, but I was very pleasantly surprised by the simplicity
>> of the function, and how nice it's been to see my special characters
>> appear in org-mode buffers as I type.
>>
>> #+begin_src emacs-lisp :results silent
>> (defun org-pretty-entities ()
>> (interactive)
>> (font-lock-add-keywords
>> nil (mapcar
>> (lambda (el)
>> (list
>> (concat "(?\\(" (regexp-quote "\\") (nth 0 el) "[\s]" "\\)")
>> `(0 (progn (compose-region (match-beginning 1) (- (match-end 1) 1)
>> ,(nth 6 el)) nil))))
>> org-entities)))
>>
>> (org-pretty-entities)
>> #+end_src
>>
>> 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
>>
>> Footnotes:
>> [1]
>> http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-05 18:36 ` Daniel E. Doherty
@ 2010-06-18 18:16 ` Raghav Kumar Gautam
2010-06-24 6:57 ` Carsten Dominik
0 siblings, 1 reply; 27+ messages in thread
From: Raghav Kumar Gautam @ 2010-06-18 18:16 UTC (permalink / raw)
To: emacs-orgmode
Can we also have support for colors ? At least for a few colors ?
With Regards,
Raghav.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Re: Pretty org-entities in org-mode buffers
2010-06-18 18:16 ` Raghav Kumar Gautam
@ 2010-06-24 6:57 ` Carsten Dominik
2010-06-24 13:16 ` Raghav Kumar Gautam
0 siblings, 1 reply; 27+ messages in thread
From: Carsten Dominik @ 2010-06-24 6:57 UTC (permalink / raw)
To: Raghav Kumar Gautam; +Cc: emacs-orgmode
On Jun 18, 2010, at 8:16 PM, Raghav Kumar Gautam wrote:
>
> Can we also have support for colors ? At least for a few colors ?
High Raghav,
Can you be more specific, please?
- Carsten
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Pretty org-entities in org-mode buffers
2010-06-24 6:57 ` Carsten Dominik
@ 2010-06-24 13:16 ` Raghav Kumar Gautam
2010-06-24 13:48 ` Sebastian Rose
0 siblings, 1 reply; 27+ messages in thread
From: Raghav Kumar Gautam @ 2010-06-24 13:16 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, Raghav Kumar Gautam
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Jun 18, 2010, at 8:16 PM, Raghav Kumar Gautam wrote:
>
>>
>> Can we also have support for colors ? At least for a few colors ?
>
> High Raghav,
>
> Can you be more specific, please?
>
> - Carsten
Hi Carsten,
Often while workig out complex equations (say for a presentation), you
want to highlight only parts of it that have changed. I have seen people
using this trick in conferences. If we can have this supported in
org-mode, it would be really great. By this support I mean if I can
change color of certain parts of equation and istead of seeing latex
code of this, I can see the changed color, it would be much more intuitive.
On second thoughts, it would also be useful to have the support even for
normal text.
With Regards,
Raghav.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Re: Pretty org-entities in org-mode buffers
2010-06-24 13:16 ` Raghav Kumar Gautam
@ 2010-06-24 13:48 ` Sebastian Rose
2010-06-24 14:47 ` Raghav Kumar Gautam
0 siblings, 1 reply; 27+ messages in thread
From: Sebastian Rose @ 2010-06-24 13:48 UTC (permalink / raw)
To: Raghav Kumar Gautam; +Cc: emacs-orgmode, Carsten Dominik
Raghav Kumar Gautam <raghavgautam@gmail.com> writes:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Jun 18, 2010, at 8:16 PM, Raghav Kumar Gautam wrote:
>>
>>>
>>> Can we also have support for colors ? At least for a few colors ?
>>
>> High Raghav,
>>
>> Can you be more specific, please?
>>
>> - Carsten
>
> Hi Carsten,
>
> Often while workig out complex equations (say for a presentation), you
> want to highlight only parts of it that have changed. I have seen people
> using this trick in conferences. If we can have this supported in
> org-mode, it would be really great. By this support I mean if I can
> change color of certain parts of equation and istead of seeing latex
> code of this, I can see the changed color, it would be much more intuitive.
>
> On second thoughts, it would also be useful to have the support even for
> normal text.
>
> With Regards,
> Raghav.
I guess
M-x highlight-changes-mode
is not enough?
Sebastian
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Re: Pretty org-entities in org-mode buffers
2010-06-24 13:48 ` Sebastian Rose
@ 2010-06-24 14:47 ` Raghav Kumar Gautam
0 siblings, 0 replies; 27+ messages in thread
From: Raghav Kumar Gautam @ 2010-06-24 14:47 UTC (permalink / raw)
To: Sebastian Rose; +Cc: Carsten Dominik, emacs-orgmode, Raghav Kumar Gautam
Sebastian Rose <sebastian_rose@gmx.de> writes:
> Raghav Kumar Gautam <raghavgautam@gmail.com> writes:
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>>> On Jun 18, 2010, at 8:16 PM, Raghav Kumar Gautam wrote:
>>>
>>>>
>>>> Can we also have support for colors ? At least for a few colors ?
>>>
>>> High Raghav,
>>>
>>> Can you be more specific, please?
>>>
>>> - Carsten
>>
>> Hi Carsten,
>>
>> Often while workig out complex equations (say for a presentation), you
>> want to highlight only parts of it that have changed. I have seen people
>> using this trick in conferences. If we can have this supported in
>> org-mode, it would be really great. By this support I mean if I can
>> change color of certain parts of equation and istead of seeing latex
>> code of this, I can see the changed color, it would be much more intuitive.
>>
>> On second thoughts, it would also be useful to have the support even for
>> normal text.
>>
>> With Regards,
>> Raghav.
>
>
>
>
> I guess
>
> M-x highlight-changes-mode
>
> is not enough?
>
>
>
> Sebastian
I think it would not show highlight in the final pdf output.
Raghav.
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2010-06-24 14:47 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 16:19 Pretty org-entities in org-mode buffers Eric Schulte
2010-05-05 21:48 ` Sebastian Rose
2010-05-07 7:11 ` Carsten Dominik
2010-05-07 15:27 ` Eric Schulte
2010-05-07 18:20 ` Eric S Fraga
2010-05-08 5:15 ` Carsten Dominik
2010-05-08 5:17 ` Carsten Dominik
2010-05-07 15:01 ` Eric S Fraga
2010-05-16 5:51 ` Carsten Dominik
2010-05-16 21:09 ` Eric Schulte
2010-05-17 8:09 ` Eric S Fraga
2010-05-17 14:28 ` Carsten Dominik
2010-05-17 14:32 ` Carsten Dominik
2010-05-17 15:01 ` Eric Schulte
2010-06-03 8:48 ` Carsten Dominik
2010-06-03 17:51 ` Eric Schulte
2010-06-03 21:50 ` Carsten Dominik
2010-06-04 8:57 ` Carsten Dominik
2010-06-04 23:42 ` Eric Schulte
2010-06-05 9:06 ` Eric S Fraga
2010-06-05 9:18 ` Carsten Dominik
2010-06-05 18:36 ` Daniel E. Doherty
2010-06-18 18:16 ` Raghav Kumar Gautam
2010-06-24 6:57 ` Carsten Dominik
2010-06-24 13:16 ` Raghav Kumar Gautam
2010-06-24 13:48 ` Sebastian Rose
2010-06-24 14:47 ` Raghav Kumar Gautam
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).