Using elisp, I call this function
(dired "~"), for example, to get to my Home directory in dired mode. When I press
RET on one of the files, I want to capture the file path and store it in a variable instead of opening the file.
In other words, if the function
dired did actually return the file name of the selected file using
RET, I want to do something like this:
(setq file-name (dired "~"))
file-name would be the full path of the file that the user selected and pressed
Just a little clarification of what I wanted to achieve:
Find the function that will get me the file name from
pointin a Dired buffer (The answer to that is what @phils said).
RETto store the file name in a variable (The answer to that was provided by @Drew in the comments of @phils answer).