From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: lisp question Date: Thu, 04 Aug 2011 10:22:07 +0530 Message-ID: <814o1x4w3s.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312433557 13551 80.91.229.12 (4 Aug 2011 04:52:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2011 04:52:37 +0000 (UTC) Cc: Emacs mailing list To: suvayu ali Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 04 06:52:33 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qopv7-00028G-4T for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Aug 2011 06:52:33 +0200 Original-Received: from localhost ([::1]:59752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qopv6-00063D-7m for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Aug 2011 00:52:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qopv1-000633-IK for help-gnu-emacs@gnu.org; Thu, 04 Aug 2011 00:52:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qopv0-0007D2-Nw for help-gnu-emacs@gnu.org; Thu, 04 Aug 2011 00:52:27 -0400 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:59111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qopv0-0007Cy-KS for help-gnu-emacs@gnu.org; Thu, 04 Aug 2011 00:52:26 -0400 Original-Received: by qyk32 with SMTP id 32so3307805qyk.0 for ; Wed, 03 Aug 2011 21:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=5FJMpJA9OpjZPHzy7MFuLE5DTxWkj8HUEPp6Hw+aR0Q=; b=eHTtmwBsC9lHyJCh0ulgUU/XgtmCjcSt7wcfb55poyUvDCBHeC1niAAH10HL9NNGBr +lLj8f2S0cO1ys9isrHTvCEULe3vC10nOMwKuVzOJ0pp9HSGT9yuWPvo4cLlBwasHxsp CRve6HUp4lHeIEBTQgVYAdvUea+mFYOMCLZaM= Original-Received: by 10.142.196.18 with SMTP id t18mr375449wff.152.1312433545640; Wed, 03 Aug 2011 21:52:25 -0700 (PDT) Original-Received: from JAMBU-NETBOOK ([115.184.34.222]) by mx.google.com with ESMTPS id v1sm1772612pbg.79.2011.08.03.21.52.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Aug 2011 21:52:24 -0700 (PDT) In-Reply-To: (suvayu ali's message of "Thu, 4 Aug 2011 04:25:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81866 Archived-At: 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. --