Dired Html Move Like W Thirty Two (original) (raw)

Introduction

I’m a newbie to emacs and am beginning to use it full-time on W32.

One W32 feature is that whenever a file foo.htm is saved (in IE or Firefox) a directory called foo_files is created where associated css, images, javascript etc. files are stored. W32’s File Explorer automatically moves and deletes these *_files directories when you perform operations on the htm file.

This is not an emacs feature so much as it is a small band-aid to get emacs to do the same. So far, this was only integrated into the move function in dired, and it’s quite kludgey.

Hopefully some guru will suggest a better way to do it.

Install instruction steps

Steps (and code)


Conclusion

And that’s it. Now opening a dired buffer, selecting some htm files with ‘m’ and then typing ‘R’ for rename will take a while, but it will select the corresponding directory for renaming (aka moving) too.

It was fun discovering a way to do this, and I hope it’s possible to integrate it into all operations on htm files. Emacs rocks!

Caveats

Comments

This section is for suggestions, comments and improvements. Please add your [username] before your comment so that they’ll be threaded. There’s got to be a way to make this less kludgey..

NooBoo If the directory is not visible then it doesn’t get selected. Also it selects all directories starting with GoogleGroups, for instance, even though I select only one of those files. This is related to the caveat above.