3

I have downloaded and put the dired+.el file into

/Users/ri/.emacs.d/elisp

and added the following code to the init file

(add-to-list 'load-path "/Users/ri/.emacs.d/elisp")
(require 'dired+)

When I start Emacs there are no errors, everything loads as it should. But whenever I try to run

M-x diredp-dired-for-files 

it asks me for a buffer name and I type something like new and then it loads what it looks like regular Dired. When I C-g, the system prints in the minibuffer

Reading buffer: No such file or directory, /Users/ri/new

How can I run Dired+ properly?

EDIT (after reading the answers here and reading up on Dired and Dired+)

(the original question was "How to run Dired+?")

My original thinking was that Dired+ was another program, basically like PathFinder to MacOS built-in Finder. That's why I thought I needed to launch it, and the most "obvious" command seemed to be M-x diredp-dired-for-files Now I see that this is an "extension" to Dired that enhances its features. So i guess the proper question that I wanted to ask is:

How to make sure I'm running Dired+?

Is there a command or a feature that tells me that I successfully loaded and using Dired+?

For example when I run Sunrise Commander, the interface is completely different so it visually tells me that the extension is running.

2 Answers 2

5

Just to clarify with Drew's answer, you are already "running" dired+ with (require 'dired+). When you do C-x d (return), or M-x dired, dired+ is loaded with dired. If you want to check to make sure do M-x dired return then C-h m. On the top it should say [Dired+ help on the web].

Dired+ is meant to be an extension to dired full of custom commands, such as diredp-do-grep-recursive or the command you listed. A lot of Drew's package also have great menubar support, including dired+, and is extremely useful to explore and find out new commands without having to read the manual. So in dired perhaps click on multiple, or regexp to see the options you have.

4
  • When I run C-h m from Dired, I get a "Minor mode help page" (???). It lists enabled minor modes and then describes various customisation settings.
    – ruslaniv
    Mar 27, 2018 at 18:18
  • That's correct, on the page if you search (C-s) for "diredp" do you get any results?
    – Greth
    Mar 28, 2018 at 20:54
  • I get: "Failing I-search: diredp"
    – ruslaniv
    Apr 2, 2018 at 12:59
  • The last OP comment indicates that Dired+ is not being used. To be sure that you are not just in a Dired buffer that was created before you loaded Dired+, do C-x 4 d for some other directory, and then check C-h m there. You can also look at the menu-bar, to see if you see menus Dir, Marks, etc. instead of Subdir, Mark, etc. If you continue to have trouble, try starting with emacs -Q (no init file) and then loading Dired+; possibly something in your init file is interfering.
    – Drew
    Apr 2, 2018 at 13:46
4

Try to provide a more step-by-step recipe, saying, for each step, what you did and what you saw, as well as what you expected to see.

C-h f diredp-dired-for-files tells you:

diredp-dired-for-files is an interactive compiled Lisp function in dired+.el.

It is bound to menu-bar subdir diredp-dired-for-files, C-x D F.

(diredp-dired-for-files ARG &optional SWITCHES)

Dired file names that you enter, in a Dired buffer that you name.

You are prompted for the name of the Dired buffer to use.

You are then prompted for names of files and directories to list, which can be located anywhere. Use C-g when you are done.

With a prefix arg you are first prompted for the ls switches to use.

See also dired (including the advice).

In other words, this is not your ordinary Dired listing - it is not a listing of a directory. So answering about this command does not tell you "How to run Dired+", which is anyway too vague/broad a question.

This command shows you a Dired buffer that lists an arbitrary set of files - it "direds" those files, which each can be anywhere at all on your file system.

  1. You are first prompted for the name of the Dired buffer.

  2. Next, you are prompted for the names of the files to list in the buffer. You enter the file names one by one.

  3. You continue to be prompted for file names until you use C-g to say that you are done. At that point, the Dired buffer listing those files is displayed.

(Why might someone want to use this command? To take advantage of Dired features with an arbitrary set of files.)

If this is really the command that you want to use and ask about, please try it again. If you run into a problem or question, update your question here with more detail about each action you took and each effect you saw, as mentioned above.

4
  • Thank you for a very detailed answer. Never thought of C-h f diredp-dired-for-files, sorry). I edited my question.
    – ruslaniv
    Mar 27, 2018 at 18:04
  • And when I just run M-x dired, I get a list of folders with Dired (directory): ~/ [37] line at the top.
    – ruslaniv
    Mar 27, 2018 at 18:13
  • Just what are you asking about in your last comment? (Maybe post another question?) Where and when are you seeing that message?
    – Drew
    Mar 28, 2018 at 1:23
  • No, that was not a question, I was just saying that I see that Dired is running, that there are no problem running Dired per se.
    – ruslaniv
    Apr 2, 2018 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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