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: Fri, 19 Sep 2014 22:46:14 +0300 Message-ID: <83pperz94p.fsf@gnu.org> References: <864mw529bx.fsf@yandex.ru> <8338bp2cwf.fsf@gnu.org> <541B46AA.2020904@yandex.ru> <83iokk16n8.fsf@gnu.org> <867g0zsvuy.fsf@yandex.ru> <838ulf2192.fsf@gnu.org> <541C710E.2060604@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411156047 11164 80.91.229.3 (19 Sep 2014 19:47:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 19:47:27 +0000 (UTC) Cc: 18493@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 19 21:47:20 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 1XV49G-0004wj-Kh for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 21:47:18 +0200 Original-Received: from localhost ([::1]:60304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV49F-0001C6-P0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 15:47:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV49B-0001Bp-Oc for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 15:47:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XV496-0002y5-2y for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 15:47:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV496-0002vw-0K for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 15:47:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XV490-00083r-Hx for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 15:47: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: Fri, 19 Sep 2014 19: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.141115599430937 (code B ref 18493); Fri, 19 Sep 2014 19:47:02 +0000 Original-Received: (at 18493) by debbugs.gnu.org; 19 Sep 2014 19:46:34 +0000 Original-Received: from localhost ([127.0.0.1]:46073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XV48X-00082u-6I for submit@debbugs.gnu.org; Fri, 19 Sep 2014 15:46:33 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:53813) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XV48T-00082l-R8 for 18493@debbugs.gnu.org; Fri, 19 Sep 2014 15:46:31 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NC500D00XYO7400@a-mtaout22.012.net.il> for 18493@debbugs.gnu.org; Fri, 19 Sep 2014 22:46:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC500C8JYXFY950@a-mtaout22.012.net.il>; Fri, 19 Sep 2014 22:46:27 +0300 (IDT) In-reply-to: <541C710E.2060604@yandex.ru> 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:93538 Archived-At: > Date: Fri, 19 Sep 2014 22:08:14 +0400 > From: Dmitry Gutov > CC: 18493@debbugs.gnu.org > > >> I'd like to reiterate here, that I'd be satisfied just with some > >> instructions how to convert the current `posn-col-row' return value > >> into value that respects text scale. > > > > I still don't understand enough what that means to answer, sorry. See > > below. > > What I had in mind, is instead of dividing the pixel coordinates by > `frame-char-width', first scale it according to the text scale level. You describe a means to get what you want, but don't explain why you need that. Why do you need to divide the pixel coordinates by something? What do you want to achieve by that division? What are you going to do with the 'scaled" column? > >> But from `posn-col-row' I actually take the screen column value > > > > And do what with it? Please be specific, and please don't spare me > > the details. I don't have your knowledge of what company-mode does to > > answer these questions myself, and I have only a very vague idea of > > how you arrange the display of the completion candidates and how the > > "column" reported by posn-col-row enters that picture. > > I think I've described it already in previous discussions. e.g. in > http://debbugs.gnu.org/18195 If that were enough, I wouldn't be asking for more details. > For better description, you could just read the code Sorry, I don't have time for that. I don't insist that you explain things to me, I'm trying to help you find the way of computing whatever it is that you need. Feel free to give up on me. > > E.g., given arbitrary pixel coordinates, posn-at-x-y will give you the > > object at those coordinates and character position within that object. > > Is that what you need? > > Not really: for example, if there's a tab character there, the value > will be too imprecise (I need to know the exact column inside the tab). That can be computed. > Or if there's an existing overlay there, I'd try my best to ignore it. > "character position" within its display string won't help me in the least. Not sure what you mean by "ignore", but the value tells you that you have a string there, so you can do whatever you want.