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

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

Is there a way to close all buffers whose files have gone a way


From: Steinar Bang
Subject: Is there a way to close all buffers whose files have gone a way
Date: Fri, 12 Aug 2022 20:37:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

I have a lot of Java projects built with maven.

The typical maven invocation is "mvn clean install"

Here "clean" will remove the target/ subdirectory, where all build
artifacts are put, and "install" will do the build, including tests and
put all final and immediate files into the target/ directory, or a
subdirectory of target.

In my builds I have a lot of pax exam tests, loading stuff into apache
karaf, and I would like to take a look at the karaf.log files from the
tests.

That log file from a test is put into the
 target/exam/<somehash>/data/log/karaf.log

Each test run gets a different has in place of "<somehash>".

So I end up with a lot of karaf.log files, that no longer has an
underlying file (the next "mvn clean" will delete the target directory
and all subdirectories).

And I would like to drop these karaf.log files with a minimum of
effort. 

Is it possible to make emacs delete all buffers that no longer have an
underlying file?

Thanks!


- Steinar

PS I know about 'M-x kill-matching-buffers', it's what I use today. I'm
   looking for something simpler,
   "M-x flush-all-buffers-loaded-from-file-that-no-longer-has-a-file"



reply via email to

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