Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I don't get the behavior you describe. C-u M-x dired RET RET asks about ls flags, but the buffer it creates is not independent: if I kill it, any other dired buffer for the same directory also disappears. You can create indirect buffers but AFAIK, there is a single buffer for any one file or directory, so when that buffer is killed, it disappears from all windows that display it. Commented Dec 9, 2021 at 16:18
  • @NickD, yes, you are correct. I had that wrong. I must have been in a different directory. I will remove that from the question. Commented Dec 9, 2021 at 16:34
  • 1
    Have you looked at indirect buffers? Within emacs, you can get to that section with C-h i g(elisp)indirect buffers. Commented Dec 9, 2021 at 16:43
  • With respect to the notion that "It seems that dired can only have one buffer per directory," perhaps you can programmatically create a new buffer with a different name (but populate the buffer with the same directory as another buffer that already exists). You can set up a simple naming convention that just adds a consecutive number to the name of the buffer containing the same directory as other buffers; e.g., "*foo*", "*foo<01>*", "*foo<02>*". That way, there would be no need for an indirect buffer. [PS: You can programmatically create new windows above, below, left, right.] Commented Dec 9, 2021 at 18:28
  • @lawlist: I don't think that works. I can rename the buffers, but when I kill one, they all go ("all" = two in this case, so I'm extrapolatiing...) Commented Dec 9, 2021 at 19:11