help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Several emacs instances / dired and "derived" buffers


From: Kevin Rodgers
Subject: Re: [Q] Several emacs instances / dired and "derived" buffers
Date: Mon, 21 Jun 2004 09:13:34 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Michael Schierl wrote:
> Kevin Rodgers <ihs_4664@yahoo.com> writes:
>>   (mapc (lambda (buf)
>>          (let ((file (buffer-file-name buf)))
>>            (when (and file
>> (equal (file-name-directory file) dir))
>>              (kill-buffer buf))))
>>        (buffer-list))
>
> That one only closes all files *in* a directory and not *below* a
> directory. If you specify to close all files below "/foo/bar", a file
> like "/foo/bar/src/package/subpackage/blah/Classname.java" will
> not be closed as well.

Change (equal (file-name-directory file) dir) to
(string-match (concat "^" (regexp-quote (file-name-directory))) dir)

--
Kevin Rodgers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]