For some reason, when I click a button, be it in the customize buffer or hyperlinks in org documents, it sometimes works, and other times the whole buffer shifts to the left like a single pixel and it sets a mark (it says so in the minibuffer). The button is not clicked in those instances.

Has someone experienced something similar? Is there a way to improve this?

2 points

Do you see the same problem if you start Emacs using emacs -Q (no init file)? If not, bisect your init file to find the culprit.

permalink
report
reply
1 point

Nope! And when I tried with my config the very first click had that issue. It’s very weird tho, I have no idea what could be causing it…

permalink
report
parent
reply
1 point

Bisect your init file. You can use command comment-region comment out 1/2 of it, then 3/4, then 7/8,… till you can see easily what’s causing the problem. This is a binary search, so it narrows things down quickly.

permalink
report
parent
reply
1 point

Ok, I just did. It’s (global-display-line-numbers-mode). Now… why??? It’s odd as hell.

permalink
report
parent
reply
1 point

I don’t know, but it might help to check C-h l to see which sequence of mouse events Emacs is reporting in each case.

permalink
report
reply
1 point

I just tested, it reports that I’m dragging the mouse and setting a region, but it’s weird because if the issue is my clicking being sloppy, when it should happen in emacs with no config as well, and it doesn’t.

      ;; mouse-drag-region
                 ;; mouse-set-region

This is when I click and the button doesn’t get pressed.

   ;; mouse-drag-region
                   ;; Info-mouse-follow-nearest-node

And this is when it does register.

I can never reproduce the issue on emacs without config.

permalink
report
parent
reply
1 point

My guess is that the “drag” detection is a side-effect of this:

the whole buffer shifts to the left like a single pixel

as it’s conceivable that this means the positions of the click and release are “different” even if you didn’t actually move the mouse.

So that maybe explains the end result, but not the actual trigger.

I’m just speculating though.

permalink
report
parent
reply
1 point

I have recorded a video, it’s in the OP.

permalink
report
parent
reply
1 point

Do you have Evil or god-mode or meow or anything remotely similar?

permalink
report
reply
1 point

Nope, vanilla emacs in that respect.

permalink
report
parent
reply
1 point

as you said, display-line-numbers do the shift when the cursor change the quantity of numbers in the line, from 9 to 10, for example, maybe if you use `absolute` can help, or you use can try change a fixed width from the line number, so it cannot change the window size.

Also, you can see this example from modus-theme to help you.

permalink
report
reply

Emacs

!emacs@communick.news

Create post

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for “emacs” and “vi” link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments