help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: lisp question


From: Jambunathan K
Subject: Re: lisp question
Date: Thu, 04 Aug 2011 10:22:07 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Suvayu

> Hi Elisp users,
>
> I was trying to write some simple elisp code to manipulate properties
> from an org-mode entry. I can't figure out what kind of variable is
> returned and how I can extract "somecategory" into a string from it.
>
> (org-get-category (point)) ; evaluating gives me the output below
> #("somecategory" 0 12 (fontified t font-lock-fontified t face
> org-meta-line org-category "property-test"))

Return value is a text with properties. You can use

(substring-no-properties (org-get-category (point))) 

to get just the text part.

I think you will be better off using the property APIs. You can use
(org-entry-get (point) "CATEGORY")

to extract the desired information.

See "Using the property API" section of the manual.

> Thanks for any guidance.

-- 



reply via email to

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