0

I have in the past been using

(require 'dired)
(require 'dired-x)

quite happily. Recently I've been even happier after switching to

(require 'dired)
(require 'dired-x)
(require 'dired+)
(require 'icicles)

except for two issues:

  1. I was formerly able to copy the current directory by moving the cursor to the top of the buffer and pressing 'w' (for subsequent yanking/pasting somewhere else). Now that top line (the current directory) is off-limit. How do I recover copying the current buffer in dired+/icicles? (The C-0 w trick no longer works.)
  2. While navigating up in a directory chain, I found easier to type 'q' (M-x quit) rather than '^' (M-x diredp-up-directory). 'q' still brings back the parent directory, but drops the cursor to the bottom of the buffer, which makes it a lot less easy to navigate a directory chain. Even if '^' is more correct, and before I simply change the assignment of 'q', I'm seeking some understanding of what's happening. Why does quitting in dired+ move a dired buffer's cursor? Is it perhaps the case that the sequence of dired/dired-x/dired+/icicles introduces an incompatibility?

1 Answer 1

0
  1. You should pose separate emacs.SE questions for separate questions.

  2. Please provide a step-by-step recipe to repro the problem(s), starting from emacs -Q (no init file). Simplify the recipe by removing anything unnecessary to repro it. E.g., is loading Icicles necessary to repro the problem? Is turning on icicle-mode necessary to it?

  3. Loading just dired+.el with emacs -Q I don't see either problem you cite. (I also don't see either problem with Icicles loaded and icicle-mode turned on.)

    • What do you mean by the "top line (the current directory) is off-limit"? I can put the cursor on the top line and use w to copy the directory name, and I can use C-o w to copy it.

    • I don't see the q problem you cite either. For me, q returns to the previous buffer, as usual.

      q is not bound in dired-mode-map (by vanilla Dired or by Dired+). It is bound to whatever you usually have it bound to. For me, in emacs -Q it is quit-window.

      If the previous buffer was the Dired buffer for the parent directory then q in the subdir buffer returns to that parent buffer, without changing the cursor position in it. E.g., if the cursor was on the line for that subdirectory then it returns to that position when you hit q in the Dired buffer for that subdir.

  4. If you don't see the problems when you start Emacs using emacs -Q (no init file) then bisect your init file to find the culprit. You can use command comment-region to comment out or uncomment a selection of text. Comment out 1/2 of your init file to see which half the problem is in, then 3/4, 7/8, etc. This is a binary search, which is quick. But you do have to relaunch Emacs each time.

2
  • You're right. I didn't isolate a MWE-equivalent, a brief .emacs that exhibits the two problems. From what you wrote I am now worried the two issues are indeed a result of an interaction with elements in what is now a very long .emacs.
    – Calaf
    Sep 11, 2018 at 16:32
  • See my answer update - bisect your init file to find the culprit.
    – Drew
    Sep 11, 2018 at 17:35

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.