GNU bug report logs - #31966
27.0.50; auto-complete candidates aren't aligned properly

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: John Shahid <jvshahid@HIDDEN>; Keywords: notabug; dated Mon, 25 Jun 2018 17:10:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) notabug. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31966 <at> debbugs.gnu.org:


Received: (at 31966) by debbugs.gnu.org; 25 Jun 2018 17:28:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 25 13:28:13 2018
Received: from localhost ([127.0.0.1]:35144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fXVHg-0000GU-UC
	for submit <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:28:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33401)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fXVHe-0000GH-Rp
 for 31966 <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:28:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fXVHW-00063i-Et
 for 31966 <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:28:05 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43739)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fXVHN-0005x1-Hx; Mon, 25 Jun 2018 13:27:53 -0400
Received: from [176.228.60.248] (port=3627 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fXVHN-0000oM-1I; Mon, 25 Jun 2018 13:27:53 -0400
Date: Mon, 25 Jun 2018 20:27:52 +0300
Message-Id: <83vaa6rd2f.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: John Shahid <jvshahid@HIDDEN>
In-reply-to: <87muvirdy5.fsf@HIDDEN> (message from John Shahid on Mon, 25
 Jun 2018 17:08:50 +0000)
Subject: Re: bug#31966: 27.0.50;
 auto-complete candidates aren't aligned properly
References: <87muvirdy5.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31966
Cc: 31966 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

tags 31966 notabug
thanks

> From: John Shahid <jvshahid@HIDDEN>
> Date: Mon, 25 Jun 2018 17:08:50 +0000
> 
> The candidates in the auto-complete popup aren't aligned properly. The
> left margin appears to be shifted to the right relative to the
> point. This seems to be caused by `vertical-motion' behavior changing on
> master.
> 
> when display-line-numbers is turned on I expect the following to move
> the point to the following line while keeping the point's column fixed
> (assuming of course that the following line is long enough):
> 
>   (vertical-motion (cons (car (posn-col-row (posn-at-point))) 1))
> 
> This isn't the case anymore with current master. Point will move to the
> right by the number of characters used to display the line numbers.

(The emacs-26 branch behaves like master now, btw.)

This is not a bug.  posn-at-point doesn't measure columns, it measures
the X coordinate relative to the window edge, and just expresses it in
columns, so the result includes the width taken by the line-number
display.  If you need to get at the column number relative to the
leftmost text character, use current-column.  And if you want the
result in canonical columns, i.e. in units of width of the frame's
default face's font (as opposed to the font used by buffer text near
point), then subtract from what posn-at-point returns the value
returned by the following function call:

  (line-number-display-width 'columns)

The code you show used to work because there was a bug which masked
this issue, and that bug is now fixed on both master and the emacs-26
branch.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31966; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Jun 2018 17:09:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 25 13:09:07 2018
Received: from localhost ([127.0.0.1]:35131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fXUzD-0008Eq-CT
	for submit <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:09:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50891)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jvshahid@HIDDEN>) id 1fXUzB-0008EL-QC
 for submit <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:09:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jvshahid@HIDDEN>) id 1fXUz5-000340-4S
 for submit <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:09:00 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43653)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jvshahid@HIDDEN>) id 1fXUz5-00033r-1B
 for submit <at> debbugs.gnu.org; Mon, 25 Jun 2018 13:08:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41843)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jvshahid@HIDDEN>) id 1fXUz3-0007m9-2f
 for bug-gnu-emacs@HIDDEN; Mon, 25 Jun 2018 13:08:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jvshahid@HIDDEN>) id 1fXUz0-00031a-At
 for bug-gnu-emacs@HIDDEN; Mon, 25 Jun 2018 13:08:57 -0400
Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:45604)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <jvshahid@HIDDEN>) id 1fXUz0-00031P-47
 for bug-gnu-emacs@HIDDEN; Mon, 25 Jun 2018 13:08:54 -0400
Received: by mail-qt0-x230.google.com with SMTP id i18-v6so12579456qtp.12
 for <bug-gnu-emacs@HIDDEN>; Mon, 25 Jun 2018 10:08:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=DTlH01tjsNCO3JJfpF7JT1qTPFKdXRdJFTzbM3/YhXA=;
 b=ei+T/rUgMzLO9q/ec+ogOgrtAm/VjPUdA+r+la/iNQ0s+3FlJqTHpiB+ZvOq3vSOB7
 EXjflQCCK48HFQOnxrf4WTUPHPqrVmkskvUPn8IaOBljNjmAtAXEfYPY1j37tbERYDsu
 KzDKISh08XVJgPn3PhK+NTpmL6iGtxS8JmNWgwkRuUcS+yKpTQu7T1yLYTXxHAMIe83u
 m4fI4ON5qoBmzrbaV94H0TXk8EaKlNbSnADdCUQ1aA7kFHbd8fHSFgUMgyrglAgrVH77
 fPj8n9Wms1VZ+rFms/L6KA0KklVPuddn3jruT+nGwxJ0Qz87uKX32uU2mv1e91PUNRrW
 bYeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=DTlH01tjsNCO3JJfpF7JT1qTPFKdXRdJFTzbM3/YhXA=;
 b=X/qN2NbP9suauUQ0C/8npRxsJ27TbZjY1A8digP2mg2GR7NYy/Rl/UoIF94kj56sKU
 fl1KV+bynPRQV9LoHFRxxatOZxoNel6zYhT/q0S7Qou+BDEmpNq6OrknZQtEYKSkJbQn
 +26trQLAx6VxhILjDW0elv257bPZER8X1hWf4YA3MVgA4VfFjo7gyS/ashdjWEEMB6uW
 +7WVS8aesKVPDAdVm1Uio9IZGvrZMj4ILEuUkV57+PLUL5gjCxzcBsT01hGh5enZYa2p
 ZZEiV8aBN8/Wy0mNqOTaTWRYcg8RSqEfUJZSH1sfRJFU/9OU08ol7YXG9B3yUioNuAu/
 fNig==
X-Gm-Message-State: APt69E0D2tfRc9tq6XuiCCwtRJKALUtJ+YCrr8EB1Myvja1r5txvGnid
 3FKOpCBOF4R+61oJcVAW6ZXQ3q4J
X-Google-Smtp-Source: ADUXVKKJ5HjRY1GHVXAy13UsONIj6iATL34uBnkonOzKD/Yaahuyy7lxoLD3gZpHi5+5LbFIswZ+6Q==
X-Received: by 2002:ac8:7311:: with SMTP id
 x17-v6mr11760471qto.27.1529946532881; 
 Mon, 25 Jun 2018 10:08:52 -0700 (PDT)
Received: from 146f2c17b146 (cpe-184-152-55-93.nyc.res.rr.com. [184.152.55.93])
 by smtp.gmail.com with ESMTPSA id h23-v6sm9099451qtn.79.2018.06.25.10.08.51
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 25 Jun 2018 10:08:52 -0700 (PDT)
From: John Shahid <jvshahid@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; auto-complete candidates aren't aligned properly
Date: Mon, 25 Jun 2018 17:08:50 +0000
Message-ID: <87muvirdy5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


The candidates in the auto-complete popup aren't aligned properly. The
left margin appears to be shifted to the right relative to the
point. This seems to be caused by `vertical-motion' behavior changing on
master.

when display-line-numbers is turned on I expect the following to move
the point to the following line while keeping the point's column fixed
(assuming of course that the following line is long enough):

  (vertical-motion (cons (car (posn-col-row (posn-at-point))) 1))

This isn't the case anymore with current master. Point will move to the
right by the number of characters used to display the line numbers.


In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu)
 of 2018-06-25 built on 452af4531e9a
Repository revision: 9f6bb1c2d9cac8ccea129242d6977bc848b3f715
System Description: Ubuntu 16.04.4 LTS

Recent messages:
Saving file /home/jvshahid/Maildir/gmail/[Gmail]/Sent Mail/cur/1529945714.3bdcff2f4b643a69.146f2c17b146:2,S...
Wrote /home/jvshahid/Maildir/gmail/[Gmail]/Sent Mail/cur/1529945714.3bdcff2f4b643a69.146f2c17b146:2,S
Sending...done
[mu4e] Message sent
Making completion list...
Quit [3 times]
[mu4e] Found 4 matching messages
Mark set
Quit
Making completion list...

Configured using:
 'configure 'CFLAGS=-O0 -g3' --without-x'

Configured features:
SOUND NOTIFY GNUTLS LIBXML2 ZLIB THREADS

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

Major mode: mu4e:view

Minor modes in effect:
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-auto-complete-mode: t
  global-display-line-numbers-mode: t
  show-paren-mode: t
  display-time-mode: t
  display-battery-mode: t
  global-auto-revert-mode: t
  xterm-mouse-mode: t
  winner-mode: t
  flx-ido-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/jvshahid/.emacs.d/straight/build/go-guru/go-guru hides /home/jvshahid/.emacs.d/straight/build/go-mode/go-guru
/home/jvshahid/.emacs.d/straight/build/go-rename/go-rename hides /home/jvshahid/.emacs.d/straight/build/go-mode/go-rename
/home/jvshahid/.emacs.d/straight/build/seq/seq hides /usr/local/share/emacs/27.0.50/lisp/emacs-lisp/seq
/home/jvshahid/.emacs.d/straight/build/cl-lib/cl-lib hides /usr/local/share/emacs/27.0.50/lisp/emacs-lisp/cl-lib

Features:
(shadow emacsbug magit-extras cl-print bug-reference magit-obsolete
magit-blame magit-stash magit-bisect magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-collab ghub url-http url-gw url-auth
magit-files magit-refs magit-status magit package let-alist url-handlers
magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode magit-core magit-autorevert magit-process magit-margin
magit-mode git-commit recentf tree-widget magit-git magit-section
magit-utils crm magit-popup log-edit pcvs-util add-log with-editor
async-bytecomp async shell vc-git diff-mode cap-words superword subword
yasnippet-snippets yasnippet hideshow imenu ginkgo-mode go-guru
go-rename go-autocomplete go-eldoc go-mode url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
find-file ffap url-parse url-vars etags xref project dired-aux rfc2104
gnutls network-stream nsm mailalias qp mail-extr sort dabbrev eieio-opt
help-fns windmove flyspell ispell face-remap misearch multi-isearch pp
org-mu4e org-element avl-tree generator org org-macro org-footnote
org-pcomplete pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs mu4e desktop frameset mu4e-speedbar speedbar sb-image
ezimage dframe mu4e-main mu4e-view cal-menu calendar cal-loaddefs
browse-url gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap
gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
gnus-win gnus nnheader wid-edit mu4e-headers mu4e-compose mu4e-context
mu4e-draft mu4e-actions rfc2368 smtpmail auth-source eieio eieio-core
eieio-loaddefs sendmail mu4e-mark mu4e-message flow-fill mu4e-proc
mu4e-utils doc-view jka-compr image-mode mu4e-lists mu4e-vars message
rmc puny format-spec rfc822 mml mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader hl-line fringe cl mu4e-meta
pianobar term/screen term/xterm xterm server cl-seq parinfer-ext paredit
parinfer ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff mode-local parinferlib flycheck json map
find-func dash flymake-proc flymake mwheel warnings auto-complete-config
auto-complete popup rect dired-x dired dired-loaddefs
display-line-numbers time-date paren time image battery cus-start
cus-load autorevert filenotify xt-mouse edmacro kmacro winner flx-ido
advice flx ido seq seq-25 lsp-ui-autoloads dash-functional-autoloads
lsp-java-autoloads lsp-mode-autoloads edit-indirect-autoloads
parinfer-autoloads ginkgo-mode-autoloads pianobar-autoloads
concourse-mode-autoloads hierarchy-autoloads flx-ido-autoloads
flx-autoloads wgrep-autoloads ac-cider-autoloads request-autoloads
helm-autoloads helm-core-autoloads paredit-autoloads
flycheck-clojure-autoloads flycheck-autoloads cider-autoloads
seq-autoloads spinner-autoloads queue-autoloads clojure-mode-autoloads
go-rename-autoloads ace-window-autoloads avy-autoloads
dockerfile-mode-autoloads s-autoloads yasnippet-snippets-autoloads
yasnippet-autoloads go-autocomplete-autoloads auto-complete-autoloads
popup-autoloads go-eldoc-autoloads protobuf-mode-autoloads
markdown-mode-autoloads go-guru-autoloads yaml-mode-autoloads
etags-select-autoloads magit-autoloads magit-popup-autoloads
git-commit-autoloads with-editor-autoloads ghub-autoloads dash-autoloads
async-autoloads projectile-autoloads pkg-info-autoloads epl-autoloads
go-mode-autoloads debbugs-autoloads cl-lib-autoloads finder-inf
straight-autoloads rx compile comint ansi-color ring cl-extra straight
info tool-bar autoload radix-tree lisp-mnt easy-mmode pcase subr-x
checkdoc regexp-opt thingatpt help-mode easymenu straight-compat
byte-opt elec-pair cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile
cconv mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select 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 inotify multi-tty make-network-process emacs)

Memory information:
((conses 16 466216 505827)
 (symbols 48 48677 317)
 (miscs 40 3644 11158)
 (strings 32 154669 72840)
 (string-bytes 1 4738720)
 (vectors 16 63035)
 (vector-slots 8 1589552 318804)
 (floats 8 538 5497)
 (intervals 56 6435 8244)
 (buffers 992 77)
 (heap 1024 64670 73639))




Acknowledgement sent to John Shahid <jvshahid@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31966; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Jun 2018 17:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.