Sample Header Ad - 728x90

Emacs function on set of files

1 vote
1 answer
164 views
Is there a way implemented in Emacs to apply a function on a set of files? (Or, if not, do you know of such an extension?) For example, if you have a project in a directory (say, scripts to compile and run, the source, and an XML database). You want to run this function on all those files, one by one: (defun indent-buffer () "Indent the whole buffer according to indent-region-function." (interactive) (indent-region (point-min) (point-max)) ) What complicates the picture at least to some degree, although certainly not impossible, is that Emacs must be in the correct mode to execute such a function sensibly. The coolest interface would be to use Emacs as a server, and then send the command, and the file list, as arguments. Second best if it could be done in Dired.
Asked by Emanuel Berg (7101 rep)
Nov 11, 2012, 10:07 AM
Last activity: Nov 12, 2012, 11:00 PM