emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] returning propertized strings


From: John Kitchin
Subject: Re: [O] returning propertized strings
Date: Sun, 21 May 2017 17:21:11 -0400

I figured out the properties are getting lost in org-babel-format-result, in the beginning with (setq result (org-no-properties result)). 

I can see a reason this is desirable is that the properties would not be persistent on saving/closing. On the other hand, it could be really useful in some scenarios where temporary properties would be useful. 

Are there other reasons having properties on strings in the output are not desirable?  

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803

On Sun, May 21, 2017 at 9:04 AM, John Kitchin <address@hidden> wrote:


On Sat, May 20, 2017 at 9:46 PM, Charles C. Berry <address@hidden> wrote:
On Sat, 20 May 2017, John Kitchin wrote:

If I run this block I get test as a result, but all its properties have
been stripped.

#+BEGIN_SRC emacs-lisp :results drawer
(propertize "test" 'font-lock-face '(:foreground "red") 'help-echo
"tooltip")
#+END_SRC

#+RESULTS:
:RESULTS:
test
:END:

Does anyone know where this happens and if it can be avoided?

Where?

Not sure, but late enough that `:results pp' will print them or `:post ...' will receive them in `*this*'.

#+BEGIN_SRC emacs-lisp :results drawer pp
(propertize "test" 'font-lock-face '(:foreground "red") 'help-echo "tooltip")
#+END_SRC

#+RESULTS:
: #("test" 0 4
:   (help-echo "tooltip" font-lock-face
:            (:foreground "red")))

I get this too, but  I really want test to actually be red, and have a tooltip in the results, and neither of these two methods seem to achieve that.
 

also `*this*' will contain the propertized version if you use the :post header arg.

HTH,

Chuck




reply via email to

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