From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: returning propertized strings Date: Sat, 20 May 2017 18:59:39 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c194056b99311054ffc976d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCDLa-0000kw-KM for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:59:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCDLZ-0004pK-Kr for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:59:42 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:36116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCDLZ-0004o0-DP for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:59:41 -0400 Received: by mail-wm0-x230.google.com with SMTP id 7so27883798wmo.1 for ; Sat, 20 May 2017 15:59:40 -0700 (PDT) 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: "emacs-orgmode@gnu.org" --94eb2c194056b99311054ffc976d Content-Type: text/plain; charset="UTF-8" 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? Thanks, John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu --94eb2c194056b99311054ffc976d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If I run this block I get test as a result, but all i= ts properties have been stripped.

#+BEGIN_SRC emac= s-lisp :results drawer
(propertize "test" 'font-loc= k-face '(:foreground "red") 'help-echo "tooltip"= ;)
#+END_SRC

#+RESULTS:
:RESUL= TS:
test
:END:

Does anyone kno= w where this happens and if it can be avoided?

Tha= nks,
John

-----------------------------------
Professor John= Kitchin=C2=A0
Doherty Hall A207F
Department of Chemical Engineering<= br>Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
=
--94eb2c194056b99311054ffc976d-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: returning propertized strings Date: Sat, 20 May 2017 18:46:35 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCFxC-0005bm-RX for emacs-orgmode@gnu.org; Sat, 20 May 2017 21:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCFx9-0007VY-Ok for emacs-orgmode@gnu.org; Sat, 20 May 2017 21:46:42 -0400 Received: from iport-acv1-out.ucsd.edu ([132.239.0.176]:65102) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCFx9-0007UE-Bz for emacs-orgmode@gnu.org; Sat, 20 May 2017 21:46:39 -0400 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: John Kitchin Cc: "emacs-orgmode@gnu.org" 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"))) also `*this*' will contain the propertized version if you use the :post header arg. HTH, Chuck 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: returning propertized strings Date: Sun, 21 May 2017 17:21:11 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c19309474c64205500f553c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCYHq-0002FI-QV for emacs-orgmode@gnu.org; Sun, 21 May 2017 17:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCYHp-0003sF-Ez for emacs-orgmode@gnu.org; Sun, 21 May 2017 17:21:14 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36409) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCYHp-0003s9-3y for emacs-orgmode@gnu.org; Sun, 21 May 2017 17:21:13 -0400 Received: by mail-wm0-x232.google.com with SMTP id 7so43699541wmo.1 for ; Sun, 21 May 2017 14:21:13 -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" --94eb2c19309474c64205500f553c Content-Type: text/plain; charset="UTF-8" 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 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sun, May 21, 2017 at 9:04 AM, John Kitchin wrote: > > > 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 >> >> > --94eb2c19309474c64205500f553c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I figured out the properties are getting lost in org-babel= -format-result, in the beginning with=C2=A0(setq result (org-no-properties = result)).=C2=A0

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 properti= es would be useful.=C2=A0

Are there other reasons = having properties on strings in the output are not desirable? =C2=A0
<= /div>

John

-----------------------------------
Professor John= Kitchin=C2=A0
Doherty Hall A207F
Department of Chemical Engineering<= br>Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
=

On Sun, May 21, 2017 at 9:04 AM, John Kitchi= n <jkitchin@andrew.cmu.edu> wrote:


On Sat, May 20, 2017 at 9:4= 6 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 real= ly want test to actually be red, and have a tooltip in the results, and nei= ther 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



--94eb2c19309474c64205500f553c--