From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Can I get match count? Date: Tue, 26 Apr 2011 22:50:20 -0400 Message-ID: <87fwp4qufn.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEupa-0006Po-Vu for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 22:50:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEupZ-0005d3-Pk for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 22:50:22 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:49271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEupZ-0005cz-No for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 22:50:21 -0400 In-Reply-To: (Osamu OKANO's message of "Mon, 25 Apr 2011 23:43:07 +0900") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Osamu OKANO Cc: org-mode Osamu OKANO writes: > I' like to know a count of search results. > (message > "You have %s habits which are out of date." > (org-agenda-match-count > (tags-todo "STYLE=\"habit\"+SCHEDULED<=\"\""))) > Is there any way? > You could use org-map-entries to count the number of occurrences: (length (org-map-entries t "STYLE=\"habit\"+SCHEDULED<=\"\"" 'agenda)) Best, Matt