From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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 19:50:05 +0300 Message-ID: <83r3z827r6.fsf@gnu.org> References: <864mw529bx.fsf@yandex.ru> <38e6b538-3e76-472a-b371-2e74f9a14bf7@default> <541A1693.4090009@yandex.ru> <30fb9ae4-3781-4bc7-a1cf-45bf2a195929@default> <541AA9F0.2050409@yandex.ru> <5f49d157-07b3-4d47-9866-3726f8c7ec0a@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411059699 27627 80.91.229.3 (18 Sep 2014 17:01:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2014 17:01:39 +0000 (UTC) Cc: 18493@debbugs.gnu.org, dgutov@yandex.ru To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 18 19:01: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 1XUf5G-0001FH-Q0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 19:01:30 +0200 Original-Received: from localhost ([::1]:52293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUf5G-0006f4-Fa for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 13:01:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUf50-0006M5-7g for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUf4t-0000Rp-Pp for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUf4t-0000Qi-NY for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XUev8-0007iD-3h for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 12:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Sep 2014 16:51: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.141105900829571 (code B ref 18493); Thu, 18 Sep 2014 16:51:02 +0000 Original-Received: (at 18493) by debbugs.gnu.org; 18 Sep 2014 16:50:08 +0000 Original-Received: from localhost ([127.0.0.1]:44709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUeuF-0007gt-SG for submit@debbugs.gnu.org; Thu, 18 Sep 2014 12:50:08 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:49239) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUeuC-0007ga-DU for 18493@debbugs.gnu.org; Thu, 18 Sep 2014 12:50:05 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NC300300VKKEO00@mtaout25.012.net.il> for 18493@debbugs.gnu.org; Thu, 18 Sep 2014 19:44:54 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC3003RPVUTZ100@mtaout25.012.net.il>; Thu, 18 Sep 2014 19:44:54 +0300 (IDT) In-reply-to: <5f49d157-07b3-4d47-9866-3726f8c7ec0a@default> X-012-Sender: halo1@inter.net.il 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:93477 Archived-At: > Date: Thu, 18 Sep 2014 08:37:21 -0700 (PDT) > From: Drew Adams > > > > 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. > > Yes, I guessed that. That sounds like the wrong behavior, to me. > The frame char size is not useful here, I would think. What counts, > for visual _columns_ is the visual char size, i.e., from text scaling. Perhaps in the case of text scaling, it does (and even then there are reasons for the current behavior, see my other mail). But text scaling is just one particular feature that Emacs display supports; there are many more where it is meaningless to talk about "columns". E.g., how do you measure an inline image in columns? what would be the "column" of the first character displayed after such an image? What about stretches of whitespace created by the likes of ':align-to' display properties -- how do you measure them in "columns" in some useful and predictable manner? Either we want a general solution, or something for "simple" use cases. The former is not possible, as I hope you will agree; the only general solution is to use pixel coordinates. The "simple" solution we already have, it just doesn't go far enough to cover text scaling, and it will take some serious arguments and real-life use cases to convince me that we should go farther or introduce a new API for those use cases.