From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18493: 24.3.93; posn-col-row should take text-scale-mode into account Date: Thu, 18 Sep 2014 13:46:24 +0400 Message-ID: <541AA9F0.2050409@yandex.ru> References: <864mw529bx.fsf@yandex.ru> <38e6b538-3e76-472a-b371-2e74f9a14bf7@default> <541A1693.4090009@yandex.ru> <30fb9ae4-3781-4bc7-a1cf-45bf2a195929@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411033898 29400 80.91.229.3 (18 Sep 2014 09:51:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2014 09:51:38 +0000 (UTC) To: Drew Adams , 18493@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 18 11:51:31 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XUYN9-0007p9-23 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 11:51:31 +0200 Original-Received: from localhost ([::1]:49474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUYN8-0003kD-NW for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 05:51:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUYMw-0003aj-5W for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 05:51:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUYMl-0007SA-Rq for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 05:51:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUYMl-0007RL-Oc for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 05:51:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XUYIo-0003fD-AV for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 05:47:02 -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, 18 Sep 2014 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18493 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18493-submit@debbugs.gnu.org id=B18493.141103359214040 (code B ref 18493); Thu, 18 Sep 2014 09:47:02 +0000 Original-Received: (at 18493) by debbugs.gnu.org; 18 Sep 2014 09:46:32 +0000 Original-Received: from localhost ([127.0.0.1]:43951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUYIJ-0003eN-7Q for submit@debbugs.gnu.org; Thu, 18 Sep 2014 05:46:31 -0400 Original-Received: from mail-lb0-f176.google.com ([209.85.217.176]:51760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUYIH-0003eE-8j for 18493@debbugs.gnu.org; Thu, 18 Sep 2014 05:46:29 -0400 Original-Received: by mail-lb0-f176.google.com with SMTP id z11so759231lbi.7 for <18493@debbugs.gnu.org>; Thu, 18 Sep 2014 02:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=YEkT4w6z6T1doy1N0CqgN1aOthTNS9yFlN0HvxSsQdI=; b=IA7GmG4lUqX0m2dxQMXDSYAYlVELF9UwSYyR8sVgsMWreMXx/6y4M7RvGqyCW3Yb5C 5BTLJpFBFITGIQdr8hjOERTLjbvK967LRuPCQQb8vkRqWyq37Yt+rSRw++Obz1mLYKMT 8n0RQUg7Cv8kuGjiKrPq6TCZF574LSAWYwUZ+bnkzu64kgndWgmsPguZm5fcliI/QH6Q /QKWzeWXQSUCubCOcK7ZN0MZc/Pt9APTS57CihgcjOwdiXgRibxLm7oG8rcHGhhvZFtc U+zORqTmbFMXR43Jkdb/7sWI712GtFeHMm0vhaKYfnR5suREVN/Ck8ULbzE0HCEtOTTu vxbw== X-Received: by 10.112.48.100 with SMTP id k4mr2116064lbn.95.1411033587941; Thu, 18 Sep 2014 02:46:27 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id nj4sm2027798lbc.8.2014.09.18.02.46.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Sep 2014 02:46:27 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <30fb9ae4-3781-4bc7-a1cf-45bf2a195929@default> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93459 Archived-At: On 09/18/2014 05:56 AM, Drew Adams wrote: > I don't understand why the value changing helps, instead of hurts, > in that context. I would think that the column should not change > just because the text is scaled. But I'm probably missing something. Take a look at the implementation. The function takes pixel coordinates and divides them by the frame-default character dimensions. text-scale-mode is buffer-local, so it doesn't change the latter. > It doesn't matter whether I do or don't. As a matter of fact, I do, > but only a little bit - getting the column of a mouse click, using: > > (car (posn-col-row (event-start event))) > > And I guess that code must be broken wrt text scaling. I didn't > realize that. That was my point. >> Is it aware of `posn-col-row' not being affected by text scale? > > I guess you mean *being* affected by it (?). IIUC, the return > value depends on the text scale. Isn't that the bug you reported? Indeed. By "not affected", I just meant that the implementation doesn't take it into account.