4

When visiting a directory: In the view that comes up, I want the file/directory names to be in the left-most column. How can I do that?

  • This is not entirely clear: by default find-file will prompt you to choose a file but there is no view with columns. Are you perhaps asking about the directory listing you get after using C-x C-f to open a directory? That would be a question about dired. – glucas Dec 8 '17 at 16:10
  • you are correct, i am asking about the directory listing that comes up – Kirill Yunussov Dec 8 '17 at 16:24
  • OK, I've revised the question and tags a bit to make that clear. I've offered my own answer but perhaps others will have some suggestions on getting the display you want. – glucas Dec 8 '17 at 16:27
  • 1
    Please make clear in the question that you do not care whether any other columns are shown, besides the file name. There is a big difference between showing only file names and rearranging the column order. Emacs provides the first but not the second. – Drew Dec 8 '17 at 18:46
8

Assuming this question is about dired (the Emacs directory editor mode), there is no simple built-in way to rearrange the columns. Dired is presenting the output of an ls command so you can customize dired-listing-switches if there are ls output options that you prefer.

You can also switch to a very simple dired view by using the key ( in a dired buffer -- this is bound by default to the command dired-hide-details-mode, which will drop all the columns and just show the file names.

Beyond that I believe you would need to look for an optional package or write some elisp yourself to build a custom directory view.

You can learn more about Dired in the Emacs manual (online, or use C-h i to browse the manuals in Emacs itself.)

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.