Strange behavior using dired and :ui tabs

What happened?

Dired buffers are closed when left-clikning on the corresponding tab.

What did you expect to happen?

Select the clicked tab and not close it.

Steps to reproduce

  1. Open some dired buffers
  2. Click on one of the opened tabs corresponding to those dired buffers
  3. The clicked tab is closed

System information


Loading data dump...

Anyone observes this behavior ? Just do a fresh doom install again with emacs 28.1, and it looks like it’s still there.

Have a nice day. Thanks.

Were you able to resolve this?

Are you saying with a fresh install you experienced the same issue?

It’s possible the package dired-hacks you had installed is causing this behavior.

Okay, I think I kind of figured it out.

I don’t understand any of it but it seems to be related to several things.

Basically, the built-in package mouse.el has a variable that decides what to do if you click on a link.

How it decides if the thing you’re clicking on is a link, and what it does with that information is more complicated.

Also, it depends on if you’re making a long press or a short press.

It’s too much for my tired brain to try and understand right now.

I can tell you this though:

If you add this bit of code to your config.el you will be able to switch buffers by clicking on their tab while using dired.

(setq mouse-1-click-follows link -450)

If you click on a tab it will switch to that buffer. If you click and hold it will close that buffer.

2 Likes

Many thanks @comuserFrud for your help. I tried without dired-hack, same behavior for me.

It seems that (setq mouse-1-click-follows link -450) does solve my issue.

Thank you very much for the time taken and very helpful answer :+1:

EDIT: A side effect for me is that it’s not possible after that to visit a file with a mouse click in dired

Thanks for that, I was having the same behavior. Its (setq mouse-1-click-follows-link -450) actually, isn’t it?

1 Like

Yep, you’re right.

I left out the last dash by mistake.