all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: Number of open buffers?
Date: 21 Nov 2003 00:40:25 +0100	[thread overview]
Message-ID: <x5n0aqip7a.fsf@lola.goethe.zz> (raw)
In-Reply-To: ?fnord?u3cci64ko.fsf@ID-97657.usr.dfncis.de

lawrence mitchell <wence@gmx.li> writes:

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

I was looking for something like that, but the delq escaped me.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2003-11-20 23:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bpilkc$pq1$0@pita.alt.net>
2003-11-20 16:19 ` Number of open buffers? Eli Zaretskii
     [not found] ` <mailman.342.1069348789.399.help-gnu-emacs@gnu.org>
     [not found]   ` <bpirf4$8ee$2@pita.alt.net>
2003-11-20 18:10     ` Micah Cowan
     [not found]       ` <bpja4e$89m$1@pita.alt.net>
2003-11-20 21:15         ` David Kastrup
2003-11-20 21:50           ` lawrence mitchell
2003-11-20 22:14             ` David Kastrup
2003-11-20 22:46               ` lawrence mitchell
2003-11-20 23:40                 ` David Kastrup [this message]
2003-11-20 22:42           ` Johan Bockgård
2003-11-20 21:43         ` Lucas
     [not found]         ` <mailman.369.1069368465.399.help-gnu-emacs@gnu.org>
     [not found]           ` <bplam3$nrj$1@pita.alt.net>
2003-11-21 15:36             ` David Kastrup
2003-11-21 15:52           ` Stefan Monnier
2003-11-21 20:21             ` Lucas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5n0aqip7a.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.