all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* check to see if a buffer with a certain name exists?
@ 2008-11-13 15:39 Matt Price
  2008-11-13 16:45 ` Drew Adams
  2008-11-13 19:50 ` Nikolaj Schumacher
  0 siblings, 2 replies; 6+ messages in thread
From: Matt Price @ 2008-11-13 15:39 UTC (permalink / raw
  To: help-gnu-emacs

hi folks,

first thanks to everyone who's answered my question about mail, i'm
going to be back to that in a second.  

but in the meantime:  i want to be able to check if there's a buffer
open named *Mutt* .  what's the best way to do this?  in python, for
instance, i would just say:


if "*Mutt*" in buffer-list :
	return true
else :
	return false

in lisp i'm not seeing a quick way to test for something like this.
best i can see right now is to use dolist thus:

(dolist (name (buffer-list) foundit)
  (let ((foundit 0))
    (if (string-match "*scratch*" name)
    (setq foundit 1))
)
)

which isn't quite right, i have a variabletype mismatch.  i'd love some
help -- still having trouble navigating the documentation... thanks
again,
matt




-- 
Matt Price
matt.price@utoronto.ca




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-14 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13 15:39 check to see if a buffer with a certain name exists? Matt Price
2008-11-13 16:45 ` Drew Adams
2008-11-14 15:35   ` Matt Price
2008-11-13 19:50 ` Nikolaj Schumacher
2008-11-13 21:03   ` Ian Eure
2008-11-14 15:38   ` Matt Price

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.