emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Help] Look for a exist function to car a contact, Urgent!!!
@ 2013-06-03 23:44 Feng Shu
  2013-06-04  2:01 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Feng Shu @ 2013-06-03 23:44 UTC (permalink / raw)
  To: orgmode


How to get the information "test" from:

((#("test" 0 2 (fontified nil org-category "i-contacts"))

Thanks!


-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Help] Look for a exist function to car a contact, Urgent!!!
  2013-06-03 23:44 [Help] Look for a exist function to car a contact, Urgent!!! Feng Shu
@ 2013-06-04  2:01 ` Nick Dokos
  2013-06-04  3:16   ` Feng Shu
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2013-06-04  2:01 UTC (permalink / raw)
  To: emacs-orgmode

Feng Shu <tumashu@gmail.com> writes:

> How to get the information "test" from:
>
> ((#("test" 0 2 (fontified nil org-category "i-contacts"))
>
> Thanks!

It's missing a couple of closing parens, but assuming that the opening
parens describe the situation correctly, the following should work:

--8<---------------cut here---------------start------------->8---
(setq s '((#("test" 0 2 (fontified nil org-category "i-contacts")))))
(substring-no-properties (caar s))
--8<---------------cut here---------------end--------------->8---

The caar gets to the string-with-properties and the
substring-no-properties gets the string, discarding the properties.

-- 
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Help] Look for a exist function to car a contact, Urgent!!!
  2013-06-04  2:01 ` Nick Dokos
@ 2013-06-04  3:16   ` Feng Shu
  0 siblings, 0 replies; 3+ messages in thread
From: Feng Shu @ 2013-06-04  3:16 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Feng Shu <tumashu@gmail.com> writes:
>
>> How to get the information "test" from:
>>
>> ((#("test" 0 2 (fontified nil org-category "i-contacts"))
>>
>> Thanks!
>
> It's missing a couple of closing parens, but assuming that the opening
> parens describe the situation correctly, the following should work:
> --8<---------------cut here---------------start------------->8---
> (setq s '((#("test" 0 2 (fontified nil org-category "i-contacts")))))
> (substring-no-properties (caar s))
> --8<---------------cut here---------------end--------------->8---

Thanks!
>
> The caar gets to the string-with-properties and the
> substring-no-properties gets the string, discarding the properties.

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-04  3:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 23:44 [Help] Look for a exist function to car a contact, Urgent!!! Feng Shu
2013-06-04  2:01 ` Nick Dokos
2013-06-04  3:16   ` Feng Shu

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).