Subject: 27.0.50; Positioning of mouse-set-point with display-line-numbers in buffers with TABs
From: Bruce Stephens <[email-masked]>
To: [email-masked]
Date: Wed, 14 Mar 2018 12:14:26 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

In a buffer containing something like the following:
	0123456789
	0123456789
	0123456789
	0123456789

with display-line-numbers set to t, when I point and click on the first
0 point (and the cursor) is set to that (as expected). When I cliek on
the 0 in the second line, point ends up on the 8. When I do the same for
subsequent 0's, point is on the 4 of each line.

If I revert 1ac190553886ff20817d3dd218464e2fc6f9e42a, "Fix display of
TABs in hscrolled windows with line numbers" I get the expected
behaviour (point being at the place where I click).

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.28)
 of 2018-03-14, modified by Debian built on tinier
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid

Recent messages:
Loading /local/brs/.emacs-snapshot...done
Starting Emacs daemon.
frame
frame is x
When done with this frame, type C-x 5 0
<down-mouse-1> at that spot runs the command mouse-drag-region
<mouse-1> at that spot runs the command mouse-set-point
Quit
Composing main Info directory...done
Making completion list...

Configured using:
 'configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info/emacs-snapshot
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/27.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.0.50/site-lisp:/usr/share/emacs/site-lisp
 --with-crt-dir=/usr/lib/x86_64-linux-gnu/ --with-wide-int --with-x=yes
 --with-x-toolkit=gtk3 --with-imagemagick=yes 'CFLAGS=-DDEBIAN
 -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  show-paren-mode: t
  async-bytecomp-package-mode: t
  gud-tooltip-mode: t
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/local/brs/elisp/prop hides /local/brs/elisp/graph/prop
/local/brs/elisp/graph/pqueue hides /local/brs/elisp/graph/graph/pqueue
/local/brs/elisp/graph/graph hides /local/brs/elisp/graph/graph/graph
/local/brs/elisp/anything-config/anything hides /local/brs/elisp/anything-config/doc/auto/anything
/local/brs/elisp/jdee/jde/config/build hides /local/brs/elisp/jdee/jde/build/config/build
/local/brs/elisp/jdee/jde/lisp/jde-bug hides /local/brs/elisp/jdee/jde/build/lisp/jde-bug
/local/brs/elisp/jdee/jde/lisp/jde-project-file hides /local/brs/elisp/jdee/jde/build/lisp/jde-project-file
/local/brs/elisp/jdee/jde/lisp/efc hides /local/brs/elisp/jdee/jde/build/lisp/efc
/local/brs/elisp/jdee/jde/lisp/jde-setnu hides /local/brs/elisp/jdee/jde/build/lisp/jde-setnu
/local/brs/elisp/jdee/jde/lisp/jde-junit hides /local/brs/elisp/jdee/jde/build/lisp/jde-junit
/local/brs/elisp/jdee/jde/lisp/jde-gen hides /local/brs/elisp/jdee/jde/build/lisp/jde-gen
/local/brs/elisp/jdee/jde/lisp/jde-xref hides /local/brs/elisp/jdee/jde/build/lisp/jde-xref
/local/brs/elisp/jdee/jde/lisp/jde-javadoc hides /local/brs/elisp/jdee/jde/build/lisp/jde-javadoc
/local/brs/elisp/jdee/jde/lisp/jde-xemacs hides /local/brs/elisp/jdee/jde/build/lisp/jde-xemacs
/local/brs/elisp/jdee/jde/lisp/jde-widgets hides /local/brs/elisp/jdee/jde/build/lisp/jde-widgets
/local/brs/elisp/jdee/jde/lisp/jde-db hides /local/brs/elisp/jdee/jde/build/lisp/jde-db
/local/brs/elisp/jdee/jde/lisp/jde-class hides /local/brs/elisp/jdee/jde/build/lisp/jde-class
/local/brs/elisp/jdee/jde/lisp/jde-open-source hides /local/brs/elisp/jdee/jde/build/lisp/jde-open-source
/local/brs/elisp/jdee/jde/lisp/jde-plugins hides /local/brs/elisp/jdee/jde/build/lisp/jde-plugins
/local/brs/elisp/jdee/jde/lisp/jde-sregex hides /local/brs/elisp/jdee/jde/build/lisp/jde-sregex
/local/brs/elisp/jdee/jde/lisp/jde-javadoc-gen hides /local/brs/elisp/jdee/jde/build/lisp/jde-javadoc-gen
/local/brs/elisp/jdee/jde/lisp/jde-compat hides /local/brs/elisp/jdee/jde/build/lisp/jde-compat
/local/brs/elisp/jdee/jde/lisp/jde-run hides /local/brs/elisp/jdee/jde/build/lisp/jde-run
/local/brs/elisp/jdee/jde/lisp/jde-parse hides /local/brs/elisp/jdee/jde/build/lisp/jde-parse
/local/brs/elisp/jdee/jde/lisp/jde-package hides /local/brs/elisp/jdee/jde/build/lisp/jde-package
/local/brs/elisp/jdee/jde/lisp/regress hides /local/brs/elisp/jdee/jde/build/lisp/regress
/local/brs/elisp/jdee/jde/lisp/jde-java-font-lock hides /local/brs/elisp/jdee/jde/build/lisp/jde-java-font-lock
/local/brs/elisp/jdee/jde/lisp/jde-complete hides /local/brs/elisp/jdee/jde/build/lisp/jde-complete
/local/brs/elisp/jdee/jde/lisp/jde-imenu hides /local/brs/elisp/jdee/jde/build/lisp/jde-imenu
/local/brs/elisp/jdee/jde/lisp/beanshell hides /local/brs/elisp/jdee/jde/build/lisp/beanshell
/local/brs/elisp/jdee/jde/lisp/jcomplete hides /local/brs/elisp/jdee/jde/build/lisp/jcomplete
/local/brs/elisp/jdee/jde/lisp/jde-java-grammar hides /local/brs/elisp/jdee/jde/build/lisp/jde-java-grammar
/local/brs/elisp/jdee/jde/lisp/jde-dbo hides /local/brs/elisp/jdee/jde/build/lisp/jde-dbo
/local/brs/elisp/jdee/jde/lisp/setnu hides /local/brs/elisp/jdee/jde/build/lisp/setnu
/local/brs/elisp/jdee/jde/lisp/jde-juci hides /local/brs/elisp/jdee/jde/build/lisp/jde-juci
/local/brs/elisp/jdee/jde/lisp/jde-jdb hides /local/brs/elisp/jdee/jde/build/lisp/jde-jdb
/local/brs/elisp/jdee/jde/lisp/jde-checkstyle hides /local/brs/elisp/jdee/jde/build/lisp/jde-checkstyle
/local/brs/elisp/jdee/jde/lisp/jde-annotations hides /local/brs/elisp/jdee/jde/build/lisp/jde-annotations
/local/brs/elisp/jdee/jde/lisp/efc-xemacs hides /local/brs/elisp/jdee/jde/build/lisp/efc-xemacs
/local/brs/elisp/jdee/jde/lisp/jde-compile hides /local/brs/elisp/jdee/jde/build/lisp/jde-compile
/local/brs/elisp/jdee/jde/lisp/jde hides /local/brs/elisp/jdee/jde/build/lisp/jde
/local/brs/elisp/jdee/jde/lisp/jde-stat hides /local/brs/elisp/jdee/jde/build/lisp/jde-stat
/local/brs/elisp/jdee/jde/lisp/jde-which-method hides /local/brs/elisp/jdee/jde/build/lisp/jde-which-method
/local/brs/elisp/jdee/jde/lisp/which hides /local/brs/elisp/jdee/jde/build/lisp/which
/local/brs/elisp/jdee/jde/lisp/jde-tree-widget hides /local/brs/elisp/jdee/jde/build/lisp/jde-tree-widget
/local/brs/elisp/jdee/jde/lisp/jde-util hides /local/brs/elisp/jdee/jde/build/lisp/jde-util
/local/brs/elisp/jdee/jde/lisp/jde-custom hides /local/brs/elisp/jdee/jde/build/lisp/jde-custom
/local/brs/elisp/jdee/jde/lisp/jde-ejb hides /local/brs/elisp/jdee/jde/build/lisp/jde-ejb
/local/brs/elisp/jdee/jde/lisp/jde-dbs hides /local/brs/elisp/jdee/jde/build/lisp/jde-dbs
/local/brs/elisp/jdee/jde/lisp/jde-wiz hides /local/brs/elisp/jdee/jde/build/lisp/jde-wiz
/local/brs/elisp/jdee/jde/lisp/jde-project hides /local/brs/elisp/jdee/jde/build/lisp/jde-project
/local/brs/elisp/jdee/jde/lisp/jde-make hides /local/brs/elisp/jdee/jde/build/lisp/jde-make
/local/brs/elisp/jdee/jde/lisp/jde-ant hides /local/brs/elisp/jdee/jde/build/lisp/jde-ant
/local/brs/elisp/jdee/jde/lisp/jde-import hides /local/brs/elisp/jdee/jde/build/lisp/jde-import
/local/brs/elisp/jdee/jde/lisp/jde-parse-class hides /local/brs/elisp/jdee/jde/build/lisp/jde-parse-class
/local/brs/elisp/jdee/jde/lisp/jde-help hides /local/brs/elisp/jdee/jde/build/lisp/jde-help
/local/brs/elisp/undo-tree/undo-tree hides /local/brs/.emacs.d/elpa/undo-tree-20170706.246/undo-tree
/local/brs/elisp/yasnippet/yasnippet hides /local/brs/.emacs.d/elpa/yasnippet-20180310.1614/yasnippet
/usr/share/emacs/27.0.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs-snapshot/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/local/brs/.emacs.d/elpa/ninja-mode-20141203.2159/ninja-mode hides /usr/share/emacs/site-lisp/ninja-mode
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-pilot-jwz hides /usr/share/emacs/site-lisp/bbdb/bbdb-pilot-jwz
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-customize hides /usr/share/emacs/site-lisp/haskell-mode/haskell-customize
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-mode-pkg hides /usr/share/emacs/site-lisp/haskell-mode/haskell-mode-pkg
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-presentation-mode hides /usr/share/emacs/site-lisp/haskell-mode/haskell-presentation-mode
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indent
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-sort-imports hides /usr/share/emacs/site-lisp/haskell-mode/haskell-sort-imports
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-unicode-input-method hides /usr/share/emacs/site-lisp/haskell-mode/haskell-unicode-input-method
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-session hides /usr/share/emacs/site-lisp/haskell-mode/haskell-session
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-commands hides /usr/share/emacs/site-lisp/haskell-mode/haskell-commands
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-load hides /usr/share/emacs/site-lisp/haskell-mode/haskell-load
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-modules hides /usr/share/emacs/site-lisp/haskell-mode/haskell-modules
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-lexeme hides /usr/share/emacs/site-lisp/haskell-mode/haskell-lexeme
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-c2hs hides /usr/share/emacs/site-lisp/haskell-mode/haskell-c2hs
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell hides /usr/share/emacs/site-lisp/haskell-mode/haskell
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-align-imports hides /usr/share/emacs/site-lisp/haskell-mode/haskell-align-imports
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-utils hides /usr/share/emacs/site-lisp/haskell-mode/haskell-utils
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-mode hides /usr/share/emacs/site-lisp/haskell-mode/haskell-mode
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-menu hides /usr/share/emacs/site-lisp/haskell-mode/haskell-menu
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-string hides /usr/share/emacs/site-lisp/haskell-mode/haskell-string
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-mode-autoloads hides /usr/share/emacs/site-lisp/haskell-mode/haskell-mode-autoloads
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-hoogle hides /usr/share/emacs/site-lisp/haskell-mode/haskell-hoogle
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-debug hides /usr/share/emacs/site-lisp/haskell-mode/haskell-debug
/usr/share/emacs-snapshot/site-lisp/haskell-mode/ghc-core hides /usr/share/emacs/site-lisp/haskell-mode/ghc-core
/usr/share/emacs-snapshot/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/site-lisp/haskell-mode/inf-haskell
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-repl hides /usr/share/emacs/site-lisp/haskell-mode/haskell-repl
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-collapse hides /usr/share/emacs/site-lisp/haskell-mode/haskell-collapse
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-complete-module hides /usr/share/emacs/site-lisp/haskell-mode/haskell-complete-module
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal
/usr/share/emacs-snapshot/site-lisp/haskell-mode/highlight-uses-mode hides /usr/share/emacs/site-lisp/haskell-mode/highlight-uses-mode
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/site-lisp/haskell-mode/haskell-doc
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-compat hides /usr/share/emacs/site-lisp/haskell-mode/haskell-compat
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-completions hides /usr/share/emacs/site-lisp/haskell-mode/haskell-completions
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-ghc-support hides /usr/share/emacs/site-lisp/haskell-mode/haskell-ghc-support
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-process hides /usr/share/emacs/site-lisp/haskell-mode/haskell-process
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-move-nested hides /usr/share/emacs/site-lisp/haskell-mode/haskell-move-nested
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-navigate-imports hides /usr/share/emacs/site-lisp/haskell-mode/haskell-navigate-imports
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-interactive-mode hides /usr/share/emacs/site-lisp/haskell-mode/haskell-interactive-mode
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-compile hides /usr/share/emacs/site-lisp/haskell-mode/haskell-compile
/usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-sandbox hides /usr/share/emacs/site-lisp/haskell-mode/haskell-sandbox
/usr/share/emacs-snapshot/site-lisp/haskell-mode/w3m-haddock hides /usr/share/emacs/site-lisp/haskell-mode/w3m-haddock
/usr/share/emacs-snapshot/site-lisp/haskell-mode/ghci-script-mode hides /usr/share/emacs/site-lisp/haskell-mode/ghci-script-mode
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-gnus hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-gnus
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-vm hides /usr/share/emacs/site-lisp/bbdb/lisp/bbdb-vm
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-415-510 hides /usr/share/emacs/site-lisp/bbdb/utils/bbdb-415-510
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-to-netscape hides /usr/share/emacs/site-lisp/bbdb/utils/bbdb-to-netscape
/usr/share/emacs/27.0.50/site-lisp/bbdb/bbdb-213-310 hides /usr/share/emacs/site-lisp/bbdb/utils/bbdb-213-310
/local/brs/elisp/multiple-cursors/features/support/env hides /usr/share/emacs/27.0.50/lisp/env
/usr/share/emacs/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/27.0.50/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/27.0.50/lisp/textmodes/rst
/usr/share/emacs/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/27.0.50/lisp/textmodes/ispell
/local/brs/elisp/multiple-cursors/util/ert hides /usr/share/emacs/27.0.50/lisp/emacs-lisp/ert

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa derived
epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils browse-url jka-compr
perl6-detect elec-pair scala-mode-feature scala-mode-ui
scala-mode-fontlock scala-mode-indent scala-mode-navigation
scala-mode-lib scala-mode-variables scala-mode-constants scala-mode
time-date paren magit-autorevert autorevert filenotify magit-git
magit-section magit-utils crm magit-popup async-bytecomp async gud
cus-start cus-load color-theme-buffer-local color-theme wid-edit server
edmacro kmacro ibuffer-git ibuffer ibuffer-loaddefs vc-git diff-git
diff-mode ws-butler lsp-ui lsp-ui-doc markdown-mode color thingatpt
noutline outline easy-mmode dash-functional lsp-ui-imenu lsp-imenu
lsp-ui-flycheck lsp-ui-peek lsp-ui-sideline flycheck cl-extra find-func
help-mode cquery cquery-member-hierarchy cquery-inheritance-hierarchy
cquery-call-hierarchy cquery-tree cquery-code-lens
cquery-semantic-highlighting cquery-common dash lsp-mode network-stream
puny nsm rmc starttls tls gnutls lsp-methods inline lsp-io pcase
lsp-notifications lsp-common url-util subr-x xref project cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs vc-filewise python tramp-sh tramp trampver tramp-compat
tramp-loaddefs ucs-normalize parse-time format-spec advice shell
pcomplete grep compile comint ansi-color ring imenu dired-x dired
dired-loaddefs debug cl haskell-mode-autoloads devhelp mule-util
finder-inf diff-git-autoloads dired-isearch-autoloads rx info package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 483676 15110)
 (symbols 48 36536 2)
 (miscs 40 139 293)
 (strings 32 96070 9237)
 (string-bytes 1 2751658)
 (vectors 16 57647)
 (vector-slots 8 967353 12990)
 (floats 8 382 129)
 (intervals 56 4731 0)
 (buffers 992 15))