2

My dired output shows some additional information that are cluttering the screen, the first time I visit any directory I get an output like

  drwxr-xr-x 2 user1 user1  4096 Jan  5  2024 dir1
  drwxr-xr-x 3 user1 user1  4096 May 12 15:34 dir2
  ..
//DIRED// 58 59 106 108 155 165 212 219 266 270 317 323 370 395 442 456 503 528 575 597 644 666 713 718 765 768 815 823 870 878 925 928 975 979 1026 1032
//DIRED-OPTIONS// --quoting-style=literal

I was told the DIRED-OPTIONS text comes from the fact that the internal ls that is called by Dired uses the --dired option. But this output should be removed after ls is executed, I guess due to a bug it is not (oddly enough when I refresh the buffer, the additions go away).

I was not able to fix this via config changes, I was thinking I could write an elisp function and run it as dired hook that removes the additions from the dired output. Which hook function do I use for that, are there any templates available? Any pointers would be welcome.

I am using Emacs 29 on Ubuntu 24.

1 Answer 1

2

The culprit turned out to be language-environment settings. Under custom-set-variables if

 '(current-language-environment "Turkish")
 '(default-input-method "turkish-postfix")

is set, the dired output becomes corrupted. If however I set the language env through a function, dired has no problems, eg

(defun turkish-env ()
  (interactive)
  (set-language-environment "turkish")
  (set-input-method "turkish-postfix"))

This is a workaround but it works. I could delete the question but will leave it here so people can find it via search.

Sign up to request clarification or add additional context in comments.

4 Comments

I notice that you have "Turkish" the first time, and "turkish" the second time.
That probably doesn't make a difference, you're right though
The story keeps getting better and better. I filed a bug report to GNU team and received a patch to lisp/files.el from the GNU Emacs maintainer himself! The patched file is here gist.github.com/burakbayramli/6bb385eaf4cb3d76a169b1b87bdb117b it works, for people who don't want to wait for next update can use it.
Nice one. I can see that as bug#78894. I expect the fix will be included in Emacs 30.2.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.