From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Feng Shu" Newsgroups: gmane.emacs.devel Subject: Re: posn-at-point get strange info when flycheck enable and (setq truncate-lines t) Date: Wed, 17 Jan 2018 19:11:44 +0800 Message-ID: <873734buz3.fsf@163.com> References: <3d6f0768.2449.16101dff948.Coremail.tumashu@163.com> <87efmowz84.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516187568 24172 195.159.176.226 (17 Jan 2018 11:12:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Jan 2018 11:12:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) Cc: "emacs-devel@gnu.org" To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 17 12:12:43 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebldr-0005Bo-Ej for ged-emacs-devel@m.gmane.org; Wed, 17 Jan 2018 12:12:28 +0100 Original-Received: from localhost ([::1]:55980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eblfr-0003Uk-GM for ged-emacs-devel@m.gmane.org; Wed, 17 Jan 2018 06:14:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebldI-00022T-52 for emacs-devel@gnu.org; Wed, 17 Jan 2018 06:11:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebldE-0002Q1-UM for emacs-devel@gnu.org; Wed, 17 Jan 2018 06:11:52 -0500 Original-Received: from m12-14.163.com ([220.181.12.14]:54731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebldE-0002Ok-7X for emacs-devel@gnu.org; Wed, 17 Jan 2018 06:11:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=mrbY+ 2jp6aLrr5tKvmP0ip2eT3P3kQ2/AQE7P0WeO5Y=; b=XZwuP8boMW7t2ulxOBP9B KFBVufOz1MZCNIkJkVOPVq+u1MRnWusbwg5Dw9hKG+yZOX+9ENRIlCtNFkNQzpMK t8VJ9CuQu/dQfHG1oKnvNKTcsdYbjDsx9qCV20WmD+l4ls+rOHJPal/KxgTww1V4 naqBiHz0d9TwFkXrUQbQJY= Original-Received: from tumashu (unknown [36.149.169.31]) by smtp10 (Coremail) with SMTP id DsCowADX4yVxL19apYIwDA--.41474S2; Wed, 17 Jan 2018 19:11:45 +0800 (CST) In-Reply-To: <87efmowz84.fsf@linux-m68k.org> (Andreas Schwab's message of "Wed, 17 Jan 2018 11:34:19 +0100") X-CM-TRANSID: DsCowADX4yVxL19apYIwDA--.41474S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7CFy7JF15KrWDKw18WFWUtwb_yoW8Ar45pF WDt3sIkwn3GFyFyws2yw1Fvr10vw1kWFWkCrnxC3WDA3sIv3WIvry5KF18Cr47G3WkW34Y g3W2gF9F934UZa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UW5lnUUUUU= X-Originating-IP: [36.149.169.31] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiwBHQ1FXlch5n2AAAs2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.12.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222038 Archived-At: Andreas Schwab writes: > On Jan 17 2018, tumashu wrote: > >> When I enable flycheck and (setq truncate-lines t) >> sometimes posn-at-point get strange info like the below: >> >> >> (# 31 (65 . 111) 0 (! . 0) 31 (5 . 3) nil (0 . 24) (13 . 29)) > > Strange in which way? Sorry, it is flycheck's setting: #+BEGIN_SRC emacs-lisp (defcustom flycheck-indication-mode 'left-fringe "The indication mode for Flycheck errors and warnings. This variable controls how Flycheck indicates errors in buffers. May either be `left-fringe', `right-fringe', or nil. If set to `left-fringe' or `right-fringe', indicate errors and warnings via icons in the left and right fringe respectively. If set to nil, do not indicate errors and warnings, but just highlight them according to `flycheck-highlighting-mode'." :group 'flycheck :type '(choice (const :tag "Indicate in the left fringe" left-fringe) (const :tag "Indicate in the right fringe" right-fringe) (const :tag "Do not indicate" nil)) :safe #'symbolp) ... (when flycheck-indication-mode (setf (overlay-get overlay 'before-string) (flycheck-error-level-make-fringe-icon level flycheck-indication-mode))) ... #+END_SRC flycheck will insert a picture with the help of overlay, The problem I faced is that when I use posn-at-point to get buffer POS's pixel position. it will get the picture's pixel position. The two (X .Y) position is not equal, for example (# 31 (65 . 111) 0 (! . 0) 31 (5 . 3) nil (0 . 24) (13 . 29)) (# 31 (65 . 87) 0 nil 31 (5 . 3) nil (0 . 0) (13 . 29)) Is it possible force get buffer POS's pixel position? > > Andreas. --