From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.devel Subject: Re: line-pixel-height beyond eol Date: Thu, 05 Oct 2017 18:50:38 +0900 (JST) Message-ID: <20171005.185038.2275302121797407783.tkk@misasa.okayama-u.ac.jp> References: <83r2v7lva9.fsf@gnu.org> <20170923.215700.2084440979431338157.tkk@misasa.okayama-u.ac.jp> <83y3p5a71w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1507197117 29096 195.159.176.226 (5 Oct 2017 09:51:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 09:51:57 +0000 (UTC) Cc: tkk@misasa.okayama-u.ac.jp, emacs-devel@gnu.org To: eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 05 11:51:50 2017 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 1e02oh-000621-TC for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 11:51:44 +0200 Original-Received: from localhost ([::1]:38714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e02op-0002fG-8P for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 05:51:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e02oF-0002et-25 for emacs-devel@gnu.org; Thu, 05 Oct 2017 05:51:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e02oE-0005K9-6a for emacs-devel@gnu.org; Thu, 05 Oct 2017 05:51:15 -0400 Original-Received: from mxl069v66.mxlogic.net ([208.81.69.66]:37658 helo=s18p02o143.mxlogic.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e02o7-00055x-Tm; Thu, 05 Oct 2017 05:51:08 -0400 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s18p02o143.mxlogic.net(mxl_mta-8.5.0-1871) over TLS secured channel with ESMTP id 77006d95.0.235014.00-379.463359.s18p02o143.mxlogic.net (envelope-from ); Thu, 05 Oct 2017 03:50:48 -0600 (MDT) X-MXL-Hash: 59d60078269dbd5d-d095cb690e228efbafa72e95a0fa79abb942436f Original-Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 6a99_f6ac_7d8c51c0_8e17_45b0_91fb_4ec8c99cf4df; Thu, 05 Oct 2017 18:50:41 +0900 Original-Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 26F614C0C39; Thu, 5 Oct 2017 18:50:42 +0900 (JST) In-Reply-To: <83y3p5a71w.fsf@gnu.org> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6129=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6129> : inlines <6108> : streams <1765929> : uri <2511548> X-AnalysisOut: [v=2.2 cv=bJRmGL2Z c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=kj9zAlcOel0A:10 a=02M] X-AnalysisOut: [-m0pO-4AA:10 a=TR8qKcD8mgYuNs-5y5oA:9 a=CjuIK1q_8ugA:10] X-Spam: [F=0.5000000000; CM=0.500; MH=0.500(2017100505); S=0.504(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 208.81.69.66 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:219115 Archived-At: >> > Can you use vertical-motion for that? >> >> After try and error, I learned how to get height of pixel on >> visual-line using `vertical-motion' and `posn-x-y' as shown below. >> >> However, when (window-hscroll) is large, I cannot get y location of >> cursor using `posn-x-y'. Can you give me suggestion how to get y >> location of cursor even when when (window-hscroll) is large? > > I need to see an example of a situation where you cannot get the Y > coordinate of the cursor due to a large window-hscroll. Is it at all > an interesting situation, or just a theoretical one? Also, if you > just use frame-char-height in that case, does that solve the problem? That happens when I scroll a buffer with an image. When point in an image and left edger of the image is out of screen by window-hscroll, I cannot get (posn-at-point). Here is an example of a situation. M-x about-emacs M-<, C-e, C-b (posn-at-point) => (# 2 (152 . 0) 0 nil 2 (1 . 0) (image :type png :file "splash.png") (0 . 0) (333 . 233)) (set-window-hscroll nil 28) (posn-at-point) => nil This case, I want to estimate height of a line as height of the image thus frame-char-height does not work. Please give me suggestion to get y location of a cursor on the situation!