Package: emacs;
Reported by: John Shahid <jvshahid <at> gmail.com>
Date: Mon, 25 Jun 2018 17:10:02 UTC
Severity: minor
Tags: notabug
Found in version 27.0.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: Stefan Kangas <stefan <at> marxist.se> Cc: tracker <at> debbugs.gnu.org Subject: bug#31966: closed (27.0.50; auto-complete candidates aren't aligned properly) Date: Wed, 21 Aug 2019 02:18:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 21 Aug 2019 04:17:05 +0200 with message-id <CADwFkmki0q=-Gce+nFOUwhSnYbgxAm2XAnQbNrhkp=1kturWFQ <at> mail.gmail.com> and subject line Re: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly has caused the debbugs.gnu.org bug report #31966, regarding 27.0.50; auto-complete candidates aren't aligned properly to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs <at> gnu.org.) -- 31966: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31966 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: John Shahid <jvshahid <at> gmail.com> To: bug-gnu-emacs <at> gnu.org Subject: 27.0.50; auto-complete candidates aren't aligned properly Date: Mon, 25 Jun 2018 17:08:50 +0000The 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))
[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefan <at> marxist.se> To: Eli Zaretskii <eliz <at> gnu.org> Cc: John Shahid <jvshahid <at> gmail.com>, 31966-done <at> debbugs.gnu.org Subject: Re: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly Date: Wed, 21 Aug 2019 04:17:05 +0200Eli Zaretskii <eliz <at> gnu.org> writes: > tags 31966 notabug > thanks > >> From: John Shahid <jvshahid <at> gmail.com> >> 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
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.