From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#42039: 27.0.91; (posn-x-y (posn-at-point)) inconsistent with display-line-numbers-mode Date: Thu, 25 Jun 2020 21:35:59 +0300 Message-ID: <4a6ef653-c9f0-0215-cfec-c04bc6a8f88e@yandex.ru> References: <6afd1e11-7fa1-6efe-db6d-d768ae2a942f@yandex.ru> <83o8p7rqhx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="57262"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 42039@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 25 20:41:57 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joWov-000En8-Fz for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jun 2020 20:41:57 +0200 Original-Received: from localhost ([::1]:58078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joWou-0004Fe-GH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jun 2020 14:41:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joWkA-00072X-3c for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2020 14:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joWk9-0005w2-QK for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2020 14:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1joWk9-0006fY-Mq for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2020 14:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jun 2020 18:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42039 X-GNU-PR-Package: emacs Original-Received: via spool by 42039-submit@debbugs.gnu.org id=B42039.159311017125516 (code B ref 42039); Thu, 25 Jun 2020 18:37:01 +0000 Original-Received: (at 42039) by debbugs.gnu.org; 25 Jun 2020 18:36:11 +0000 Original-Received: from localhost ([127.0.0.1]:41152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWjK-0006dS-Ss for submit@debbugs.gnu.org; Thu, 25 Jun 2020 14:36:11 -0400 Original-Received: from mail-ej1-f52.google.com ([209.85.218.52]:36806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWjI-0006d8-6U for 42039@debbugs.gnu.org; Thu, 25 Jun 2020 14:36:09 -0400 Original-Received: by mail-ej1-f52.google.com with SMTP id dr13so6938695ejc.3 for <42039@debbugs.gnu.org>; Thu, 25 Jun 2020 11:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RBLkjwq64Zrrrq2sI+ZyB8YsvzwtAnucT1MVOtjhDnc=; b=hz3bL4V8erP5/FqTZvRP7r+o++UfjR12N3oFL6Nq3AtWsCKPPG9a23YH3Yh9KpzCMc mdgqLkYGbpxLjqYykviDN5VrJJZsTq57IsgqHQZ0q9yG4svtjE6IG7SbuGWfMf8NWWKp cfQ0+faEjuEiR6gniwAxdyAtK7q+6U+vK12IMcLRNKkQQeKUq6RlUVEBQWyNfFePaAEx oBZBssWNQ+7+X4l74+bU7fqo2i7bFksAnxOZqx45dhcp7B0dbIcvZYbbBt5qXRMNulV2 4HFEEAC6Mn4Z1clIhtpJK1JroX9maIToZ9DE4rkwTI2pzN1FxpUqjCH6u8LSmmi6vgFJ 6HzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RBLkjwq64Zrrrq2sI+ZyB8YsvzwtAnucT1MVOtjhDnc=; b=eDmYIkIaXkbKMrw1cYfvXHBySEVb68yufrMOHWv/v1AgPPK3ZF7msNEssYoAJjG+Jg fjRpvY0x3s0BU2VnmGTstpxUP6P86pPIukDN+Gfo4K0Hp4wqfjnRVvZoFcXJ6EdDCdvg yXb/1ArdEoFmUc86ZJ5wnIGoMI4oHT0l/lpC+HfSnhc3qqhmWclnxBfmphpueERObOwq 9s7rxhpyVyUIyHbSXtmQqPV8rqt7leKKC2EHtSglY5NG17Bu+4vMFJKl7IsJ1ETVKtcK c6ys6YeDYSD3EYHimq8WsC6aMdRIWaHIK3U9UhuISgG2gyyyD/xPh9BAlbImjqcDoE8f Ta6Q== X-Gm-Message-State: AOAM531pnRDNO1mx6WH9INx666eey3ixHZTu6Cuzp8BlT66euvCLZFYz 5c4Ld+QwJ/HJB3uPa49XJVqhNW8Y X-Google-Smtp-Source: ABdhPJxevbNUYIK2OiyFr9IZCBJEhX54l7kdMx6pWHaNHSIDnW3uhZ6W19QDo7B99A9DYPqDmm96RA== X-Received: by 2002:a17:906:19c7:: with SMTP id h7mr30147924ejd.403.1593110161886; Thu, 25 Jun 2020 11:36:01 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id l6sm18931658edn.42.2020.06.25.11.36.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 11:36:01 -0700 (PDT) In-Reply-To: <83o8p7rqhx.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182385 Archived-At: On 25.06.2020 20:42, Eli Zaretskii wrote: > The bug-report buffer doesn't use an overlay, it uses a display > property string. Do you have an example with an overlay where this > problem happens, or is it limited to display strings? Good question. It doesn't happen with just any overlay, so here's a full example: 1. Create an overlay, e.g. (setq o (make-overlay (point) (1+ (point)))) The buffer contents seem unimportant. It can cover some text, or a newline, or multiple lines. But it should start at bol (if it doesn't start at bol, the result will also be unexpected, but not 0). So the buffer text can just be a bunch of newlines, for the sake of this example. 2. Put a display string on it that (important!) ends with a newline: (overlay-put o 'display "abc\ndef\n") 3. Eval (car (posn-x-y (posn-at-point (overlay-start o)))) It will evaluate to 0 even if display-line-numbers-mode is enabled.