From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 13:09:07 2018 Received: (at submit) by debbugs.gnu.org; 25 Jun 2018 17:09:07 +0000 Received: from localhost ([127.0.0.1]:35131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXUzD-0008Eq-CT for submit@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 ) id 1fXUzB-0008EL-QC for submit@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 ) id 1fXUz5-000340-4S for submit@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 ) id 1fXUz5-00033r-1B for submit@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 ) id 1fXUz3-0007m9-2f for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 13:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXUz0-00031a-At for bug-gnu-emacs@gnu.org; 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 ) id 1fXUz0-00031P-47 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 13:08:54 -0400 Received: by mail-qt0-x230.google.com with SMTP id i18-v6so12579456qtp.12 for ; 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 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 10:08:52 -0700 (PDT) From: John Shahid To: bug-gnu-emacs@gnu.org Subject: 27.0.50; auto-complete candidates aren't aligned properly Date: Mon, 25 Jun 2018 17:08:50 +0000 Message-ID: <87muvirdy5.fsf@gmail.com> 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 13:28:13 2018 Received: (at 31966) by debbugs.gnu.org; 25 Jun 2018 17:28:13 +0000 Received: from localhost ([127.0.0.1]:35144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXVHg-0000GU-UC for submit@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 ) id 1fXVHe-0000GH-Rp for 31966@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 ) id 1fXVHW-00063i-Et for 31966@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: John Shahid In-reply-to: <87muvirdy5.fsf@gmail.com> (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@gmail.com> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) tags 31966 notabug thanks > From: John Shahid > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 15:11:01 2018 Received: (at 31966) by debbugs.gnu.org; 25 Jun 2018 19:11:01 +0000 Received: from localhost ([127.0.0.1]:35171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXWtA-0004h4-Vk for submit@debbugs.gnu.org; Mon, 25 Jun 2018 15:11:01 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:36204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXWt9-0004gp-Bt for 31966@debbugs.gnu.org; Mon, 25 Jun 2018 15:10:59 -0400 Received: by mail-qk0-f179.google.com with SMTP id a132-v6so1200477qkg.3 for <31966@debbugs.gnu.org>; Mon, 25 Jun 2018 12:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=bYJpAk7wLPfHeqp922cySRuTZWxxExjQZmGusrFsdiY=; b=Y8CY3ThsYzrddamr0iIA/thkeObze3/ZGj6jjHfvwu2sSbARh2KYJBj3Bok8vx9a0/ BufCmP1VlYkLfeq98khMpJJYlpZQKM1MWhC9MSf1166DpYgRpoljidGW4abOu2/33e/C PRCyRe+OEsQchfduR2vF7zd5EDfYlSJcfnyhY69hUi9algLrPgdeNKlBXyqxkc41T8uA N76uVi5NwPwjsrL36yzOEo3Zh3JyBEDM6rEKaPxmHG0piTt5ZnOWEzgfyMGnsJYuq+uG 7AF893vrlAWUMAWNJDzBMm/ZEpBtMkN6vc1p7fEUIaDNygA7fRUcGlTG3Jy4T2jeFODH Oy/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=bYJpAk7wLPfHeqp922cySRuTZWxxExjQZmGusrFsdiY=; b=qwF+JZufARy4LfP9a58JmLjH0rgcnlm8BHTVM785eg6SupQCix8IwC0Qe3euO0VM8V UjkPn98HGjmxo3/PYxzTXMkMFGXDqHDkAVLjopijfdcTEPgvwDfC2l+vDzkoICVA9Zov 3G6jQGrVhXLp52WAtM9YNBg/gMTHczJVmXkTqSfJE2sn94OA348O3BYApP1Eoqy7oFiW oFXQVMipN7lW7LVYezkl/IuCwf7j4YvDwkh3kBhH/rr7BIJ+ld0dm7yZSLkxSSwEF2Tf sAiLSj9IameLiDFpkM1pG73xYpE4+DIsCiO9u14bbflRMvV4Yh4UKGUK7DXBmteKZqrt rU7w== X-Gm-Message-State: APt69E3IFAJM5D4wUlz9NJcbtF1dqnHCD5rIFGFbVOF+9I//pXhxfeQb ZjpUp43F/TDmr+GmUi0Zp8sNNXrJ X-Google-Smtp-Source: AAOMgpeidyXPZ1HAwOmJrz72TNDiONUmy384rpMwGkRE2h3Ar9p0+Brc6WCeSzBBouKXnFU1Sieu1A== X-Received: by 2002:ae9:f449:: with SMTP id z9-v6mr2360473qkl.410.1529953853170; Mon, 25 Jun 2018 12:10:53 -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 g57-v6sm13021168qte.52.2018.06.25.12.10.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 12:10:52 -0700 (PDT) References: <87muvirdy5.fsf@gmail.com> <83vaa6rd2f.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: John Shahid To: Eli Zaretskii Subject: Re: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly In-reply-to: <83vaa6rd2f.fsf@gnu.org> Date: Mon, 25 Jun 2018 19:10:45 +0000 Message-ID: <87k1qmr8ay.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 31966 Cc: 31966@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 31966 notabug > thanks > >> From: John Shahid >> 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) Thanks for the explanation. I opened a PR on the popup-el github repository https://github.com/auto-complete/popup-el/pull/116. The PR does something similar to the following (if (functionp 'line-number-display-width) (setq column ...)) is that an acceptable approach or should I use the emacs-major-version instead ? > > 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. I read the emacs-26 NEWS file and all of this is making more sense now. > > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 25 15:16:51 2018 Received: (at 31966) by debbugs.gnu.org; 25 Jun 2018 19:16:51 +0000 Received: from localhost ([127.0.0.1]:35193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXWyo-0004qw-8S for submit@debbugs.gnu.org; Mon, 25 Jun 2018 15:16:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXWym-0004qR-Bz for 31966@debbugs.gnu.org; Mon, 25 Jun 2018 15:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXWyd-0005yt-8Y for 31966@debbugs.gnu.org; Mon, 25 Jun 2018 15:16:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXWyd-0005yk-4H; Mon, 25 Jun 2018 15:16:39 -0400 Received: from [176.228.60.248] (port=2997 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fXWyc-0001kZ-GS; Mon, 25 Jun 2018 15:16:38 -0400 Date: Mon, 25 Jun 2018 22:16:39 +0300 Message-Id: <83r2kur814.fsf@gnu.org> From: Eli Zaretskii To: John Shahid In-reply-to: <87k1qmr8ay.fsf@gmail.com> (message from John Shahid on Mon, 25 Jun 2018 19:10:45 +0000) Subject: Re: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly References: <87muvirdy5.fsf@gmail.com> <83vaa6rd2f.fsf@gnu.org> <87k1qmr8ay.fsf@gmail.com> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: John Shahid > Cc: 31966@debbugs.gnu.org > Date: Mon, 25 Jun 2018 19:10:45 +0000 > > > (line-number-display-width 'columns) > > Thanks for the explanation. I opened a PR on the popup-el github > repository https://github.com/auto-complete/popup-el/pull/116. The PR > does something similar to the following > > (if (functionp 'line-number-display-width) (setq column ...)) > > is that an acceptable approach or should I use the emacs-major-version > instead ? Testing for features is better than testing for Emacs versions. However, I would also suggest to call line-number-display-width only of display-line-numbers is non-nil (in addition to the fboundp test). From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 20 22:17:23 2019 Received: (at 31966-done) by debbugs.gnu.org; 21 Aug 2019 02:17:23 +0000 Received: from localhost ([127.0.0.1]:34341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0GBf-0002oj-G0 for submit@debbugs.gnu.org; Tue, 20 Aug 2019 22:17:23 -0400 Received: from mail-pf1-f174.google.com ([209.85.210.174]:40477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0GBe-0002je-Cw for 31966-done@debbugs.gnu.org; Tue, 20 Aug 2019 22:17:22 -0400 Received: by mail-pf1-f174.google.com with SMTP id w16so350217pfn.7 for <31966-done@debbugs.gnu.org>; Tue, 20 Aug 2019 19:17:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=2FfNeB87gTKmeiUK1FZxTD08n9Fzq27KbD/2Hn3Vlq8=; b=K/hyDdnQ8mrxUAyuAYQ4fa1IF6eDH8C5g8+cANmbX45sk5wx7uatA9Uvqtn059hZQ5 jYc+RI/kAvebLj7ZIk6OmNf2ysH1+1KpV3VHWoVcROtuLKk+uoBYLQ/JdGIWtjCqREDG ANdankXYqZslD5yF0zwYm2Lc5SOU4Y/rItn0kEWwPlkdlnAsz48MteoDMhCrI9obM21K leFvS3rPXe1OV8ibAZfqgq9ns28dh/QlR7lx3ifoBJlf6xAiHWC5gKqfnFzc59mO2I0q 3N+Ev4qJ1W3w/zdH3Eua3GZ0OuScyZzkx8IcAMV3gmVoc5JofcasiNRGy4mp7T5b+L8m UTAQ== X-Gm-Message-State: APjAAAUsN24k2syTTt3cfGMfaf0dTVDtR9tbhlO7zdOEaAtVO6kniSSK rSu2xkUm+2jQMCYhsrXNEvTI1OunCsBxtKYog28= X-Google-Smtp-Source: APXvYqyEXtRzMIWFM+xsvzSnaSERzw1EL5qetWszg5/00McR0Bnkk92MYqX2fprijgF3Slju+ns+MKuKznbD5owvvng= X-Received: by 2002:a17:90a:c086:: with SMTP id o6mr3153754pjs.2.1566353836653; Tue, 20 Aug 2019 19:17:16 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Wed, 21 Aug 2019 04:17:05 +0200 Message-ID: Subject: Re: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 31966-done Cc: John Shahid , 31966-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: > tags 31966 notabug > thanks > >> From: John Shahid >> 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. This was tagged notabug over a year ago, and indeed doesn't seem to be a bug. I'm therefore now closing this bug report. Thanks, Stefan Kangas From unknown Sun Jun 22 22:46:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 18 Sep 2019 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator