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 20:00:29 +0300 Message-ID: <83ppes279u.fsf@gnu.org> References: <955c9f56-902e-4e21-8cfe-e2b8d2a37ead@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411059689 27512 80.91.229.3 (18 Sep 2014 17:01:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2014 17:01:29 +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:21 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 1XUf57-0001Bn-Ns for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 19:01:21 +0200 Original-Received: from localhost ([::1]:52285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUf57-0006NN-CL for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Sep 2014 13:01:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUf4y-0006M2-GY for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUf4t-0000Rd-HM for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01:12 -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-Eu 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 1XUf4n-0007z9-Sj for bug-gnu-emacs@gnu.org; Thu, 18 Sep 2014 13:01: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 17:01:01 +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.141105963330636 (code B ref 18493); Thu, 18 Sep 2014 17:01:01 +0000 Original-Received: (at 18493) by debbugs.gnu.org; 18 Sep 2014 17:00:33 +0000 Original-Received: from localhost ([127.0.0.1]:44713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUf4K-0007y3-2s for submit@debbugs.gnu.org; Thu, 18 Sep 2014 13:00:33 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:60845) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUf4G-0007xr-Jl for 18493@debbugs.gnu.org; Thu, 18 Sep 2014 13:00:29 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NC300200WFNHC00@a-mtaout20.012.net.il> for 18493@debbugs.gnu.org; Thu, 18 Sep 2014 20:00:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC3002J3WKQ7M60@a-mtaout20.012.net.il>; Thu, 18 Sep 2014 20:00:26 +0300 (IDT) In-reply-to: <955c9f56-902e-4e21-8cfe-e2b8d2a37ead@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:93475 Archived-At: > Date: Thu, 18 Sep 2014 08:52:55 -0700 (PDT) > From: Drew Adams > Cc: 18493@debbugs.gnu.org > > > But once variable-size fonts, stretch glyphs, images, and > > other display atrocities come into play, there's no meaningful way of > > talking about "columns" and "rows" that can be used as indices into > > the text. > > If there is no meaningful way to talk about columns and rows then > a function that returns the column and row might as well run around > the block and then take a nap. You are being carried away, and probably also influenced by the "usual" meaning of "column" and "row". What posn-col-row returns are not arbitrary random values it finds around the block. It returns precise coordinates in units of canonical character size. These values are useful because there are functions in Emacs that expect them. So, while it is meaningless to talk about "columns" and "rows" in their usual meanings, it is still meaningful to talk about coordinates measured in canonical character cell units. > The case of text scaling seems to me to be a case where we can > meaningfully return the visual column and row. In my other mail I wrote that the buffer position is all you need for that, and you already have it. So I see no general problem here, unless someone shows a particular use case where that is not enough for some reason. Then we can reason whether what's needed is "scalable" variant of posn-col-row or something else. > And if `posn-actual-col-row' really does return the actual, visual > column and row It doesn't. posn-actual-col-row is just an accessor function to some of the data in the click event. See the discussions I pointed to. > So let me ask you that same question: what is the use case that the > current design supports? Just grep the Lisp files for that function, there are several dozens of its uses throughout Emacs (and a few more in C). > IOW, why have two separate functions, `posn-col-row' and > `posn-actual-col-row'? They do 2 very different things.