3

i want to let dired show the duration of multimedia files as a column inside the dired buffer detail view.

Is it possible? Any third-party extensions for dired?

Currently i use exiftool -T -ImageSize -XResolution -YResolution -VideoFrameRate -AvgBitRate -Duration as shell command run on marked files. But this produce only output. I don't know how to insert this result as columns.

0

My short answer is no. Depending on what you really want, it's not possible - not without more or less redesigning Dired. Dired is essentially about ls listings.

But you might try setting variable insert-directory-program to a program that produces the kind of listing you want - that should be possible. But you might not then be able to use some Dired features. Worth a try anyway.

And you might find some Dired 3rd-party library that tries to add additional, arbitrary columns, so you could make use of that. Perhaps someone else will let you know here about such a library.

| improve this answer | |
0

You could see how image-dired-dired-toggle-marked-thumbs uses dired-map-over-marks to iterate over files in dired, runs a shell command on every file, and puts the result on the overlay next to the file name. In your case the overlay could display the result of your command as text, e.g. "12:34".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.