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 16:22:49 +0300 Message-ID: <838ulf2192.fsf@gnu.org> References: <864mw529bx.fsf@yandex.ru> <8338bp2cwf.fsf@gnu.org> <541B46AA.2020904@yandex.ru> <83iokk16n8.fsf@gnu.org> <867g0zsvuy.fsf@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411133012 2163 80.91.229.3 (19 Sep 2014 13:23:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 13:23:32 +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 15:23:24 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 1XUy9j-00037H-F5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 15:23:23 +0200 Original-Received: from localhost ([::1]:58232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUy9i-0003lK-Uh for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 09:23:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUy9Z-0003aQ-79 for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:23:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUy9T-0003LU-Sh for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:23:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUy9T-0003Ke-QV for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:23:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XUy9O-0005nF-9K for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:23: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 13:23: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.141113298022257 (code B ref 18493); Fri, 19 Sep 2014 13:23:02 +0000 Original-Received: (at 18493) by debbugs.gnu.org; 19 Sep 2014 13:23:00 +0000 Original-Received: from localhost ([127.0.0.1]:45258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUy9M-0005mu-0H for submit@debbugs.gnu.org; Fri, 19 Sep 2014 09:23:00 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:60393) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUy9J-0005ml-4O for 18493@debbugs.gnu.org; Fri, 19 Sep 2014 09:22:58 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NC500500GX2WC00@mtaout29.012.net.il> for 18493@debbugs.gnu.org; Fri, 19 Sep 2014 16:22:33 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC500656H5LMI00@mtaout29.012.net.il>; Fri, 19 Sep 2014 16:22:33 +0300 (IDT) In-reply-to: <867g0zsvuy.fsf@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:93514 Archived-At: > From: Dmitry Gutov > Cc: 18493@debbugs.gnu.org > Date: Fri, 19 Sep 2014 15:17:09 +0400 > > Eli Zaretskii writes: > > > Is company-mode only for buffers whose major mode is some programming > > language? > > I'd say it's the first priority. For you. Then someone else will come and argue that Gnus or Org or whatever buffers are much more important. > 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. > > So what you actually need is to find the correct X coordinate for the > > screen line _below_ (and maybe also above) the one where posn-col-row > > is called, is that right? > > I don't understand the distinction. The distinction is this: do you need the column to access text in the same display line, or do you need it for other display lines, like for aligning text in the next or previous lines with the text of the line where you called posn-col-row? > 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. > > If so, first question is why not do all this in pixels? > > Because we use the returned value when combining the display string for > the overlay. So at some point the pixels have to get converted to > character numbers, and we're back to the same problem. I still don't understand this well enough, please give the details. 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?