3

When dired moves up a directory, in the new buffer, the cursor will be positioned on the directory from where it originated.

However, the other way around is not supported by default: upon returning to a subdirectory, the cursor will be placed on the first line of the dired list regardless of the file or directory that had been most recently visited in this subdirectory. This behaviour can be confusing when quickly switching between dired buffers.

Is it possible to make dired act in the intended way when entering a subdirectory?

3

If you use Dired+ then you get the behavior you are looking for.

^ takes you to the parent directory. Hitting RET on the subdir line in that buffer takes you back to the subdir (Dired) buffer, and point is where you left it, there.

In addition, after it inserts a subdir listing, i flips back and forth between that listing and the subdir's line in the parent listing.

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.