From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: returning propertized strings Date: Sun, 21 May 2017 09:04:30 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140a8cc2bb4630550086562" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCQXF-0000oG-2R for emacs-orgmode@gnu.org; Sun, 21 May 2017 09:04:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCQXA-0001eq-8t for emacs-orgmode@gnu.org; Sun, 21 May 2017 09:04:37 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:38269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCQXA-0001eO-2H for emacs-orgmode@gnu.org; Sun, 21 May 2017 09:04:32 -0400 Received: by mail-wm0-x22f.google.com with SMTP id e127so5237168wmg.1 for ; Sun, 21 May 2017 06:04:31 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Charles C. Berry" Cc: "emacs-orgmode@gnu.org" --001a1140a8cc2bb4630550086562 Content-Type: text/plain; charset="UTF-8" On Sat, May 20, 2017 at 9:46 PM, Charles C. Berry 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 > > --001a1140a8cc2bb4630550086562 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, May 20, 2017 at 9:46 PM, Charles C. = Berry <ccberry@ucsd.edu> 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 "re= d") '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 "re= d") 'help-echo "tooltip")
#+END_SRC

#+RESULTS:
: #("test" 0 4
:=C2=A0 =C2=A0(help-echo "tooltip" font-lock-face
:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (:foreground "red")))<= br>

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

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

HTH,

Chuck


--001a1140a8cc2bb4630550086562--