From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: Number of open buffers? Date: Thu, 20 Nov 2003 22:46:47 +0000 Organization: funfunfun Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069369668 30935 80.91.224.253 (20 Nov 2003 23:07:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2003 23:07:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 00:07:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMxtq-0007xD-00 for ; Fri, 21 Nov 2003 00:07:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMynh-0001Cy-2q for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Nov 2003 19:05:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!vegetable.demon.co.UK!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: vegetable.demon.co.uk (80.177.16.3) Original-X-Trace: news.uni-berlin.de 1069368408 60126170 80.177.16.3 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Cancel-Lock: sha1:eMJ4IgU3V9+4sUlnaThy1LVDmb4= Original-Xref: shelby.stanford.edu gnu.emacs.help:118510 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:14452 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14452 David Kastrup wrote: [...] > Wel, if we want to squeeze characters of source, we can do so without > cl, too. > (defun get-number-of-file-buffers () > (apply '+ (mapcar (lambda(x)(if(buffer-file-name x)1 0)) (buffer-list)))) I see your apply and raise you a: (defun get-number-of-file-buffers () (length (delq nil (mapcar 'buffer-file-name (buffer-list))))) :P -- lawrence mitchell