From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: John Shahid <jvshahid@gmail.com>, 31966-done@debbugs.gnu.org
Subject: bug#31966: 27.0.50; auto-complete candidates aren't aligned properly
Date: Wed, 21 Aug 2019 04:17:05 +0200 [thread overview]
Message-ID: <CADwFkmki0q=-Gce+nFOUwhSnYbgxAm2XAnQbNrhkp=1kturWFQ@mail.gmail.com> (raw)
In-Reply-To: <87muvirdy5.fsf@gmail.com>
Eli Zaretskii <eliz@gnu.org> writes:
> tags 31966 notabug
> thanks
>
>> From: John Shahid <jvshahid@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
prev parent reply other threads:[~2019-08-21 2:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 17:08 bug#31966: 27.0.50; auto-complete candidates aren't aligned properly John Shahid
2018-06-25 17:27 ` Eli Zaretskii
2018-06-25 19:10 ` John Shahid
2018-06-25 19:16 ` Eli Zaretskii
2019-08-21 2:17 ` Stefan Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmki0q=-Gce+nFOUwhSnYbgxAm2XAnQbNrhkp=1kturWFQ@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=31966-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jvshahid@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.